views:

20

answers:

1

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?

A: 

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:

marc_s
can you explain the first way? how can i run these insert statements because i tried to do that from the local db selecting from the remote one, previously executed the sp_addlinkedserver and i couldnt because i dont have a connection that has access on both servers and db.
medusa