Home > Archive > MS SQL Server Tools > February 2006 > Scripting options









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Scripting options
Louis Davidson

2006-02-09, 8:25 pm

I hunted (way too long) for a way to script only certain object types in
management studio today (and yesterday) and so here I am :)

Is there a way to script only check constraints? Or only primary keys?
Etc? I was trying to change the datatype of a bunch of columns to try to
fix a data source view issue and so I needed to drop my primary keys and
relationships first, then read them. I finagled it using ERwin, but I
thought you could do this in SSMS.

No way was I going through the GUI (two reasons, 1. over 100 columns to
change 2. real dba's don't use GUI tools (just kidding about #2, I use it
"some"))

--
----------------------------------------------------------------------------
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"Arguments are to be avoided: they are always vulgar and often convincing."
(Oscar Wilde)


Sue Hoegemeier

2006-02-14, 3:23 am

It's one of the lacking areas with the move to 2005. Other
than using SMO, there isn't much there with the scripting.
You can access more options through the scripting wizard at
the database level but that won't give you what you want.
I haven't looked at what's available in this utility but
it's a scripting tool using SMO:
http://weblogs.sqlteam.com/billg/ar...11/22/8414.aspx

-Sue

On Thu, 9 Feb 2006 18:44:44 -0600, "Louis Davidson"
< dr_dontspamme_sql@ho
tmail.com> wrote:

>I hunted (way too long) for a way to script only certain object types in
>management studio today (and yesterday) and so here I am :)
>
>Is there a way to script only check constraints? Or only primary keys?
>Etc? I was trying to change the datatype of a bunch of columns to try to
>fix a data source view issue and so I needed to drop my primary keys and
>relationships first, then read them. I finagled it using ERwin, but I
>thought you could do this in SSMS.
>
>No way was I going through the GUI (two reasons, 1. over 100 columns to
>change 2. real dba's don't use GUI tools (just kidding about #2, I use it
>"some"))


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com