DROP EXTERNAL DATA SOURCE (Transact-SQL)

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

Removes a PolyBase external data source.

Topic link icon Transact-SQL Syntax Conventions

Syntax

-- Drop an external data source  
DROP EXTERNAL DATA SOURCE external_data_source_name  
[;]  

Arguments

external_data_source_name
The name of the external data source to drop.

Metadata

To view a list of external data sources use the sys.external_data_sources system view.

SELECT * FROM sys.external_data_sources;  

Permissions

Requires ALTER ANY EXTERNAL DATA SOURCE.

Locking

Takes a shared lock on the external data source object.

General Remarks

Dropping an external data source does not remove the external data.

Examples

A. Using basic syntax

DROP EXTERNAL DATA SOURCE mydatasource;  

See Also

CREATE EXTERNAL DATA SOURCE (Transact-SQL)