Prevent accidental DB drop\delete

  • Comments posted to this topic are about the item Prevent accidental DB drop\delete

  • Subhash Chandra - Wednesday, October 24, 2018 9:46 AM

    Comments posted to this topic are about the item Prevent accidental DB drop\delete

    Looks like Lowell's code here - same format, same comments, etc:
    DDL trigger to prevent drop of a particular database

    with a couple really little changes - and one changed incorrectly. When you changed sysname, it should be nvarchar(128) not varchar(128).
    I'd stick with Lowell's example.

    Sue

  • Sue_H - Wednesday, October 24, 2018 11:52 AM

    Subhash Chandra - Wednesday, October 24, 2018 9:46 AM

    Comments posted to this topic are about the item Prevent accidental DB drop\delete

    Looks like Lowell's code here - same format, same comments, etc:
    DDL trigger to prevent drop of a particular database

    with a couple really little changes - and one changed incorrectly. When you changed sysname, it should be nvarchar(128) not varchar(128).
    I'd stick with Lowell's example.

    Sue

    That and stop posting stuff as if it were your own when it's not.  I understand that there's only a certain number of ways to write code but, like Sue said, the comments and even the spacing of the code are identical to Lowell's.  There's only one way that can happen.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden - Wednesday, October 24, 2018 4:58 PM

    Sue_H - Wednesday, October 24, 2018 11:52 AM

    Subhash Chandra - Wednesday, October 24, 2018 9:46 AM

    Comments posted to this topic are about the item Prevent accidental DB drop\delete

    Looks like Lowell's code here - same format, same comments, etc:
    DDL trigger to prevent drop of a particular database

    with a couple really little changes - and one changed incorrectly. When you changed sysname, it should be nvarchar(128) not varchar(128).
    I'd stick with Lowell's example.

    Sue

    That and stop posting stuff as if it were your own when it's not.  I understand that there's only a certain number of ways to write code but, like Sue said, the comments and even the spacing of the code are identical to Lowell's.  There's only one way that can happen.

    is there an option to flag the item itself as being a possible copy from another one? many people will only see the top link and assume it was done by the individual posting it.

  • frederico_fonseca - Wednesday, October 24, 2018 5:15 PM

    Jeff Moden - Wednesday, October 24, 2018 4:58 PM

    Sue_H - Wednesday, October 24, 2018 11:52 AM

    Subhash Chandra - Wednesday, October 24, 2018 9:46 AM

    Comments posted to this topic are about the item Prevent accidental DB drop\delete

    Looks like Lowell's code here - same format, same comments, etc:
    DDL trigger to prevent drop of a particular database

    with a couple really little changes - and one changed incorrectly. When you changed sysname, it should be nvarchar(128) not varchar(128).
    I'd stick with Lowell's example.

    Sue

    That and stop posting stuff as if it were your own when it's not.  I understand that there's only a certain number of ways to write code but, like Sue said, the comments and even the spacing of the code are identical to Lowell's.  There's only one way that can happen.

    is there an option to flag the item itself as being a possible copy from another one? many people will only see the top link and assume it was done by the individual posting it.

    I flagged it as a "Terms of use" violation.  Hopefully, someone that's supposed to monitor such flags at SSC/RC will take a look.  If not, I'll hum a rock at Steve's window and see what he thinks.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Script removed. User warned

  • Steve Jones - SSC Editor - Friday, October 26, 2018 8:56 AM

    Script removed. User warned

    Thanks, Steve.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

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