为 SQLRUserGroup 创建登录名Create a login for SQLRUserGroup

适用于:Applies to: 是SQL Server 2016 (13.x)SQL Server 2016 (13.x)yesSQL Server 2016 (13.x)SQL Server 2016 (13.x) 及更高版本适用于:Applies to: 是SQL Server 2016 (13.x)SQL Server 2016 (13.x)yesSQL Server 2016 (13.x)SQL Server 2016 (13.x) and later

当脚本中的环回连接指定了信任连接,且用于执行包含代码的对象的标识是 Windows 用户帐户时,在 SQL Server 中为 SQLRUserGroup 创建登录名 。Create a login in SQL Server for SQLRUserGroup when a loop back connection in your script specifies a trusted connection, and the identity used to execute an object contains your code is a Windows user account.

信任连接是那些在连接字符串中具有 Trusted_Connection=True 的连接。Trusted connections are those having Trusted_Connection=True in the connection string. 当 SQL Server 收到指定信任连接的请求时,它将检查当前 Windows 用户的标识是否具有登录名。When SQL Server receives a request specifying a trusted connection, it checks whether the identity of the current Windows user has a login. 对于作为工作线程帐户执行的外部进程(例如 SQLRUserGroup 中的 MSSQLSERVER01),请求失败是因为默认情况下这些帐户没有登录名 。For external processes executing as a worker account (such as MSSQLSERVER01 from SQLRUserGroup), the request fails because those accounts do not have a login by default.

可以通过为 SQLServerRUserGroup 创建登录名来解决连接错误问题 。You can work around the connection error by creating a login for SQLServerRUserGroup. 有关标识和外部进程的详细信息,请参阅扩展性框架安全概述For more information about identities and external processes, see Security overview for the extensibility framework.

备注

请确保 SQLRUserGroup 具有“允许本地登录”权限 。Make sure that SQLRUserGroup has "Allow Log on locally" permissions. 默认情况下,会向所有本地新用户授予此权限,但某些组织更严格的组策略可能会禁用此权限。By default, this right is given to all new local users, but some organizations stricter group policies might disable this right.

创建登录名Create a login

  1. SQL Server Management StudioSQL Server Management Studio的“对象资源管理器”中,展开“安全性” ,右键单击“登录名” ,然后选择“新建登录名” 。In SQL Server Management StudioSQL Server Management Studio, in Object Explorer, expand Security, right-click Logins, and select New Login.

  2. 在“登录名 - 新建”对话框中,选择“搜索” 。In the Login - New dialog box, select Search. (请勿在该框中键入任何内容。)(Don't type anything in the box yet.)

    单击“搜索”为机器学习添加新的登录名Click search to add new login for machine learning

  3. 在“选择用户或组”框中,单击“对象类型”按钮 。In the Select User or Group box, click the Object Types button.

    搜索对象类型为机器学习添加新的登录名Search object types to add new login for machine learning

  4. 在“对象类型”对话框中,选择“组” 。In the Object Types dialog box, select Groups. 清除所有其他复选框。Clear all other check boxes.

    在“对象类型”对话框中选择“组”Select Groups in Object Types dialog box

  5. 单击“高级”,验证要搜索的位置是否位于当前计算机,然后单击“立即查找” 。Click Advanced, verify that the location to search is the current computer, and then click Find Now.

    单击“立即查找”获取组列表Click Find Now to get list of groups

  6. 滚动服务器上的组帐户列表,直到找到一个以 SQLRUserGroup 开头的组帐户。Scroll through the list of group accounts on the server until you find one beginning with SQLRUserGroup.

    • 无论安装的是 R 还是 Python,或者两者都已安装,与默认实例的 Launchpad 服务相关联的组名称始终为 SQLRUserGroup 。The name of the group that's associated with the Launchpad service for the default instance is always SQLRUserGroup, regardless of whether you installed R or Python or both. 仅为默认实例选择此帐户。Select this account for the default instance only.
    • 如果使用的是命名实例,则实例名称将附加到默认工作组名称 的名称之后SQLRUserGroupIf you are using a named instance, the instance name is appended to the name of the default worker group name, SQLRUserGroup. 例如,如果实例名称为“MLTEST”,则此实例的默认用户组名称将为 SQLRUserGroupMLTest 。For example, if your instance is named "MLTEST", the default user group name for this instance would be SQLRUserGroupMLTest.

    服务器上的组示例Example of groups on server

  7. 单击“确定”关闭高级搜索对话框 。Click OK to close the advanced search dialog box.

    重要

    请确保已为实例选择了正确的帐户。Be sure you've selected the correct account for the instance. 每个实例只能使用自己的 Launchpad 服务以及为该服务创建的组。Each instance can use only its own Launchpad service and the group created for that service. 实例不能共享 Launchpad 服务或工作线程帐户。Instances cannot share a Launchpad service or worker accounts.

  8. 再次单击“确定”关闭“选择用户或组”对话框 。Click OK once more to close the Select User or Group dialog box.

  9. 在“登录名 - 新建”对话框中,单击“确定” 。In the Login - New dialog box, click OK. 默认情况下,将登录名分配到 公共 角色,且有权连接到数据库引擎。By default, the login is assigned to the public role and has permission to connect to the database engine.

后续步骤Next steps