Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Database
Creates a proxy credential for xp_cmdshell
.
Note
xp_cmdshell
is disabled by default. To enable xp_cmdshell
, see xp_cmdshell (server configuration option).
Transact-SQL syntax conventions
sp_xp_cmdshell_proxy_account [ NULL | { 'account_name' , 'password' } ]
[ ; ]
Specifies that the proxy credential should be deleted.
Specifies the Windows account to be the proxy.
Specifies the password of the Windows account.
0
(success) or 1
(failure).
The proxy credential is called ##xp_cmdshell_proxy_account##
.
When it's executed using the NULL
option, sp_xp_cmdshell_proxy_account
deletes the proxy credential.
Requires CONTROL SERVER
permission.
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';
GO
The following example removes the proxy credential from the credential store.
EXEC sp_xp_cmdshell_proxy_account NULL;
GO
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today