| title | sp_msx_set_account (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 03/14/2017 | ||
| ms.prod | sql-non-specified | ||
| ms.reviewer | |||
| ms.suite | |||
| ms.technology |
|
||
| ms.tgt_pltfrm | |||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 314ec720-3a37-48f7-bb6b-8d5b894bf843 | ||
| caps.latest.revision | 26 | ||
| author | JennieHubbard | ||
| ms.author | jhubbard | ||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]
Sets the [!INCLUDEssNoVersion] Agent master server account name and password on the target server.
| Applies to: [!INCLUDEssNoVersion] ([!INCLUDEssKatmai] through current version). |
Transact-SQL Syntax Conventions
sp_msx_set_account [ @credential_name = ] 'credential_name' | [ @credential_id = ] credential_id
[ @credential_name= ] 'credential_name'
The name of the credential to use to log in to the master server. The name provided must be the name of an existing credential. Either credential_name or credential_id must be specified.
[ @credential_id= ] credential_id
The identifier for the credential to use to log in to the master server. The identifier must be an identifier for an existing credential. Either credential_name or credential_id must be specified.
0 (success) or 1 (failure)
None.
[!INCLUDEssNoVersion] uses credentials to store the user name and password information that a target server uses to log in to a master server. This procedure sets the credential that [!INCLUDEssNoVersion] Agent for this target server uses to log in to the master server.
The credential specified must be an existing credential. For more information about creating a credential, see CREATE CREDENTIAL (Transact-SQL).
Execute permissions for sp_msx_set_account default to members of the sysadmin fixed server role.
The following example sets this server to use the credential MsxAccount to log in to the master server.
USE msdb ;
GO
EXECUTE dbo.sp_msx_set_account @credential_name = MsxAccount ;
GO
SQL Server Agent Stored Procedures (Transact-SQL)
CREATE CREDENTIAL (Transact-SQL)
sp_msx_get_account (Transact-SQL)