Those Stubborn Database Rules - Finding Them and Scripting Them

  • Scott Abrants

    SSCommitted

    Points: 1503

    Comments posted to this topic are about the item Those Stubborn Database Rules - Finding Them and Scripting Them

  • Scott Abrants

    SSCommitted

    Points: 1503

    I want to thank Jon W. and Tom W. for helping edit this article before posting.

  • Grant Fritchey

    SSC Guru

    Points: 395449

    Nice article and useful for digging out those silly artifacts.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • Scott Abrants

    SSCommitted

    Points: 1503

    Thank you Grant. I look forward to your presentation at Data Camp 2.0! Keep up the great work you do for the SQL Server community.

  • Grant Fritchey

    SSC Guru

    Points: 395449

    Thanks Scott. I'm looking forward to your presentation at Data Camp 2.0 as well. You need to keep up your work for the community also.

    Now, I happen to be closely acquainted with the person setting up the schedule and I know that he's bribable. When did you want to put your presentation on? Was yours at the end of the day or right after lunch, I forget?

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • Scott Abrants

    SSCommitted

    Points: 1503

    Any time slot is good as long as it is not the same time as yours because I am sure everyone will be at that one and the others will be empty. Very nice job on your latest book!

  • scunnin

    Grasshopper

    Points: 21

    Good find. I believe you just saved me from a significant amount of future stress. I suspect that discovering the lack of support for rules on a future release would have been a painful experience.

    Thanks.

  • SQLRNNR

    SSC Guru

    Points: 281210

    Nice article and good info.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Scott Abrants

    SSCommitted

    Points: 1503

    Thank you for the feedback. My intention is to write a follow up that will actually take the defined bindrules and script out proper constraints. What is interesting is how I ran into these in the first place. This issue came up because this database was created before I entered the picture and a non sql server resource defined the database. I think this is something we all have come across and knowing where the gotchas are is very important. I am planning on giving some of that back story in the follow up. Sound useful?

  • Giammarco Schisani

    SSC Journeyman

    Points: 77

    Thanks for the article. Very useful. Looking forward for the followup.

    _______________________
    Giammarco Schisani
    Volpet Software - Table Diff[/url]

  • Ligtorn

    Ten Centuries

    Points: 1007

    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[/url]

    Convert default objects to column defaults[/url]

    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

  • Scott Abrants

    SSCommitted

    Points: 1503

    Wow thank you for that. Now promising to post a follow up might not really be needed.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply