June 11, 2014 at 2:39 pm
Is there anyway I can turn off delete in SQL server? I want to prevent anyone inadvertently deleting rows in tables. I thought worse case I could have triggers on tables to perform roll back, just did not know if there was a better idea?
June 11, 2014 at 3:23 pm
I'm not so sure about this, but you could deny delete on your tables/schema. http://technet.microsoft.com/en-us/library/ms176128.aspx
June 12, 2014 at 3:03 am
Luis Cazares (6/11/2014)
I'm not so sure about this, but you could deny delete on your tables/schema. http://technet.microsoft.com/en-us/library/ms176128.aspx
That's an option, but bear in mind that anyone with sysadmin can still delete as they cannot be denied anything.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 12, 2014 at 3:41 am
I'd go with the DENY approach and then make sure that only appropriate people have access to the system.
However, that's not even the scary thing. The scary thing is when someone with administrative rights drops a table, or a database, or runs a restore on the wrong server overwriting the database. All kinds of things can go wrong and there's little you can do to prevent all of them. Best bet is to have a very good backup process in place, test those backups, and practice restores to a point in time.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply