Solved

db_owner's permission

Posted on 2004-08-10
12
1,587 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 69

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 100 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 50 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 42

Assisted Solution

by:EugeneZ
EugeneZ earned 50 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 300 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 69

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 100 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 69

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

828 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