Export (0) Print
Expand All
Expand Minimize

sp_grant_login_to_proxy (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Grants a security principal access to a proxy.

Applies to: SQL Server (SQL Server 2008 through current version).

Topic link icon Transact-SQL Syntax Conventions

sp_grant_login_to_proxy 
     { [ @login_name = ] 'login_name' 
     | [ @fixed_server_role = ] 'fixed_server_role' 
     | [ @msdb_role = ] 'msdb_role' } , 
     { [ @proxy_id = ] id | [ @proxy_name = ] 'proxy_name' }

[ @login_name = ] 'login_name'

The login name to grant access to. The login_name is nvarchar(256), with a default of NULL. One of @login_name, @fixed_server_role, or @msdb_role must be specified, or the stored procedure fails.

[ @fixed_server_role= ] 'fixed_server_role'

The fixed server role to grant access to. The fixed_server_role is nvarchar(256), with a default of NULL. One of @login_name, @fixed_server_role, or @msdb_role must be specified, or the stored procedure fails.

[ @msdb_role= ] 'msdb_role'

The database role in the msdb database to grant access to. The msdb_role is nvarchar(256), with a default of NULL. One of @login_name, @fixed_server_role, or @msdb_role must be specified, or the stored procedure fails.

[ @proxy_id= ] id

The identifier for the proxy to grant access for. The id is int, with a default of NULL. One of @proxy_id or @proxy_name must be specified, or the stored procedure fails.

[ @proxy_name= ] 'proxy_name'

The name of the proxy to grant access for. The proxy_name is nvarchar(256), with a default of NULL. One of @proxy_id or @proxy_name must be specified, or the stored procedure fails.

0 (success) or 1 (failure)

sp_grant_login_to_proxy must be run from the msdb database.

Only members of the sysadmin fixed server role may execute sp_grant_login_to_proxy.

The following example allows the login adventure-works\terrid to use the proxy Catalog application proxy.

USE msdb ;
GO

EXEC dbo.sp_grant_login_to_proxy
    @login_name = N'adventure-works\terrid',
    @proxy_name = N'Catalog application proxy' ;
GO
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft