Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save perfectly-panda/df20b0bf94ddb0a7e6941026b29839a0 to your computer and use it in GitHub Desktop.
Save perfectly-panda/df20b0bf94ddb0a7e6941026b29839a0 to your computer and use it in GitHub Desktop.
Create External Table (Azure SQL)
//nothing special here, I just got tired of digging this up from MSDN
CREATE EXTERNAL TABLE [dbo].[all_dm_exec_requests](
[session_id] smallint NOT NULL,
[request_id] int NOT NULL,
[start_time] datetime NOT NULL,
[status] nvarchar(30) NOT NULL,
[command] nvarchar(32) NOT NULL,
[sql_handle] varbinary(64),
[statement_start_offset] int,
[statement_end_offset] int,
[cpu_time] int NOT NULL)
WITH
(
DATA_SOURCE = MyExtSrc,
SCHEMA_NAME = 'sys',
OBJECT_NAME = 'dm_exec_requests'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment