How can I generate a script in SQL Server 2005 with data in table?
相关问题
- sql execution latency when assign to a variable
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
- SQL to Parse a Key-Value String
相关文章
- Entity Framework 4.3.1 failing to create (/open) a
- Code for inserting data into SQL Server database u
- Delete Every Alternate Row in SQL
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
- Is recursion good in SQL Server?
- How can I convert a OLE Automation Date value to a
Right click on the database. Then select the Tasks->Generate Scripts See the image here
Then, Select the table or tables which you need insert script to be generated. see the image here
Now Click next and click on Advanced and select "Types of data to script" see the image here
Finally, next, next, you get all your data in insert scripts. Good bye excel!
Use data publishing wizard. step by step explanation at :
http://blog.sqlauthority.com/2007/11/16/sql-server-2005-generate-script-with-data-from-database-database-publishing-wizard/
Unfortunately the options to script data along with schema didn't seem to appear until SQL Server 2008, so I think you're stuck with third party options.
I had the same problem before, and there seems to be no direct script can be made to take all tables structures with their data.
I came around this situation by doing the following:
Then, to take your database somewhere else:
This worked just fine for me using SQL Server 2005.