Sunday, March 25, 2012

can't find xp_sqlagent_proxy_account procedure

I want to allow access to xp_cmdshell to a regular (not sysadmin) user. I am not finding the xp_sqlagent_proxy_account in my master database. Hence I can’t allow this option. Any idea why and how should i proceed from here?
I'm using April CTP.
Thanks
Christina

To do this in SQL Server 2005 use the sp_xp_cmdshel_proxy_account stored procedure. It's actually an xp and listed under the Extended Stored Procedures in master in Management Studio.

Here's a portion of BOL's topic on xp_cmdshell from a recent build (sorry, I do not have an April CTP to test this on or see if this has changed recently).

xp_cmdshell Proxy Account

When it is called by a user that is not a member of the sysadmin fixed server role, xp_cmdshell connects to Windows by using the account name and password stored in the credential named ##xp_cmdshell_proxy_account##. If this proxy credential does not exist, xp_cmdshell will fail.

The proxy account credential can be created by executing sp_xp_cmdshell_proxy_account. As arguments, this stored procedure takes a Windows user name and password. For example, the following command creates a proxy credential for Windows domain user SHIPPING\KobeR that has the Windows password sdfh%dkc93vcMt0.

EXEC sp_xp_cmdshell_proxy_account 'SHIPPING\KobeR','sdfh%dkc93vcMt0'

Don|||Thanks Don. I was waiting for someone to answer since a long time.
i'll try this method as soon as i can and let you know if it worked with the april ctp.

by the way, if i install the june ctp sql server and keep the visual studio in april ctp will it work? i mean will there be connection problems as with previous releases?

Thanks
Christina|||Hi Don.
I tried the function and it worked.
But it seems that it is not mentioned in the BOL of April CTP.

Thanks Again
Christina|||

Thanx Don and Christina,

Just the answer I needed

|||This was the answer I needed as well. I couldn't find this solution documented anywhere else. Thanks.

No comments:

Post a Comment