generation of sql queries on tables
I have a few tables in my local SQL Server database with some data in those tables. I want to to transf开发者_C百科er that data to my database server. On that server I can run SQL queries.
How can I generate the SQL to do this, or is this possible using SQL Server Management Studio?
First, generate scripts for table structure and run the scripts on your target server, then use the bcp
tool (see http://msdn.microsoft.com/en-us/library/ms162802.aspx) to migrate the data.
Take a backup of the database and copy that .bak file to your server, then use restore database
option of SQL Management studio to restore the database from that .bak file.
Thanks
精彩评论