sp_pdw_add_network_credentials (SQL Data Warehouse)

APPLIES TO: noSQL Server noAzure SQL Database yesAzure SQL Data Warehouse yesParallel Data Warehouse

This stores network credentials in SQL Data Warehouse and associates them with a server. For example, use this stored procedure to give SQL Data Warehouse 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.

Topic link icon Transact-SQL Syntax Conventions (Transact-SQL)


-- Syntax for Azure SQL Data Warehouse and Parallel Data Warehouse  
sp_pdw_add_network_credentials 'target_server_name',  'user_name', ꞌpasswordꞌ  


Specifies the target server host name or IP address. SQL Data Warehouse will access this server by using the username and password credentials passed to this stored procedure.

To connect through the InfiniBand network, use the InfiniBand IP address of the target server.

target_server_name is defined as nvarchar(337).

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 is defined as nvarchar (513).

Specifies the password for user_name.

Return Code Values

0 (success) or 1 (failure)


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

This stored procedure adds network credentials to the NetworkService account for SQL Data Warehouse. The NetworkService account runs each instance of SMP SQL Server on the Control node and the Compute nodes. 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.

Examples: Azure SQL Data Warehouse and Parallel Data Warehouse

A. Add credentials for performing a database backup

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 The user seattle\david has read/write permissions to the target server. SQL Data Warehouse 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 '', 'seattle\david', '********';  

The backup command requires that the server name be entered as an IP address.


To perform the database backup over InfiniBand, be sure to use the InfiniBand IP address of the backup server.

See Also

sp_pdw_remove_network_credentials (SQL Data Warehouse)