<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
  <Body>
    <ReportItems>
      <Textbox Name="Textbox2">
        <CanGrow>true</CanGrow>
        <KeepTogether>true</KeepTogether>
        <Paragraphs>
          <Paragraph>
            <TextRuns>
              <TextRun>
                <Value>="Counter and Wait Information has been Entered in the AdminMonitor database on " &amp; First(Fields!ServerName.Value, "ServerName")</Value>
                <Style>
                  <FontSize>26pt</FontSize>
                  <Color>White</Color>
                </Style>
              </TextRun>
            </TextRuns>
            <Style>
              <TextAlign>Center</TextAlign>
            </Style>
          </Paragraph>
        </Paragraphs>
        <rd:DefaultName>Textbox2</rd:DefaultName>
        <Top>0.50416in</Top>
        <Left>0.4125in</Left>
        <Height>1.96667in</Height>
        <Width>5.675in</Width>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
          <VerticalAlign>Middle</VerticalAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <PaddingBottom>2pt</PaddingBottom>
        </Style>
      </Textbox>
      <Textbox Name="Textbox1">
        <CanGrow>true</CanGrow>
        <KeepTogether>true</KeepTogether>
        <Paragraphs>
          <Paragraph>
            <TextRuns>
              <TextRun>
                <Value>Back To Deployment Page</Value>
                <Style>
                  <FontSize>22pt</FontSize>
                  <Color>DarkBlue</Color>
                </Style>
              </TextRun>
            </TextRuns>
            <Style>
              <TextAlign>Center</TextAlign>
            </Style>
          </Paragraph>
        </Paragraphs>
        <rd:DefaultName>Textbox1</rd:DefaultName>
        <ActionInfo>
          <Actions>
            <Action>
              <Drillthrough>
                <ReportName>MonitorDeployAdminMonitor</ReportName>
              </Drillthrough>
            </Action>
          </Actions>
        </ActionInfo>
        <Top>2.66666in</Top>
        <Left>0.4125in</Left>
        <Height>0.59167in</Height>
        <Width>5.675in</Width>
        <ZIndex>1</ZIndex>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
          <BackgroundColor>LightSteelBlue</BackgroundColor>
          <VerticalAlign>Middle</VerticalAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <PaddingBottom>2pt</PaddingBottom>
        </Style>
      </Textbox>
    </ReportItems>
    <Height>3.58333in</Height>
    <Style>
      <Border>
        <Style>None</Style>
      </Border>
      <BackgroundColor>DarkBlue</BackgroundColor>
    </Style>
  </Body>
  <Width>6.5in</Width>
  <Page>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
  </Page>
  <AutoRefresh>0</AutoRefresh>
  <DataSources>
    <DataSource Name="Local">
      <ConnectionProperties>
        <DataProvider>SQL</DataProvider>
        <ConnectString>Data Source=localhost;Initial Catalog=AdminMonitor</ConnectString>
        <IntegratedSecurity>true</IntegratedSecurity>
      </ConnectionProperties>
      <rd:SecurityType>Integrated</rd:SecurityType>
      <rd:DataSourceID>64f98fa2-ab11-49d0-bf0f-0ae10f26f0d3</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <DataSets>
    <DataSet Name="InsertPerfCounters">
      <Query>
        <DataSourceName>Local</DataSourceName>
        <CommandText>SET CONCAT_NULL_YIELDS_NULL OFF
DECLARE @Iname NVARCHAR(100)

SELECT @Iname = CONVERT(NVARCHAR(1000),SERVERPROPERTY('InstanceName'))

If @Iname IS NULL
	BEGIN
		insert AdminMonitor.dbo.PerformanceCountersToCapture ([CounterName],[ObjectName],[InstanceName],[Active],[CounterDescription])
		select 'Forwarded Records/sec','SQLServer:Access Methods','',1,NULL UNION ALL
		select 'Page Splits/sec','SQLServer:Access Methods','',1,NULL UNION ALL
		select 'Page Life Expectancy','SQLServer:Buffer Manager','',1,NULL UNION ALL
		select 'Processes blocked','SQLServer:General Statistics','',1,NULL UNION ALL
		select 'Batch Requests/sec','SQLServer:SQL Statistics','',1,NULL UNION ALL
		select 'SQL Compilations/sec','SQLServer:SQL Statistics','',1,NULL UNION ALL
		select 'SQL Re-Compilations/sec','SQLServer:SQL Statistics','',1,NULL UNION ALL
		select 'Lazy Writes/sec','SQLServer:Buffer Manager','',1,NULL UNION ALL
		select 'Page Reads/sec','SQLServer:Buffer Manager','',1,NULL UNION ALL
		select 'Page Writes/sec','SQLServer:Buffer Manager','',1,NULL UNION ALL
		select 'Checkpoint Pages/sec','SQLServer:Buffer Manager','',1,NULL UNION ALL
		select 'Free List Stalls/Sec','SQLServer:Buffer Manager','',1,NULL UNION ALL
		select 'Memory Grants Pending','SQLServer:Memory Manager','',1,NULL UNION ALL
		select 'Target Server Memory (KB)','SQLServer:Memory Manager','',1,NULL UNION ALL
		select 'Total Server Memory (KB)','SQLServer:Memory Manager','',1,NULL UNION ALL
		select 'Lock Requests/sec','SQLServer:Locks','Extent',1,NULL UNION ALL
		select 'Lock Requests/sec','SQLServer:Locks','Page',1,NULL;
	END
