October 28, 2010 at 2:27 pm
I know I can use SSMS to script DB Objects. However, is there a command line utility or version? I need something where I can script out certain Views or Tables or SPs or whatever, as needed, as a Change Control process.
I do database backups prior to implementing changes into Production, but if the changes are few I'd like to simply rebuild the replaced OBJECTS via the scripting I do as a backup.
thanks in advance
October 28, 2010 at 3:06 pm
rew-370421 (10/28/2010)
I know I can use SSMS to script DB Objects. However, is there a command line utility or version? I need something where I can script out certain Views or Tables or SPs or whatever, as needed, as a Change Control process.I do database backups prior to implementing changes into Production, but if the changes are few I'd like to simply rebuild the replaced OBJECTS via the scripting I do as a backup.
thanks in advance
There is, but it's a third party software component. It's a freebie too. Here is the link:
October 28, 2010 at 3:29 pm
Thanks for the link, Luk.
I see it uses SMO, which I know nothing about.
Are there any SQL2005 out of the box EXE or utilities I can use?
October 29, 2010 at 7:05 am
For no cost, you can install PowerShell and put that to work, again using SMO. A script to generate all database objects would only be about 30 lines. I have one, but it's due to be published in a book soon, so I can't share it here. It'd be trivial to recreate though.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 29, 2010 at 10:26 am
rew-370421 (10/28/2010)
Thanks for the link, Luk.I see it uses SMO, which I know nothing about.
Are there any SQL2005 out of the box EXE or utilities I can use?
I don't think there are. But the software I mentioned comes with source code and it is fairly simple to modify. It will take you about an hour or so to step through it and make appropriate changes if you've coded before.
October 29, 2010 at 10:29 am
Great. Thanks!
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply