|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Scripting optionsmanagement 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) 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/archive/2005/11/22/8414.aspx -Sue On Thu, 9 Feb 2006 18:44:44 -0600, "Louis Davidson" <dr_dontspamme_sql@hotmail.com> wrote: Show quote >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")) |
|||||||||||||||||||||||