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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Running a DBCC command without SYSADMIN

Author  Topic 

jkatsos
Starting Member

6 Posts

Posted - 2005-04-03 : 19:41:39
Hi all,

Unfortunately I use a number of undocumented DBCC commands - mainly DBCC pss , DBCC loginfo and others. I need to do this on both 7 and 2000 within a stored proc.

This works fine if the user is Sysadmin. Cool.

However if I want to run this as a non - sysadmin user it will not work

User 'test' does not have permission to run DBCC loginfo.

So this is what I did. I gave the user every single privilege under the sun except sysadmin. This included all the other server roles as well as all database access privs on the DB in question part i.e db_owner,db_.... I thought I'd start from here and work backwards.

Guess what it did not work!

User 'test' does not have permission to run DBCC loginfo.

Any ideas

Jim.

nr
SQLTeam MVY

12543 Posts

Posted - 2005-04-03 : 20:16:12
Well sounds like you've proved it needs sysadmin.
You could execute the command from a job which has sysdmin permissions and email the results to the user or save them to a table for the user to view.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-04-03 : 20:16:15
Well, I have no idea why you would want a normal user to do this???????? But, you could setup a job that just run continuously and looks for a flag in a table. If the flag is set, it runs the approprate DBCC information and loads it into a table, resets the flag, etc. The user could then access the information. You do have to be system admin or db_owner to run many of the DBCC commands. There's no way around it that I know of. The job would have to run under the appropriate credentials of course.

Tell us why you are doing this. I've never seen a good reason for what you're doing. I've only been doing this for 11 years, so I guess I haven't heard of everything yet.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -