Hi Everyone, what im looking for is a way or a freeware utility that will genereate a single SQL Script, for my entire db...
Just like phpMyAdmin does for MySQL...
it would need to script my tables, the data of those tables, and all my stored proc's.
Can SQL Server management studio do this? or does anyone know of a utility that will.
Thanks, Justinhave you tried the Generate Scripts Wizard in SSMS?
You can get to it off any database node in Object Explorer, under the Tasks flyout menu. Look for "Generate Scripts..."
I don't think it can script the data though. For that you might take a look at this addin to SSMS:
http://www.codeproject.com/useritems/enisey.asp|||If you know a little C# and want to try writing your own, SMO exposes pretty much every object in SQL Server, and each one has a Script() method which returns a StringCollection.
So it would be a pretty simple matter to write your own app to do this using SMO. I have done it actually. When I get a chance I'll post it on my site - link below. I'll try to get it posted this weekend.|||Just saw this post, looks like it may be of use to you:
http://www.dbforums.com/showthread.php?t=1610233|||Here's the app I was talking about above. It doesn't script all the data, just the objects. It generates a separate file for each object. I did it that way so it's easy to put a db under source control if it's not already.
http://www.elsasoft.org/tools.htm
Edit: I couldn't help myself. So I just added some code so that scriptdb.exe that will script out the data as well (optionally) using bcp.exe. :)|||Hi,
Thank you for that script, it worked a charm,
how ever i was looking for something that will script it to a .sql file... as in, INSERT INTO type stuff...
Cheers, Justin
No comments:
Post a Comment