SQL Server 2008链接服务器安全性

时间:2021-11-14 02:57:24

From server1, I've created a connection to a remote server (server2) with the Linked Server facilities. Both servers are on the same domain. When I log to server1 I can successfully execute my stored procedures from SQL Server Management Studio but when I execute my stored procedures from my browser application I get the following error on server 2.

从server1中,我创建了一个与远程服务器(server2)的连接,该连接具有链接的服务器设施。两个服务器都位于同一个域中。当我登录到server1时,我可以从SQL Server Management Studio成功地执行我的存储过程,但是当我从浏览器应用程序执行我的存储过程时,我在Server 2上得到以下错误。

Error: 18456, Severity: 14, State: 58.
Login failed for user 'sa'. An attempt to login using SQL authentication failed.
Server is configured for Windows authentication only.

错误:18456,严重程度:14,状态:58。用户“sa”登录失败。尝试使用SQL身份验证登录失败。服务器仅被配置为Windows身份验证。

I've searched the Internet and * for solutions but I'm not sure what's the best way to solve this issue. I'm sure it involves adding/changing database security settings but I'm unsure where to make these changes.

我搜索了互联网和*来寻找解决方案,但是我不确定解决这个问题的最好方法是什么。我确信这包括添加/更改数据库安全设置,但我不确定在哪里进行这些更改。

Thanks in advance.

提前谢谢。

1 个解决方案

#1


0  

Right-click the server in Enterprise Manager, select properties, goto Security, and change to SQL Server and Windows Authentication mode.

在Enterprise Manager中右键单击服务器,选择properties、goto安全性并更改为SQL server和Windows身份验证模式。

SQL Server 2008链接服务器安全性

Mixed mode is required if you want to use sa or any other sql-account for authentication. However i believe that the recommended way is to keep the server at Windows authentication mode, and use domain accounts for authentication. The sa-account is the quick and dirty way.

如果您想使用sa或任何其他sql帐户进行身份验证,则需要混合模式。但是我认为推荐的方法是将服务器保持在Windows身份验证模式,并使用域帐户进行身份验证。sa账户是一种快速而肮脏的方式。

If you have the exact same security setup on both servers, the link between them should work if you select "Be made using the login's current security context" in the linked server properties. That way, the account will be "inherited" in the connection to the linked server.

如果您在两个服务器上都有完全相同的安全设置,那么如果您在链接服务器属性中选择“使用登录当前的安全上下文”,那么它们之间的链接应该可以工作。这样,帐户将在连接到链接服务器的连接中“继承”。

SQL Server 2008链接服务器安全性

Check under Security - Logins on each of the server so that the same account is added to both servers. Also check the properties of both entries, under Server Roles you can try to add the sysadmin-role to make sure the accounts will have access to all databases on the server. You should however limit this access in live environments :)

在“安全”下进行检查——在每个服务器上登录,以便在两个服务器上添加相同的帐户。还要检查两个条目的属性,在服务器角色下,您可以尝试添加sysadmin-role,以确保帐户能够访问服务器上的所有数据库。但是,您应该在活动环境中限制这种访问:)

SQL Server 2008链接服务器安全性

#1


0  

Right-click the server in Enterprise Manager, select properties, goto Security, and change to SQL Server and Windows Authentication mode.

在Enterprise Manager中右键单击服务器,选择properties、goto安全性并更改为SQL server和Windows身份验证模式。

SQL Server 2008链接服务器安全性

Mixed mode is required if you want to use sa or any other sql-account for authentication. However i believe that the recommended way is to keep the server at Windows authentication mode, and use domain accounts for authentication. The sa-account is the quick and dirty way.

如果您想使用sa或任何其他sql帐户进行身份验证,则需要混合模式。但是我认为推荐的方法是将服务器保持在Windows身份验证模式,并使用域帐户进行身份验证。sa账户是一种快速而肮脏的方式。

If you have the exact same security setup on both servers, the link between them should work if you select "Be made using the login's current security context" in the linked server properties. That way, the account will be "inherited" in the connection to the linked server.

如果您在两个服务器上都有完全相同的安全设置,那么如果您在链接服务器属性中选择“使用登录当前的安全上下文”,那么它们之间的链接应该可以工作。这样,帐户将在连接到链接服务器的连接中“继承”。

SQL Server 2008链接服务器安全性

Check under Security - Logins on each of the server so that the same account is added to both servers. Also check the properties of both entries, under Server Roles you can try to add the sysadmin-role to make sure the accounts will have access to all databases on the server. You should however limit this access in live environments :)

在“安全”下进行检查——在每个服务器上登录,以便在两个服务器上添加相同的帐户。还要检查两个条目的属性,在服务器角色下,您可以尝试添加sysadmin-role,以确保帐户能够访问服务器上的所有数据库。但是,您应该在活动环境中限制这种访问:)

SQL Server 2008链接服务器安全性