Tuesday, March 20, 2012

A better way Generating Scripts with SQL Mgmt Studio

Is there a better/faster/persistable way to generate sql objects with the ms sql server mgmt studio than to go thru that long wizard? I hate having to configure it each time.RIGHT click on database, choose Tasks -> Generate Scripts and go through the wizard. You can choose all the objects you want in one run.|||Make sure the database you need is open in the object browser right click on the object in management studio and click on create. This generates the code for only that object. Hope this helps.|||thanks for response guys/fellow Houstonion but using generate scripts is a pain, since im creating scripts often in a day, I hate having to reset the settings each time. Am I the only one that sees this as a pain?|||All database objects must be scripted or you can recreate the whole database with .bak file with the backup and restore wizard.|||

let me explain, i have a subset of several stored procs and tables that I may modify throughout the day, generate scripts for it, deploy, then repeat.

Therefore if there was a way to set up the preset choices It would save a lot of time and be less prone to error, hard to believe this hasnt been done.

|||If you want to run it as Exe you need Install shield but the problem is I run the .sql files faster than the Install shield version because it is just a cover. I have used most expensive SQL Tools including Toad and Embercadero all just generate .sql files because you can run .sql files any where including command line.|||

sorry i dont understand, why would i want an exe to generate some sql scripts?

so you think to decrease the time it takes to gen erate a subset of sql objects on a db I need to get a sql tool?

|||No that is not what I am saying, what I am saying is there is no difference even with a tool. I think using the object browser takes you to the stored proc or table you need in the database you have opened. But tools will catch errors more than management studio.|||Ok well thanks for reply, wish there was a way to run some sort of batch to recreate my scripts on demand. too bad.sql

No comments:

Post a Comment