SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Problem with scripting objects through query


Problem with scripting objects through query

Author
Message
Linson.Daniel
Linson.Daniel
Old Hand
Old Hand (365 reputation)Old Hand (365 reputation)Old Hand (365 reputation)Old Hand (365 reputation)Old Hand (365 reputation)Old Hand (365 reputation)Old Hand (365 reputation)Old Hand (365 reputation)

Group: General Forum Members
Points: 365 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..
Scott Coleman
Scott Coleman
SSCarpal Tunnel
SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)

Group: General Forum Members
Points: 4549 Visits: 1485
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.



Divya Agrawal
Divya Agrawal
SSChasing Mays
SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)

Group: General Forum Members
Points: 618 Visits: 604
I have scripted the objects this way to script the triggers for a particular list of tables.

--Divya
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search