Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase ««12

Problem with scripting objects through query Expand / Collapse
Posted Sunday, November 1, 2009 9:25 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Sunday, December 13, 2015 4:57 AM
Points: 313, Visits: 391

May be if someone wants scripts for many objects all in one shot... not sure if SQL-Server does that for many objects at a time. Does it?

Ohh hell ya!!! It does........
From SQL 2K onwards it does have the option to script your entire database.....not sure about the earlier versions..
Post #812183
Posted Monday, November 2, 2009 5:36 AM


Group: General Forum Members
Last Login: Tuesday, November 29, 2016 11:30 AM
Points: 2,936, Visits: 1,410
Linson.Daniel (11/1/2009)
Then again....would someone tell me why would I go about generating scripts like the way that was shown here when SQL server itself provides all the necessary options to script your db objects?

For instance, when I want to see the definition of all objects that reference a particular linked server, or call a certain stored proc, or use OPENQUERY, or whatever else I'm interested in. I usually use something like "SELECT definition FROM [?].sys.sql_modules WHERE definition LIKE '%xyz%' " as a parameter for sp_msforeachdb.

Post #812322
Posted Monday, November 2, 2009 6:00 AM


Group: General Forum Members
Last Login: Friday, November 4, 2016 3:03 AM
Points: 156, Visits: 604

I have scripted the objects this way to script the triggers for a particular list of tables.

Post #812331
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse