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 |
|
shajimanjeri
Posting Yak Master
179 Posts |
Posted - 2008-08-13 : 08:36:17
|
| Is there any way to protect a table in db. I mean if anybody want to manually open this table by sql enterprise then it should ask some password or some permission.Is it possible?I am using SQL server 2000shaji |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-08-13 : 08:53:39
|
| don't give them select permissions on that table, or even explicitly DENYEm |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-13 : 08:56:15
|
You can create a trigger like thisCREATE TRIGGER trgAll ON MyTableAFTER INSERT, UPDATE, DELETEIF SUSER_SNAME() <> 'sa' ROLLBACK TRANSACTION to revert evertything anyone else than sa does in that table. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-08-14 : 00:01:10
|
| >> I mean if anybody want to manually open this table by sql enterprise then it should ask some password.No, you can't. |
 |
|
|
|
|
|