EXECUTE ... AT DATA_SOURCE
pass-through to an external data source
What changes
- Input
- command string
- Output or change
- results from an external data source
Syntax at a glance
EXEC ( 'command' ) AT DATA_SOURCE data_source_name
Work example
A batch needs to execute a bounded statement at a configured external data source.
Check the source owner, provider, identity, and allowed operation. Use synthetic data and keep credentials out of the statement.
Check your work EXECUTE ... AT DATA_SOURCE. The statement reaches only the approved source and returns the expected columns through its configured identity.
Open Microsoft Learn for full syntax, permissions, and details for your version.