-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be26f39
commit 77b9d2b
Showing
141 changed files
with
18,507 additions
and
18,507 deletions.
There are no files selected for viewing
24 changes: 12 additions & 12 deletions
24
...ctor/CollectionSet/CollectionSet.database → ...ctor/CollectionSet/CollectionSet.database
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<Database xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0" dwd:design-time-name="7ff953f2-4687-4999-8110-0147f2ec253d" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"> | ||
<ID>CollectionSet</ID> | ||
<Name>CollectionSet</Name> | ||
<CreatedTimestamp>0001-01-01T00:00:00Z</CreatedTimestamp> | ||
<LastSchemaUpdate>0001-01-01T00:00:00Z</LastSchemaUpdate> | ||
<LastProcessed>0001-01-01T00:00:00Z</LastProcessed> | ||
<State>Unprocessed</State> | ||
<LastUpdate>0001-01-01T00:00:00Z</LastUpdate> | ||
<DataSourceImpersonationInfo> | ||
<ImpersonationMode>Default</ImpersonationMode> | ||
<ImpersonationInfoSecurity>Unchanged</ImpersonationInfoSecurity> | ||
</DataSourceImpersonationInfo> | ||
<Database xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0" dwd:design-time-name="7ff953f2-4687-4999-8110-0147f2ec253d" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"> | ||
<ID>CollectionSet</ID> | ||
<Name>CollectionSet</Name> | ||
<CreatedTimestamp>0001-01-01T00:00:00Z</CreatedTimestamp> | ||
<LastSchemaUpdate>0001-01-01T00:00:00Z</LastSchemaUpdate> | ||
<LastProcessed>0001-01-01T00:00:00Z</LastProcessed> | ||
<State>Unprocessed</State> | ||
<LastUpdate>0001-01-01T00:00:00Z</LastUpdate> | ||
<DataSourceImpersonationInfo> | ||
<ImpersonationMode>Default</ImpersonationMode> | ||
<ImpersonationInfoSecurity>Unchanged</ImpersonationInfoSecurity> | ||
</DataSourceImpersonationInfo> | ||
</Database> |
110 changes: 55 additions & 55 deletions
110
...lector/CollectionSet/CollectionSet.dtproj → ...lector/CollectionSet/CollectionSet.dtproj
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<ProductVersion>10.50.4000.0</ProductVersion> | ||
<SchemaVersion>9.0.1.0</SchemaVersion> | ||
<State>$base64$PFNvdXJjZUNvbnRyb2xJbmZvIHhtbG5zOnhzZD0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||
<DataSources /> | ||
<DataSourceViews /> | ||
<MiningModels /> | ||
<Roles /> | ||
<Miscellaneous /> | ||
<Configurations> | ||
<Configuration> | ||
<Name>Development</Name> | ||
<Options> | ||
<OutputPath>bin</OutputPath> | ||
<ConnectionMappings /> | ||
<ConnectionProviderMappings /> | ||
<ConnectionSecurityMappings /> | ||
<DatabaseStorageLocations /> | ||
</Options> | ||
</Configuration> | ||
</Configurations> | ||
<DTSPackages> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>ExtendedTSQLCollect.dtsx</Name> | ||
<FullPath>ExtendedTSQLCollect.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>ExtendedTSQLUpload.dtsx</Name> | ||
<FullPath>ExtendedTSQLUpload.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>test.dtsx</Name> | ||
<FullPath>test.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>ExtendedXEReaderUpload.dtsx</Name> | ||
<FullPath>ExtendedXEReaderUpload.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>ExtendedXEReaderCollect.dtsx</Name> | ||
<FullPath>ExtendedXEReaderCollect.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
</DTSPackages> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<ProductVersion>10.50.4000.0</ProductVersion> | ||
<SchemaVersion>9.0.1.0</SchemaVersion> | ||
<State>$base64$PFNvdXJjZUNvbnRyb2xJbmZvIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOmRkbDI9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDAzL2VuZ2luZS8yIiB4bWxuczpkZGwyXzI9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDAzL2VuZ2luZS8yLzIiIHhtbG5zOmRkbDEwMF8xMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDA4L2VuZ2luZS8xMDAvMTAwIiB4bWxuczpkZGwyMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEwL2VuZ2luZS8yMDAiIHhtbG5zOmRkbDIwMF8yMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEwL2VuZ2luZS8yMDAvMjAwIiB4bWxuczpkd2Q9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vRGF0YVdhcmVob3VzZS9EZXNpZ25lci8xLjAiPg0KICA8RW5hYmxlZD5mYWxzZTwvRW5hYmxlZD4NCiAgPFByb2plY3ROYW1lPjwvUHJvamVjdE5hbWU+DQogIDxBdXhQYXRoPjwvQXV4UGF0aD4NCiAgPExvY2FsUGF0aD48L0xvY2FsUGF0aD4NCiAgPFByb3ZpZGVyPjwvUHJvdmlkZXI+DQo8L1NvdXJjZUNvbnRyb2xJbmZvPg==</State> | ||
<Database> | ||
<Name>CollectionSet.database</Name> | ||
<FullPath>CollectionSet.database</FullPath> | ||
</Database> | ||
<Cubes /> | ||
<Dimensions /> | ||
<DataSources /> | ||
<DataSourceViews /> | ||
<MiningModels /> | ||
<Roles /> | ||
<Miscellaneous /> | ||
<Configurations> | ||
<Configuration> | ||
<Name>Development</Name> | ||
<Options> | ||
<OutputPath>bin</OutputPath> | ||
<ConnectionMappings /> | ||
<ConnectionProviderMappings /> | ||
<ConnectionSecurityMappings /> | ||
<DatabaseStorageLocations /> | ||
</Options> | ||
</Configuration> | ||
</Configurations> | ||
<DTSPackages> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>ExtendedTSQLCollect.dtsx</Name> | ||
<FullPath>ExtendedTSQLCollect.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>ExtendedTSQLUpload.dtsx</Name> | ||
<FullPath>ExtendedTSQLUpload.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>test.dtsx</Name> | ||
<FullPath>test.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>ExtendedXEReaderUpload.dtsx</Name> | ||
<FullPath>ExtendedXEReaderUpload.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
<DtsPackage FormatVersion="3"> | ||
<Name>ExtendedXEReaderCollect.dtsx</Name> | ||
<FullPath>ExtendedXEReaderCollect.dtsx</FullPath> | ||
<References /> | ||
</DtsPackage> | ||
</DTSPackages> | ||
</Project> |
34 changes: 17 additions & 17 deletions
34
...Collector/CollectionSet/CollectionSet.sln → ...Collector/CollectionSet/CollectionSet.sln
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 10.00 | ||
# Visual Studio 2008 | ||
Project("{D183A3D8-5FD8-494B-B014-37F57B35E655}") = "CollectionSet", "CollectionSet.dtproj", "{45E6363D-4821-47D8-BBA8-AA94C232A193}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Development|Default = Development|Default | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{45E6363D-4821-47D8-BBA8-AA94C232A193}.Development|Default.ActiveCfg = Development | ||
{45E6363D-4821-47D8-BBA8-AA94C232A193}.Development|Default.Build.0 = Development | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal | ||
|
||
Microsoft Visual Studio Solution File, Format Version 10.00 | ||
# Visual Studio 2008 | ||
Project("{D183A3D8-5FD8-494B-B014-37F57B35E655}") = "CollectionSet", "CollectionSet.dtproj", "{45E6363D-4821-47D8-BBA8-AA94C232A193}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Development|Default = Development|Default | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{45E6363D-4821-47D8-BBA8-AA94C232A193}.Development|Default.ActiveCfg = Development | ||
{45E6363D-4821-47D8-BBA8-AA94C232A193}.Development|Default.Build.0 = Development | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
108 changes: 54 additions & 54 deletions
108
...ctor/CollectionSet/CollectionSetSetup.sql → ...ctor/CollectionSet/CollectionSetSetup.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
|
||
----------------------------------------------------------------------------- | ||
/* | ||
====== | ||
Create Collection Set | ||
====== | ||
*/ | ||
-- Create the collection set | ||
RAISERROR ('Creating collection set "Single-use Cached Plans"...',0, 1) WITH NOWAIT; | ||
DECLARE @schedule_uid UNIQUEIDENTIFIER; | ||
SELECT @schedule_uid = (select schedule_uid from sysschedules_localserver_view where name=N'CollectorSchedule_Every_6h'); | ||
DECLARE @collection_set_id INT; | ||
EXEC dbo.sp_syscollector_create_collection_set | ||
@name = N'Single Use Cached Plans', | ||
@schedule_uid = @schedule_uid, -- 6 hours | ||
@collection_mode = 0, -- noncached | ||
@days_until_expiration = 30, -- retain stats for 30 days | ||
@description = N'Collects Single Use Cached Plans', | ||
@collection_set_id = @collection_set_id output, | ||
@collection_set_uid = '989413FA-FB42-4B99-A8D1-40C658C8DA6C'; | ||
|
||
|
||
|
||
-- Create a collection item to capture cached plans | ||
DECLARE @parameters xml; | ||
DECLARE @collection_item_id INT; | ||
SELECT @parameters = convert(xml, N' | ||
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType"> | ||
<Query> | ||
<Value> | ||
SELECT TOP(50) T.[text] AS [QueryText], cp.size_in_bytes, CAST(P.query_plan AS nvarchar(max)) AS query_plan | ||
FROM sys.dm_exec_cached_plans AS cp WITH (NOLOCK) | ||
CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS T | ||
CROSS APPLY sys.dm_exec_query_plan(plan_handle) AS P | ||
WHERE cp.cacheobjtype = N''Compiled Plan'' | ||
AND cp.objtype = N''Adhoc'' | ||
AND cp.usecounts = 1 | ||
ORDER BY cp.size_in_bytes DESC OPTION (RECOMPILE); | ||
</Value> | ||
<OutputTable>cached_plans</OutputTable> | ||
</Query> | ||
</ns:TSQLQueryCollector> | ||
'); | ||
|
||
RAISERROR ('Creating collection item "Single Use Cached Plans"...',0, 1) WITH NOWAIT; | ||
EXEC dbo.sp_syscollector_create_collection_item | ||
@collection_set_id = @collection_set_id, | ||
@collector_type_uid = N'FD34D746-9A4D-4901-B872-3AF7CDBF7D37', -- Collector Type | ||
@name = 'Single Use Cached Plans Collection Item', | ||
@frequency = 60, | ||
@parameters = @parameters, | ||
@collection_item_id = @collection_item_id OUTPUT; | ||
|
||
GO | ||
|
||
----------------------------------------------------------------------------- | ||
/* | ||
====== | ||
Create Collection Set | ||
====== | ||
*/ | ||
-- Create the collection set | ||
RAISERROR ('Creating collection set "Single-use Cached Plans"...',0, 1) WITH NOWAIT; | ||
DECLARE @schedule_uid UNIQUEIDENTIFIER; | ||
SELECT @schedule_uid = (select schedule_uid from sysschedules_localserver_view where name=N'CollectorSchedule_Every_6h'); | ||
DECLARE @collection_set_id INT; | ||
EXEC dbo.sp_syscollector_create_collection_set | ||
@name = N'Single Use Cached Plans', | ||
@schedule_uid = @schedule_uid, -- 6 hours | ||
@collection_mode = 0, -- noncached | ||
@days_until_expiration = 30, -- retain stats for 30 days | ||
@description = N'Collects Single Use Cached Plans', | ||
@collection_set_id = @collection_set_id output, | ||
@collection_set_uid = '989413FA-FB42-4B99-A8D1-40C658C8DA6C'; | ||
|
||
|
||
|
||
-- Create a collection item to capture cached plans | ||
DECLARE @parameters xml; | ||
DECLARE @collection_item_id INT; | ||
SELECT @parameters = convert(xml, N' | ||
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType"> | ||
<Query> | ||
<Value> | ||
SELECT TOP(50) T.[text] AS [QueryText], cp.size_in_bytes, CAST(P.query_plan AS nvarchar(max)) AS query_plan | ||
FROM sys.dm_exec_cached_plans AS cp WITH (NOLOCK) | ||
CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS T | ||
CROSS APPLY sys.dm_exec_query_plan(plan_handle) AS P | ||
WHERE cp.cacheobjtype = N''Compiled Plan'' | ||
AND cp.objtype = N''Adhoc'' | ||
AND cp.usecounts = 1 | ||
ORDER BY cp.size_in_bytes DESC OPTION (RECOMPILE); | ||
</Value> | ||
<OutputTable>cached_plans</OutputTable> | ||
</Query> | ||
</ns:TSQLQueryCollector> | ||
'); | ||
|
||
RAISERROR ('Creating collection item "Single Use Cached Plans"...',0, 1) WITH NOWAIT; | ||
EXEC dbo.sp_syscollector_create_collection_item | ||
@collection_set_id = @collection_set_id, | ||
@collector_type_uid = N'FD34D746-9A4D-4901-B872-3AF7CDBF7D37', -- Collector Type | ||
@name = 'Single Use Cached Plans Collection Item', | ||
@frequency = 60, | ||
@parameters = @parameters, | ||
@collection_item_id = @collection_item_id OUTPUT; | ||
|
||
GO |
Oops, something went wrong.