简体   繁体   English

如何授予对sql身份验证帐户的访问权限以访问链接服务器

[英]how to grant access to a sql authentication account to access linked server

how to grant access to a sql authentication account to access linked server? 如何授予访问sql身份验证帐户访问链接服务器的权限?

Thanks 谢谢

This will depend on the security context you have set up in your linked server. 这取决于您在链接服务器中设置的安全上下文。 If you have it set to... 如果你把它设置为......

  • Use the current security context: you need to ensure that the sql authenticated account is created on BOTH servers with the same username and password 使用当前的安全上下文:您需要确保在具有相同用户名和密码的BOTH服务器上创建sql身份验证帐户
  • Use a specific security context: you need to map the local sql authenticated account to the remote authenticated account on the linked server setup page 使用特定的安全上下文:您需要将本地sql身份验证的帐户映射到链接服务器设置页面上的远程身份验证帐户

IMHO the first option is the simpliset method which we have used to good effect in the past but it does require you have admin permissions on both servers to set up the accounts 恕我直言,第一个选项是我们在过去使用效果很好的simpliset方法,但它确实需要你在两台服务器上拥有管理员权限来设置帐户

you should go through this http://msdn.microsoft.com/en-us/library/ms190479.aspx 你应该通过这个http://msdn.microsoft.com/en-us/library/ms190479.aspx

The following example creates a linked server S1_instance1 on an instance of SQL Server by using the SQL Server Native Client OLE DB provider. 以下示例使用SQL Server Native Client OLE DB提供程序在SQL Server实例上创建链接服务器S1_instance1。

 EXEC sp_addlinkedserver      
 @server=N'S1_instance1',    
 @srvproduct=N'',   
 @provider=N'SQLNCLI',    
 @datasrc=N'S1\instance1';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM