I first made use of Generate Scripts to create these SQL files.
- Right click the database you want to generate scripts for (not the table) and select tasks - generate scripts
- Next, select the requested table/tables, views, stored procedures, etc (from select specific database objects)
- Click advanced - select the types of data to script
- Click Next and finish
http://msdn.microsoft.com/en-us/library/hh245282.aspx
I chose to create the schema on its own, and then the data on its own, one file per table.
Even though the largest SQL files was no larger than 100Mb, SQL Server management Studio was still complaining and running out of memory.
So instead I opted to use the SQLCMD tool, which is leaner, faster, and does not complain of memory issues
This is how I used it.
sqlcmd -S ServerName -i Script.sql -o DbLogFile.log
http://technet.microsoft.com/en-us/library/ms162773.aspx
No comments:
Post a Comment