都内で働くSEの技術的なひとりごと / Technical soliloquy of System Engineer working in Tokyo

都内でサラリーマンやってます。SQL Server を中心とした (2023年からは Azure も。) マイクロソフト系(たまに、OSS系などマイクロソフト以外の技術も...)の技術的なことについて書いています。日々の仕事の中で、気になったことを技術要素関係なく気まぐれに選んでいるので記事内容は開発言語、インフラ等ばらばらです。なお、当ブログで発信、発言は私個人のものであり、所属する組織、企業、団体等とは何のかかわりもございません。ブログの内容もきちんと検証して使用してください。英語の勉強のため、英語の

MSSQL Tiger Team の SQL Server Performance Monitoring and Baselining を見ながらツールを試してみる

 SE の雑記 さんが MSSQL Tiger Team の SQL Server Performance Monitoring and Baselining をツイートされてました。これは楽しそうですね。

 MSSQL Tiger Team のブログです。
blogs.msdn.microsoft.com

 早速試してみましょう。とりあえず、全部ダウンロードしてしまいましょう。
github.com

 こんな構成です。
f:id:koogucc11:20160821105338p:plain

 SQL-Performance-Baseline を開きます。
f:id:koogucc11:20160821105346p:plain

 Readme.txt を開いてみましょう。セットアップの手順が記載されています。1 から順番にやっていきましょう。

The attachment contains the following files

Data Collection

T-SQL Scripts

CREATEDATABASE, CREATEOBJECTS & CREATECOLLECTIONJOB -> these t-SQL script creates the database dba_local & schema & SQL Agent Jobs required for performance data collection. These SQL scripts needs to be ran on all the sql instance which needs to be monitored

Powershell Scripts

Get-SQLPerfCounters, Out-DataTable, Write-DataTable -> These Powershell scripts needs to be copied to location C:\Scripts\ which is used for Perfmon data collection. These script needs to be copied on all the target server which needs to be monitored & should be copied to the folder C:\Scripts


SQL Performance baselining Reports & Xevent Reports (SSRS Reports)

The SSRS Reports should be deployed on the central SSRS server which should be greater than SQL 2012.


You can follow the steps mentioned below to set it up in your environment.

Data Collection Steps for each SQL Instance to Monitor

1. Connect to SQL instance to monitor
2. Run CREATEDATABASE.sql
3. Run CREATEOBJECTS.sql
4. Run CREATECOLLECTIONJOB.sql
5. Copy PS Scripts in the folder C:\Scripts
6. Check SQL Agent JOBs History to see if it runs successfully
7. Repeat for each SQL Instance you want to monitor

Setting up & Deploying Reporting

8. Deploy the SSRS Reports & see if data populates in the reports.

 

  • Run CREATEDATABASE.sql
    f:id:koogucc11:20160821110702p:plain
  • Run CREATEOBJECTS.sql
    f:id:koogucc11:20160821110843p:plain
  • Run CREATECOLLECTIONJOB.sql
    f:id:koogucc11:20160821111232p:plain
  • Copy PS Scripts in the folder C:\Scripts
    f:id:koogucc11:20160821111633p:plain
  • Check SQL Agent JOBs History to see if it runs successfully
    f:id:koogucc11:20160821113627p:plain
  • Repeat for each SQL Instance you want to monitor
    色々と実行しましょう。
    f:id:koogucc11:20160821105338p:plain

 

  • Deploy the SSRS Reports & see if data populates in the reports.
    SQL Server のインストールされた環境で、下記の URL を実行します。(サーバ名はインストールされた環境に応じて変更してください。)
http://localhost/Reports/browse/

f:id:koogucc11:20160821163142p:plain

 SQL-Performance-Baseline フォルダの Report.zip に rdl ファイルがいくつか格納されています。それらのファイルを SSRS にアップロードします。
f:id:koogucc11:20160821163557p:plain

 レポートをクリックするとパフォーマンスに関する情報を参照することができます。
f:id:koogucc11:20160821164529p:plain

f:id:koogucc11:20160821164536p:plain

f:id:koogucc11:20160821164543p:plain

いいサンプルがあると、色々勉強になりますね。

 USB Type-C も買ってみる。

 Lenovo 900S の充電に使えないかな。