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
精彩评论