(Azure Synapse Analytics sp_pdw_add_network_credentials) sp_pdw_add_network_credentials (Azure Synapse Analytics)

适用于:Applies to: 是Azure Synapse AnalyticsAzure Synapse AnalyticsyesAzure Synapse AnalyticsAzure Synapse Analytics 是并行数据仓库Parallel Data Warehouseyes并行数据仓库Parallel Data Warehouse适用于:Applies to: 是Azure Synapse AnalyticsAzure Synapse AnalyticsyesAzure Synapse AnalyticsAzure Synapse Analytics 是并行数据仓库Parallel Data Warehouseyes并行数据仓库Parallel Data Warehouse

这会在中存储网络凭据 Azure Synapse AnalyticsAzure Synapse Analytics ,并将其与服务器关联。This stores network credentials in Azure Synapse AnalyticsAzure Synapse Analytics and associates them with a server. 例如,使用此存储过程可提供 Azure Synapse AnalyticsAzure Synapse Analytics 适当的读/写权限,以便在目标服务器上执行数据库备份和还原操作,或创建用于 TDE 的证书的备份。For example, use this stored procedure to give Azure Synapse AnalyticsAzure Synapse Analytics appropriate read/write permissions to perform database backup and restore operations on a target server, or to create a backup of a certificate used for TDE.

主题链接图标 Transact-SQL 语法约定 (Transact-SQL)Topic link icon Transact-SQL Syntax Conventions (Transact-SQL)

语法Syntax

-- Syntax for Azure Synapse Analytics and Parallel Data Warehouse  
  
sp_pdw_add_network_credentials 'target_server_name',  'user_name', 'password'  

备注

Azure Synapse Analytics 中的无服务器 SQL 池不支持此语法。This syntax is not supported by serverless SQL pool in Azure Synapse Analytics.

参数Arguments

"target_server_name"'target_server_name'
指定目标服务器主机名或 IP 地址。Specifies the target server host name or IP address. Azure Synapse AnalyticsAzure Synapse Analytics 将使用传递到此存储过程的用户名和密码凭据访问此服务器。will access this server by using the username and password credentials passed to this stored procedure.

若要通过未使用的网络进行连接,请使用目标服务器的未使用的 IP 地址。To connect through the InfiniBand network, use the InfiniBand IP address of the target server.

target_server_name 定义为 nvarchar (337) 。target_server_name is defined as nvarchar(337).

'user_name''user_name'
指定有权访问目标服务器的 user_name。Specifies the user_name that has permissions to access the target server. 如果目标服务器已有凭据,则这些凭据将更新为新凭据。If credentials already exist for the target server, they will be updated to the new credentials.

user_name 定义为 nvarchar (513) 。user_name is defined as nvarchar (513).

'password"'password
指定 user_name 的密码。Specifies the password for user_name.

返回代码值Return Code Values

0(成功)或 1(失败)0 (success) or 1 (failure)

权限Permissions

需要 ALTER SERVER STATE 权限。Requires ALTER SERVER STATE permission.

错误处理Error Handling

如果在控制节点和所有计算节点上添加凭据失败,则会发生错误。An error occurs if adding credentials does not succeed on the Control node and all Compute nodes.

一般备注General Remarks

此存储过程将向的 NetworkService 帐户添加网络凭据 Azure Synapse AnalyticsAzure Synapse AnalyticsThis stored procedure adds network credentials to the NetworkService account for Azure Synapse AnalyticsAzure Synapse Analytics. NetworkService 帐户 SQL ServerSQL Server 在控制节点和计算节点上运行 SMP 的每个实例。The NetworkService account runs each instance of SMP SQL ServerSQL Server on the Control node and the Compute nodes. 例如,在运行备份操作时,控制节点和每个计算节点将使用 NetworkService 帐户凭据获取目标服务器的读取和写入权限。For example, when a backup operation runs, the Control node and each Compute node will use the NetworkService account credentials to gain read and write permission to the target server.

示例:Azure Synapse AnalyticsAzure Synapse Analytics并行数据仓库Parallel Data WarehouseExamples: Azure Synapse AnalyticsAzure Synapse Analytics and 并行数据仓库Parallel Data Warehouse

A.A. 添加用于执行数据库备份的凭据Add credentials for performing a database backup

下面的示例将域用户 seattle\david 的用户名和密码凭据与 IP 地址为10.172.63.255 的目标服务器相关联。The following example associates the user name and password credentials for the domain user seattle\david with a target server that has an IP address of 10.172.63.255. 用户 seattle\david 对目标服务器具有读/写权限。The user seattle\david has read/write permissions to the target server. Azure Synapse AnalyticsAzure Synapse Analytics 将存储这些凭据,并根据备份和还原操作的需要,使用这些凭据在目标服务器上进行读取和写入。will store these credentials and use them to read and write to and from the target server, as necessary for backup and restore operations.

EXEC sp_pdw_add_network_credentials '10.172.63.255', 'seattle\david', '********';  

Backup 命令要求以 IP 地址的形式输入服务器名称。The backup command requires that the server name be entered as an IP address.

备注

若要通过不受带宽执行数据库备份,请确保使用备份服务器的未受控制的 IP 地址。To perform the database backup over InfiniBand, be sure to use the InfiniBand IP address of the backup server.

另请参阅See Also

(Azure Synapse Analytics sp_pdw_remove_network_credentials)sp_pdw_remove_network_credentials (Azure Synapse Analytics)