加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows-server-2008 – 用于连接到不同服务器和域上的数据库的

发布时间:2020-12-13 23:56:27 所属栏目:Windows 来源:网络整理
导读:我的数据库客户端和数据库服务器位于不同的计算机上,并且未连接到同一个域(我的Web主机不支持此功能).我不想通过连接字符串发送用户名/密码详细信息,并希望使用 Windows身份验证连接到数据库. 在this article’s概述中,它提到了这个(强调我的): When you us
我的数据库客户端和数据库服务器位于不同的计算机上,并且未连接到同一个域(我的Web主机不支持此功能).我不想通过连接字符串发送用户名/密码详细信息,并希望使用 Windows身份验证连接到数据库.

在this article’s概述中,它提到了这个(强调我的):

When you use Windows authentication to connect to SQL Server,you use
either Kerberos or NTLM authentication depending on the configuration
of your servers and domain. You might not be able to use Kerberos
authentication if:

  • Your database client and database server are separated by a firewall
    which prevents Kerberos authentication.

  • Your application server and database server are in separate domains
    with no trust.

In these situations,you can use either mirrored local accounts or SQL
authentication. With mirrored local accounts,you configure two
accounts on each server with identical user names and passwords. You
must ensure that the passwords remain the same
.

我假设这只是意味着在两台机器上创建一个具有相同用户名和密码的Windows用户,但是我怀疑这会起作用.当我在数据库客户端上为此用户添加权限时,它会在用户名前加上servername,并且在数据库服务器上创建数据库登录时会发生同样的事情.

这是创建镜像本地帐户的意义吗?如果是这样,考虑到用户在不同的域中,这是如何工作的?

您已正确理解该过程.您需要设置两个用户帐户.一个将在SQL Server主机上创建,另一个将在您要连接的客户端上创建.他们的用户名和密码应该相同.

SQL Server使用主机名或域名作为用户名的前缀,但这不是问题,如果其他用户的密码相同,则Windows身份验证机制会正确解析用户名部分并对其他用户进行身份验证.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读