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 |
|
anuradhay
Starting Member
41 Posts |
Posted - 2005-02-25 : 00:09:27
|
| i have an user support in one of my database. There is one table t1 and procedure P1 in the database and both are created by dbo. I am not giving any permission to the table. And giving only execute permission for that procedure. This procedure is trying to insert some values into table t1. if i login to sql as support and execute insert stmt then it will throw an error saying that insert permission denied for that table. Now my doubt is If i try to execute this procedure will it throw the same error or it will insert record into the table?? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-02-25 : 16:28:20
|
| If a user does not have permissions to insert into a table but has permissions to execute a stored proc that does the insert, then the insert will be allowed. UNLESS you have dynamic SQL doing the insert. If that's the case, then you'll need EXEC on the stored proc plus INSERT permission on the table. This is one reason why not to use dynamic SQL.And how about testing it out rather than waiting for one of us to answer?Tara |
 |
|
|
|
|
|