Created
March 26, 2016 21:33
-
-
Save matt40k/5e0ce19d66216a25be02 to your computer and use it in GitHub Desktop.
Create SSAS query log table SQL script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE [dbo].[OlapQueryLog] | |
( | |
[MSOLAP_Database] NVARCHAR(255) NULL, | |
[MSOLAP_Path] NVARCHAR(400) NULL, | |
[MSOLAP_User] NVARCHAR(255) NULL, | |
[Dataset] NVARCHAR(4000) NULL, | |
[StartTime] DATETIME NULL, | |
[Duration] BIGINT NULL | |
) | |
GO | |
EXEC sp_addextendedproperty @name = N'MS_Description', | |
@value = N'The ID of the database used in the query. ', | |
@level0type = N'SCHEMA', | |
@level0name = N'dbo', | |
@level1type = N'TABLE', | |
@level1name = N'OlapQueryLog', | |
@level2type = N'COLUMN', | |
@level2name = N'MSOLAP_Database' | |
GO | |
EXEC sp_addextendedproperty @name = N'MS_Description', | |
@value = N'The path to the partition.', | |
@level0type = N'SCHEMA', | |
@level0name = N'dbo', | |
@level1type = N'TABLE', | |
@level1name = N'OlapQueryLog', | |
@level2type = N'COLUMN', | |
@level2name = N'MSOLAP_Path' | |
GO | |
EXEC sp_addextendedproperty @name = N'MS_Description', | |
@value = N'The name of the user who ran the query.', | |
@level0type = N'SCHEMA', | |
@level0name = N'dbo', | |
@level1type = N'TABLE', | |
@level1name = N'OlapQueryLog', | |
@level2type = N'COLUMN', | |
@level2name = N'MSOLAP_User' | |
GO | |
EXEC sp_addextendedproperty @name = N'MS_Description', | |
@value = N'A numeric string indicating the attribute from each dimension used to satisfy the query.', | |
@level0type = N'SCHEMA', | |
@level0name = N'dbo', | |
@level1type = N'TABLE', | |
@level1name = N'OlapQueryLog', | |
@level2type = N'COLUMN', | |
@level2name = N'Dataset' | |
GO | |
EXEC sp_addextendedproperty @name = N'MS_Description', | |
@value = N'The time the query began ', | |
@level0type = N'SCHEMA', | |
@level0name = N'dbo', | |
@level1type = N'TABLE', | |
@level1name = N'OlapQueryLog', | |
@level2type = N'COLUMN', | |
@level2name = N'StartTime' | |
GO | |
EXEC sp_addextendedproperty @name = N'MS_Description', | |
@value = N'The length of time (in milliseconds) of the query execution.', | |
@level0type = N'SCHEMA', | |
@level0name = N'dbo', | |
@level1type = N'TABLE', | |
@level1name = N'OlapQueryLog', | |
@level2type = N'COLUMN', | |
@level2name = N'Duration' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment