开发者

import table data to another database in another computer in sql server 2005

开发者 https://www.devze.com 2023-01-05 17:40 出处:网络
i have generated the script and cr开发者_如何转开发eated 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.

i have generated the script and cr开发者_如何转开发eated 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?


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:

  • Recipe: Deploying a SQL Database to a Remote Hosting Environment
  • Tip/Trick: How to upload a .SQL file to a Hoster and Execute it to Deploy a SQL Database
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号