ELSE
	BEGIN
		insert AdminMonitor.dbo.PerformanceCountersToCapture ([CounterName],[ObjectName],[InstanceName],[Active],[CounterDescription])
		select 'Forwarded Records/sec','MSSQL$' + @Iname +':Memory Broker Clerks','',1,NULL UNION ALL
		select 'Page Splits/sec','MSSQL$' + @Iname +':Access Methods','',1,NULL UNION ALL
		select 'Page Life Expectancy','MSSQL$' + @Iname +':Buffer Manager','',1,NULL UNION ALL
		select 'Processes blocked','MSSQL$' + @Iname +':General Statistics','',1,NULL UNION ALL
		select 'Batch Requests/sec','MSSQL$' + @Iname +':SQL Statistics','',1,NULL UNION ALL
		select 'SQL Compilations/sec','MSSQL$' + @Iname +':SQL Statistics','',1,NULL UNION ALL
		select 'SQL Re-Compilations/sec','MSSQL$' + @Iname +':SQL Statistics','',1,NULL UNION ALL
		select 'Lazy Writes/sec','MSSQL$' + @Iname +':Buffer Manager','',1,NULL UNION ALL
		select 'Page Reads/sec','MSSQL$' + @Iname +':Buffer Manager','',1,NULL UNION ALL
		select 'Page Writes/sec','MSSQL$' + @Iname +':Buffer Manager','',1,NULL UNION ALL
		select 'Checkpoint Pages/sec','MSSQL$' + @Iname +':Buffer Manager','',1,NULL UNION ALL
		select 'Free List Stalls/Sec','MSSQL$' + @Iname +':Buffer Manager','',1,NULL UNION ALL
		select 'Memory Grants Pending','SMSSQL$' + @Iname +':Memory Manager','',1,NULL UNION ALL
		select 'Target Server Memory (KB)','MSSQL$' + @Iname +':Memory Manager','',1,NULL UNION ALL
		select 'Total Server Memory (KB)','MSSQL$' + @Iname +':Memory Manager','',1,NULL UNION ALL
		select 'Lock Requests/sec','MSSQL$' + @Iname +':Locks','Extent',1,NULL UNION ALL
		select 'Lock Requests/sec','MSSQL$' + @Iname +':Locks','Page',1,NULL;
	END
</CommandText>
      </Query>
    </DataSet>
    <DataSet Name="WaitToCapture">
      <Query>
        <DataSourceName>Local</DataSourceName>
        <CommandText>
insert AdminMonitor.dbo.WaitTypesToCollect ([WaitTypeName],[Active],[WaitDescription])
select 'WRITELOG',1,'' UNION ALL
select 'SOS_SCHEDULER_YIELD',1,'' UNION ALL
select 'OLEDB',1,'' UNION ALL
select 'async_network_io',1,'' UNION ALL
select 'CXPACKET',1,'' UNION ALL
select 'CXConsumer',1,'' UNION ALL
select 'PAGEIOLATCH_NL',1,'' UNION ALL
select 'PAGEIOLATCH_KP',1,'' UNION ALL
select 'PAGEIOLATCH_SH',1,'' UNION ALL
select 'PAGEIOLATCH_UP',1,'' UNION ALL
select 'PAGEIOLATCH_EX',1,'' UNION ALL
select 'PAGEIOLATCH_DT',1,'' UNION ALL
select 'LCK_M_SCH_S',1,'' UNION ALL
select 'LCK_M_SCH_M',1,'' UNION ALL
select 'LCK_M_S',1,'' UNION ALL
select 'LCK_M_U',1,'' UNION ALL
select 'LCK_M_X',1,'' UNION ALL
select 'COMMIT_TABLE',1,NULL;</CommandText>
      </Query>
    </DataSet>
    <DataSet Name="ServerName">
      <Query>
        <DataSourceName>Local</DataSourceName>
        <CommandText>Select @@servername AS 'ServerName'</CommandText>
      </Query>
      <Fields>
        <Field Name="ServerName">
          <DataField>ServerName</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
      </Fields>
    </DataSet>
    <DataSet Name="InsertConfigTable">
      <Query>
        <DataSourceName>Local</DataSourceName>
        <CommandText>insert AdminMonitor.dbo.[Config] ([ConfigTitle],[ConfigValue],[UnitOfMeasure],[Active])
select 'DataRetention',45,'Days',1


insert AdminMonitor.dbo.[Config] ([ConfigTitle],[ConfigValue],[UnitOfMeasure],[Active])
select 'ExtendedEventFolder','C:\ExtendedEvents','String',1;

insert AdminMonitor.dbo.[Config] ([ConfigTitle],[ConfigValue],[UnitOfMeasure],[Active])
select 'MinCapturesBaseline','300','',1;

insert AdminMonitor.dbo.[Config] ([ConfigTitle],[ConfigValue],[UnitOfMeasure],[Active])
select 'NumberOfDaysForBaseline','30','Days',1;


insert AdminMonitor.dbo.[Config] ([ConfigTitle],[ConfigValue],[UnitOfMeasure],[Active])
select 'BaselineColor','Green','',1;

insert AdminMonitor.dbo.[Config] ([ConfigTitle],[ConfigValue],[UnitOfMeasure],[Active])
select 'JobHistoryRetention','3','Days',1;

insert AdminMonitor.dbo.[Config] ([ConfigTitle],[ConfigValue],[UnitOfMeasure],[Active])
select 'DatabaseGrowthDataRetention',365,'Days',1;
</CommandText>
      </Query>
    </DataSet>
  </DataSets>
  <rd:ReportUnitType>Inch</rd:ReportUnitType>
  <rd:ReportID>1dbab52c-e537-407b-bb46-199cd93cc16f</rd:ReportID>
</Report>