sp_pdw_remove_network_credentials (SQL 資料倉儲)sp_pdw_remove_network_credentials (SQL Data Warehouse)

適用於: 否SQL Server 否Azure SQL Database 是Azure Synapse Analytics (SQL DW) 是平行處理資料倉儲 APPLIES TO: noSQL Server noAzure SQL Database yesAzure Synapse Analytics (SQL DW) yesParallel Data Warehouse

這會移除儲存在 SQL 資料倉儲SQL Data Warehouse 中以存取網路檔案共用的網路認證。This removes network credentials stored in SQL 資料倉儲SQL Data Warehouse to access a network file share. 例如,您可以使用這個預存程式來移除 SQL 資料倉儲SQL Data Warehouse 的許可權,以在位於您自己網路中的伺服器上執行備份和還原作業。For example, use this stored procedure to remove permission for SQL 資料倉儲SQL Data Warehouse to perform backup and restore operations on a server that resides within your own network.

主題連結圖示 Transact-SQL 語法慣例 (Transact-SQL)Topic link icon Transact-SQL Syntax Conventions (Transact-SQL)


-- Syntax for Azure SQL Data Warehouse and Parallel Data Warehouse  
sp_pdw_remove_network_credentials 'target_server_name'  


指定目標伺服器主機名稱或 IP 位址。Specifies the target server host name or IP address. 將會從 SQL 資料倉儲SQL Data Warehouse移除存取此伺服器的認證。Credentials to access this server will be removed from SQL 資料倉儲SQL Data Warehouse. 這不會變更或移除您自己小組所管理之實際目標伺服器上的任何許可權。This does not change or remove any permissions on the actual target server which is managed by your own team.

target_server_name定義為 Nvarchar (337)。target_server_name is defined as nvarchar(337).

傳回碼值Return Code Values

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



錯誤處理Error Handling

如果在控制節點和所有計算節點上移除認證失敗,就會發生錯誤。An error occurs if removing credentials does not succeed on the Control node and all Compute nodes.

一般備註General Remarks

這個預存程式會從 SQL 資料倉儲SQL Data Warehouse的 NetworkService 帳戶移除網路認證。This stored procedure removes network credentials from the NetworkService account for SQL 資料倉儲SQL Data Warehouse. NetworkService 帳戶會在控制節點和計算節點上執行 SMP SQL ServerSQL Server 的每個實例。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 access the target server.


若要列出所有認證,並確認已移除認證,請使用sys.databases dm_pdw_network_credentials (transact-sql)To list all credentials and to verify the credentials have been removed, use sys.dm_pdw_network_credentials (Transact-SQL).

若要新增認證,請(使用)sp_pdw_add_network_credentials SQL 資料倉儲To add credentials, use sp_pdw_add_network_credentials (SQL Data Warehouse).

範例:Azure Synapse Analytics (SQL DW)Azure Synapse Analytics (SQL DW)平行處理資料倉儲Parallel Data WarehouseExamples: Azure Synapse Analytics (SQL DW)Azure Synapse Analytics (SQL DW) and 平行處理資料倉儲Parallel Data Warehouse

A.A. 移除用來執行資料庫備份的認證Remove credentials for performing a database backup

下列範例會移除使用者名稱和密碼認證,以便存取 IP 位址為10.192.147.63 的目標伺服器。The following example removes user name and password credentials for accessing the target server which has an IP address of

EXEC sp_pdw_remove_network_credentials '';