Monday, March 19, 2012

DBCC Inputbuffer work around...

Hello,
I want to be able to give a couple of my junior dbas the ability to do a
DBCC INPUTBUFFER. However, they do not belong to the symin role. Is
there a way that I can give them the ability to execute the DBCC INPUTBUFFER
without making them members of the symin role? If there is a way... how
would I go about getting it accomplished.
I created a stored procedure and pass the spid as the parameter and execute
the whole statement as a string... but that still did not work. I am using
SQL Server 2000.
Please advise...
Thank you,
BrettAs BOL says, "symin fixed server role only".
AMB
"Brett Davis" wrote:

> Hello,
> I want to be able to give a couple of my junior dbas the ability to do a
> DBCC INPUTBUFFER. However, they do not belong to the symin role. Is
> there a way that I can give them the ability to execute the DBCC INPUTBUFF
ER
> without making them members of the symin role? If there is a way... ho
w
> would I go about getting it accomplished.
> I created a stored procedure and pass the spid as the parameter and execut
e
> the whole statement as a string... but that still did not work. I am usin
g
> SQL Server 2000.
> Please advise...
> Thank you,
> Brett
>
>
>|||Brett Davis wrote:
> Hello,
> I want to be able to give a couple of my junior dbas the ability to
> do a DBCC INPUTBUFFER. However, they do not belong to the symin
> role. Is there a way that I can give them the ability to execute the
> DBCC INPUTBUFFER without making them members of the symin role? If
> there is a way... how would I go about getting it accomplished.
> I created a stored procedure and pass the spid as the parameter and
> execute the whole statement as a string... but that still did not
> work. I am using SQL Server 2000.
> Please advise...
> Thank you,
> Brett
You could use xp_cmdshell from the SP and execute OSQL and have it log
into the server using Windows Authentication and then return the results
from the DBCC INPUTBUFFER.
For example (using the current SPID which you'll need to change for the
actualy query):
exec master..xp_cmdshell N'OSQL.EXE -E -q"dbcc inputbuffer(@.@.spid)"'
David Gugick
Imceda Software
www.imceda.com|||Brett,
You could create a COM+ object that has symin rights and store it on your
middle-tier server. By writing a web application to interface to the COM
object, you could grant select users access to the web page that calls the
COM object (but not the COM object itself).
Russell Fields
"Brett Davis" <bdavis123@.cox.net> wrote in message
news:%23Zddz$hCFHA.2632@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I want to be able to give a couple of my junior dbas the ability to do a
> DBCC INPUTBUFFER. However, they do not belong to the symin role. Is
> there a way that I can give them the ability to execute the DBCC
INPUTBUFFER
> without making them members of the symin role? If there is a way...
how
> would I go about getting it accomplished.
> I created a stored procedure and pass the spid as the parameter and
execute
> the whole statement as a string... but that still did not work. I am
using
> SQL Server 2000.
> Please advise...
> Thank you,
> Brett
>
>

No comments:

Post a Comment