Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
SoftFox
Starting Member
42 Posts |
Posted - 2010-02-15 : 07:51:57
|
Does anyone know of a way i can protect objects such as stored procs, functions etc from being updated e.g. by scripts by users who are dbo's? I've tried using different schemas but this doesnt stop a dbo user from being able to update such objects. |
|
Kristen
Test
22859 Posts |
Posted - 2010-02-15 : 08:46:13
|
Why do they need to be DBO if they aren't allowed to change objects?You could set up a DDL Trigger than "rolled back" the transaction (probably based on what type of user they were), but I'm not sure that's the right answer for this question |
 |
|
SoftFox
Starting Member
42 Posts |
Posted - 2010-02-15 : 10:46:55
|
The issue is protecting site - specific objects from update scripts generated from DB compare tools for upgrading sites. The user's need to be able to change most objects but a few need to be marked as not editable |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-02-15 : 11:10:18
|
Either put them in a different database (and give your users less permissions on that DB) [I reckon this is going to be more trouble than it is worth, but it might be "an answer" , or use a DDL Trigger to rollback any changes they try to make (to those objects). |
 |
|
|
|
|