Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

sp_xp_cmdshell_proxy_account (Transact-SQL)

Creates a proxy credential for xp_cmdshell.


xp_cmdshell is disabled by default. To enable xp_cmdshell, see xp_cmdshell Option.

Topic link icon Transact-SQL Syntax Conventions

sp_xp_cmdshell_proxy_account [ NULL | { 'account_name' , 'password' } ]


Specifies that the proxy credential should be deleted.


Specifies a Windows login that will be the proxy.


Specifies the password of the Windows account.

0 (success) or 1 (failure)

The proxy credential will be called ##xp_cmdshell_proxy_account##.

When it is executed using the NULL option, sp_xp_cmdshell_proxy_account deletes the proxy credential.

Requires CONTROL SERVER permission.

A. Creating the proxy credential

The following example shows how to create a proxy credential for a Windows account called ADVWKS\Max04 with password ds35efg##65.

EXEC sp_xp_cmdshell_proxy_account 'ADVWKS\Max04', 'ds35efg##65';

B. Dropping the proxy credential

The following example removes the proxy credential from the credential store.

EXEC sp_xp_cmdshell_proxy_account NULL;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft