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 |
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-03-31 : 05:02:47
|
| I need to give someone access to a view but want to make the data read only. Any suggestions on the best way to do this?thankssteveA sarcasm detector, what a great idea. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-03-31 : 08:27:58
|
| DENY UPDATE, INSERT, and DELETE permissions on that view to that user. Or, even better, add a NOLOCK hint to the view if you never plan to use it for anything but SELECTs. Adding the hint should make it non-updateable, if not you can add some non-deterministic expressions to the SELECT list (getdate(), etc.) or a TOP 100 PERCENT clause. |
 |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-03-31 : 09:15:00
|
| Brilliant, thanks Rob. I'd already denied access but I knew there was something else, just couldn't find it. I blame that last MartiniMany thankssteveA sarcasm detector, what a great idea. |
 |
|
|
|
|
|