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 |
|
kiran
Starting Member
30 Posts |
Posted - 2003-06-11 : 17:28:49
|
| I need some help regarding how to setup permissions on tables.I have a database "db1" with tables "table1","table2" ..... "table10"I want to give only read only(select) permission on "table1", "table2" to "user1". How can I achieve this using Enterprise manager OR by commands ?Thanks in advance... |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-06-11 : 17:31:54
|
| GRANT SELECT ON Table1 TO User1GRANT SELECT ON Table2 TO User1But why are you using direct table access? This method isn't secure. You should be doing your T-SQL in stored procedures.Tara |
 |
|
|
kiran
Starting Member
30 Posts |
Posted - 2003-06-11 : 17:48:11
|
| This "User1" is a Windows user. To access the server, i gave him permission thru the Enterprise Manger\Security\Logins and did not give permission to access any database. But he was able to access all the databases and tables. Am I doing anything wrong ? What options i need to set to achive this ?Thanks, |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-06-11 : 17:50:00
|
| Well it depends if you gave User1 system administrator role or not. It also depends if User1 is an administrator on the machine. If either or both of these are true, then User1 will have access to everything in SQL Server. To fix this, you must figure out which one is true, then remove them from that. Then grant them access to the database, then run the GRANT statements.Tara |
 |
|
|
|
|
|