Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

db_owner's permission

Posted on 2004-08-10
12
Medium Priority
?
1,606 Views
Last Modified: 2008-03-10
A user is in db_owner role.  But she cannot delete a record in a table.  So I explicitly grant her the delete previldge in the table via enterprise manager.  Nothing changes.

Please advise why.

biang
0
Comment
Question by:Jinghui Li
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 70

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 400 total points
ID: 11765928
A db_owner does not need explicit permission to delete a record in the table.  Something else must be causing the error, possibly:

1) Connected to a different server & db by mistake
2) Connected to a different db by mistake
3) Error in connection
4) Error in application/interface
0
 
LVL 9

Expert Comment

by:_ys_
ID: 11765963
Perhaps the public role has an explicit deny.
0
 
LVL 6

Assisted Solution

by:andy232
andy232 earned 200 total points
ID: 11765967
good answers.  I would also check the table for triggers.  I would also run SQL Profiler and watch what happens.  You should try logging in as the user in Query Analzyer and running the delete.  You'll usually get a good error message there
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 43

Assisted Solution

by:Eugene Z
Eugene Z earned 200 total points
ID: 11766034
also check relationship - FK PK of the table

Can you post  -error message
0
 

Author Comment

by:Jinghui Li
ID: 11766336
I ran the following query in Query Analyzer

DELETE  FROM  dbo.tbl1  WHERE     (Id = N'000000000')

Error Msg was

Server: Msg 229, Level 14, State 5, Line 1
DELETE permission denied on object 'tbl1', database 'xxx', owner 'dbo'.


I tried SQL Profiler but I did not know what the trace needs to record.  

Public role is not issue.  

What should I pay attention to about -FK PK
0
 
LVL 9

Accepted Solution

by:
_ys_ earned 1200 total points
ID: 11766645
> Public role is not issue.
Suggestion of public just an example. Are there any explicit denies at all?

> What should I pay attention to about -FK PK
You can't delete a PK whilst there's a FK to it. Basic database integrity. But the error message doesn't indicate this.
0
 

Author Comment

by:Jinghui Li
ID: 11766773
_ys_

I think you get it.  There is another role which has explicit denies on delete.  I have not tested it yet as I cannot log in as the person now.
0
 
LVL 70

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 400 total points
ID: 11767187
?  If you're 'sa' you can test their permissions without actually logging in as that user.
0
 

Author Comment

by:Jinghui Li
ID: 11767233
Yes I have the system roles - System Administrators.  I also find out the sa login if I really want to.  Do I have to use 'sa'?  And how should I test their permissions?

Thanks
0
 

Author Comment

by:Jinghui Li
ID: 11767520
The person came back and it worked.

But I still love to get help on 'test their permission withou acutually loggin in as that user'.
0
 
LVL 70

Expert Comment

by:Scott Pletcher
ID: 11767564
Go into Query Analyzer and issue this command:

SETUSER 'optionalDomain/userYouWantToSimulate'

Then any commands you issue will use the permissions of that user.

To reset back to your sa user, do this:

SETUSER  --[with no params]
0
 

Author Comment

by:Jinghui Li
ID: 11767568
I have set up another question for 'test their permission withou acutually loggin in as that user'.

http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21089042.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ready to get certified? Check out some courses that help you prepare for third-party exams.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question