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

適用於: 否SQL Server 否Azure SQL Database 是Azure SQL 資料倉儲 是平行處理資料倉儲 APPLIES TO: noSQL Server noAzure SQL Database yesAzure SQL Data Warehouse 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

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

引數Arguments

'target_server_name''target_server_name'
指定的目標伺服器主機名稱或 IP 位址。Specifies the target server host name or IP address. 若要存取此伺服器的認證將會移除從SQL 資料倉儲SQL Data WarehouseCredentials 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)

PermissionsPermissions

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

錯誤處理Error Handling

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

一般備註General Remarks

這個預存程序會移除的 NetworkService 帳戶中的網路認證SQL 資料倉儲SQL Data WarehouseThis stored procedure removes network credentials from the NetworkService account for SQL 資料倉儲SQL Data Warehouse. NetworkService 帳戶執行每個執行個體的 SMPSQL 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.

中繼資料Metadata

若要列出所有認證,並確認已移除認證,請使用sys.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 SQL 資料倉儲Azure SQL Data Warehouse平行處理資料倉儲Parallel Data WarehouseExamples: Azure SQL 資料倉儲Azure SQL Data Warehouse and 平行處理資料倉儲Parallel Data Warehouse

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

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

EXEC sp_pdw_remove_network_credentials '10.192.147.63';