Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Those Stubborn Database Rules - Finding Them and Scripting Them Expand / Collapse
Author
Message
Posted Friday, January 08, 2010 10:28 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 2:39 PM
Points: 233, Visits: 447
I believe that I can save you the headache. I have just published two scripts, one which can convert bound default objects to column defaults and one that converts bound rules to column check constraint.

Convert rule objects to column check constraints

Convert default objects to column defaults

Actually it is pretty complicated to convert rules, because sql server stores them as transact statements. The only way I know of, are converting them by doing text parsing. Parsing these objects are pretty hard to generalize. I would appreciate feedback if you run into problems with the scripts
Post #844510
Posted Friday, January 08, 2010 12:48 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, April 07, 2014 9:34 AM
Points: 46, Visits: 337
Wow thank you for that. Now promising to post a follow up might not really be needed.
Post #844624
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse