SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Prevent accidental DB drop\delete


Prevent accidental DB drop\delete

Author
Message
Subhash Chander
Subhash Chander
SSC-Addicted
SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)

Group: General Forum Members
Points: 406 Visits: 224
Comments posted to this topic are about the item Prevent accidental DB drop\delete
Sue_H
Sue_H
SSC Guru
SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)

Group: General Forum Members
Points: 77472 Visits: 15517
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



Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)

Group: General Forum Members
Points: 896067 Visits: 48245
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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
frederico_fonseca
frederico_fonseca
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10733 Visits: 5887
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.

Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)

Group: General Forum Members
Points: 896067 Visits: 48245
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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Steve Jones
Steve Jones
SSC Guru
SSC Guru (619K reputation)SSC Guru (619K reputation)SSC Guru (619K reputation)SSC Guru (619K reputation)SSC Guru (619K reputation)SSC Guru (619K reputation)SSC Guru (619K reputation)SSC Guru (619K reputation)

Group: Administrators
Points: 619994 Visits: 21261
Script removed. User warned

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)SSC Guru (896K reputation)

Group: General Forum Members
Points: 896067 Visits: 48245
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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search