2012年3月20日星期二

Any way to keep a table in read only mode ?

I would like to keep a table in readonly mode vs having the entire database
in read only ? I also do not wish to change any login settings,etc..DENY INSERT, UPDATE, DELETE ON table_name
TO user_name_1, user_name_2, user_name_3
David Portas
SQL Server MVP
--
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%239J8hAnkFHA.3568@.TK2MSFTNGP10.phx.gbl...
>I would like to keep a table in readonly mode vs having the entire database
> in read only ? I also do not wish to change any login settings,etc..
>
>|||search for these titles in BOL:
Understanding Locking in SQL Server
Locking Hints
Hope this will help.
Regards,
Mansih|||Do you know the query i could use ?
select * from table (tablockx) .. Will this do and prevent others from
modifying the data ?
I would like to read and not update
<manish19@.gmail.com> wrote in message
news:1122447284.950431.215450@.g49g2000cwa.googlegroups.com...
> search for these titles in BOL:
> Understanding Locking in SQL Server
> Locking Hints
> Hope this will help.
> Regards,
> Mansih
>|||Hassan
by using SELECT statement you cannot UPDATE the data. As David pointed out
use DENY permission on objects
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:e1SiiDokFHA.1044@.tk2msftngp13.phx.gbl...
> Do you know the query i could use ?
> select * from table (tablockx) .. Will this do and prevent others from
> modifying the data ?
> I would like to read and not update
>
> <manish19@.gmail.com> wrote in message
> news:1122447284.950431.215450@.g49g2000cwa.googlegroups.com...
>

没有评论:

发表评论