将表数据导入到sql server 2005中另一台计算机中的另一个数据库

发布于 2024-09-08 10:19:13 字数 86 浏览 0 评论 0原文

我已经生成了脚本并在我的计算机中创建了架构。现在我怎样才能获取表数据?我在远程数据库中没有足够的访问权限来复制它。 可以使用sql server 来完成吗?

i have generated the script and created the schema in my computer. now how can i get the tables data? i dont have enough access in the remote database to copy it.
Can it be done using sql server?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

厌倦 2024-09-15 10:19:13

如果您已设置表和所有内容,则可以执行许多操作:

  • 使用 INSERT 语句创建一些 SQL 脚本
  • 创建一个使用 SqlBulkCopy 之类的应用程序来插入数据
  • 使用 SQL Server Integration Services 导入数据
  • 许多其他方式... ..

你需要问得更有针对性 - 这个问题无法真正得到回答......

更新:
对于选项 #1,您需要执行以下步骤:

  • 以某种方式从本地数据库创建 INSERT 脚本 - 您可以手动执行此操作,或使用一些可用的工具 (SQL 数据转储器, 表脚本,或使用 SQL Server Mgmt Studio)将
  • 这些 *.sql 脚本文件传输到您的托管服务器(通过 FTP、通过 Web门户上传 - 无论什么)
  • 在远程托管环境上执行这些 *.sql 脚本 - 您可以访问某种形式的 SQL Server 管理工具(命令行上的 Mgmt Studio 或 sqlcmd),或者您的托管服务商提供某种形式的基于 Web 的工具来加载和执行这些脚本(这取决于您的托管服务商,并且托管服务商之间的差异很大)

查看 Scott Guthrie 关于该主题的其他博客文章:

If you have your tables and everything setup, you can do a number of things:

  • create some SQL scripts with INSERT statements
  • create an app that uses something like SqlBulkCopy to insert data
  • use SQL Server Integration Services to import data
  • plenty of other ways.....

You need to ask a bit more focused - this question cannot really be answered.....

Update:
For option #1, you need to do these steps:

  • somehow create your INSERT scripts from your local database - you can do this manually, or use some of the available tools (SQL Data Dumper, Table Scripter, or use the built-in functionality of SQL Server Mgmt Studio) out there
  • transfer those *.sql script files to your hoster (via FTP, via a web portal upload - whatever)
  • execute those *.sql scripts on your remote hosting environment - either you have access to some form of a SQL Server management tool (either Mgmt Studio or sqlcmd on the command line), or your hoster provides some form of a web-based tool to load and execute those scripts (which depends on your hoster and varies quite a bit between hosters)

Check out those additional blog posts by Scott Guthrie on the topic:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文