March 22, 2004 at 1:40 pm
Apologies if this has been brought up before, I couldn't find anything about it anywhere.
How do you programmatically generate object scripts, the same as you can with Enterprise Manager?
Is there a MS shipped stored procedure that does this?
Thanks
Ben
March 22, 2004 at 3:25 pm
No, most of it is done using DMO there are examples to do bits and pieces via both DMO and TSQL around here but I have not seen anything to do all either way.
March 23, 2004 at 12:11 am
number of object scripting procedures/queries published in sql server central itself. But they works on isqlw. if you want to have like one in EM, then it is difficult to get.
March 23, 2004 at 12:35 am
there is a sqldmo example for this delivered if you have checked for example-files to be installed.
It will need to be modified because it is just a starting example.
You will have to play around with the scripting-bitmap-settings for each of the objects you want to script.
Now all my dev-db's are scripted every day and all my QA- and prod-db's are scripted at least once a week.
Ofcourse it just states schema and not data.
It does not provide stuff for encrypted objects.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
March 23, 2004 at 2:38 am
Thanks guys,
Your responses have been very informative.
Ben
March 25, 2004 at 7:28 pm
Actually... there is a way if you want to generate the scripts for ALL the objects in a database. Check out the following URL...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2004 at 12:22 am
Very nice
Many have been searching for this and (like I did) build their own sqldmo-solution.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply