Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 database script using SQL server 2005

Author  Topic 

sparrow37
Posting Yak Master

148 Posts

Posted - 2009-12-02 : 13:07:58
Hi,

Can we create script of database using sQL server 2005 in such a way that It contains insert statements as well so that If I run it in other system .... then tables are created as well as data is inserted. I can't use database backup in this scenerio. Please help me.

Regards,
Asif Hameed

sparrow37
Posting Yak Master

148 Posts

Posted - 2009-12-06 : 06:59:29
Any response ?

Regards,
Asif Hameed
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-06 : 11:03:48
For the schema and all of its objects, you can script directly from the SSMS GUI.

You can use this to generate the insert statements: http://vyaskn.tripod.com/code/generate_inserts.txt

I would highly recommend using backup/restore though as depending upon your database size, doing it the way you are propopsing is going to be slow.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -