Windows のバージョンアップにより SQL Server 関連のパフォーマンスカウンターが表示されなくなる現象について

Published Mar 08 2022 12:09 AM 861 Views
Microsoft

こんにちは、 SQL Server サポートチームです。

 

今回は SQL Server 関連のパフォーマンスログを採取している場合に、OSのバージョンアップでご注意いただきたい内容をご案内します。

 

SQL Server 関連のパフォーマンスログ採取手順については以下の記事をご参照ください。

パフォーマンスログ採取手順- Microsoft Tech Community

 

 

SQL Server を構築済みの環境において、日本語で利用している Windows OS のバージョンアップ(*)を行うと、SQL Server 関連のパフォーマンスカウンターが利用出来なくなる場合がございます。

*次のバージョンアップ パターンで発生が確認されております。

  ・Windows 10 → Windows 11

  ・Windows Server 2016 → Windows Server 2019

 

 

具体的には、パフォーマンスカウンターの選択画面で、[SQL Server:XXXXX] という名称のカウンターが表示れなくなります。

(名前付きインスタンスの場合には、[MSSQL$<名前付きインスタンス名>:XXXXX] という名称のカウンターが表示されなくなります。

また、該当のカウンターに対応する WMI クラスも使用することが出来なくなります。

 

<バージョンアップ前>

Yohei_Kawajiri_0-1646726813148.jpeg

 

<バージョンアップ後>

Yohei_Kawajiri_1-1646726813150.jpeg

 

 

このような場合、以下のいずれかの対応を行うことで問題を解消できます。

OS のバージョンアップ前に作成したデータコレクターセットがある場合は、こちらの対応後に開始すればデータコレクターセットの再作成は必要ありません。

 

A. SQL Server の修復インストール

1) SQL Server をインストールする際に展開されたフォルダにある setup.exe を実行します。

2) ウィザードが表示されたら、[メンテナンス] -> [修復] を選択します。

3) インスタンス選択画面にて、対象のインスタンスを選択します。

4) 修復が完了したら、ウィザードを閉じます。

 

B. パフォーマンスカウンターの再登録

1) コマンドプロンプトを管理者権限で開き、以下のコマンドを実行してパフォーマンスカウンターを再構築します。

*****

cd c:\windows\system32

lodctr /R

cd c:\windows\sysWOW64

lodctr /R

*****

 

2) 続いて以下のコマンドを実行します。

*****

WINMGMT.EXE /RESYNCPERF

*****

 

3) 管理者権限で PowerShell を起動し、以下のコマンドを実行します。

*****

Get-Service -Name "pla" | Restart-Service -Verbose

*****

 

4) 続いて PowerShell で以下のコマンドを実行します。

*****

Get-Service -Name "winmgmt" | Restart-Service -Force -Verbose

*****

 

(参考情報)

Manually rebuild performance counters - Windows Server | Microsoft Docs

 

以上です。

%3CLINGO-SUB%20id%3D%22lingo-sub-3249967%22%20slang%3D%22ja-JP%22%3EAbout%20the%20phenomenon%20that%20sql%20server%20related%20performance%20counters%20are%20not%20displayed%20due%20to%20a%20Windows%20version%20upgrade%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3249967%22%20slang%3D%22ja-JP%22%3E%3CP%3EHello%2C%20this%20is%20the%20SQL%20Server%20support%20team.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20time%2C%20if%20you%20are%20collecting%20SQL%20Server-related%20performance%20logs%2C%20we%20will%20guide%20you%20to%20what%20you%20should%20be%20aware%20of%20in%20the%20OS%20version%20upgrade.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20sql%20server-related%20performance%20log%20collection%20procedures%2C%20see%20the%20following%20articles%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ftechcommunity.microsoft.com%252Ft5%252Fsql-server-support-blog%252F%2525E3%252583%252591%2525E3%252583%252595%2525E3%252582%2525A9%2525E3%252583%2525BC%2525E3%252583%25259E%2525E3%252583%2525B3%2525E3%252582%2525B9%2525E3%252583%2525AD%2525E3%252582%2525B0%2525E6%25258E%2525A1%2525E5%25258F%252596%2525E6%252589%25258B%2525E9%2525A0%252586%252Fba-p%252F1683329%26amp%3Bdata%3D04%257C01%257CYohei.Kawajiri%2540microsoft.com%257C379df721111f4241727408da00984d49%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637822951390101287%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C3000%26amp%3Bsdata%3DZ25y1cIFmRLC4jbdqcOo6ASCosetbuy%252BihzEQVsmuh8%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EPerformance%20Log%20Collection%20Procedure%20-%20Microsoft%20Tech%20Community%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20an%20environment%20where%20SQL%20Server%20has%20already%20been%20built%2C%20sql%20server-related%20performance%20counters%20may%20not%20be%20available%20if%20you%20upgrade%20the%20Windows%20OS%20used%20in%20Japanese%20(*).%3C%2FP%3E%0A%3CP%3E*The%20occurrence%20has%20been%20confirmed%20in%20the%20following%20version%20upgrade%20pattern.%3C%2FP%3E%0A%3CP%3EWindows%2010%20%E2%86%92%20Windows%2011%3C%2FP%3E%0A%3CP%3EWindows%20Server%202016%20%E2%86%92%20Windows%20Server%202019%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESpecifically%2C%20the%20performance%20counter%20selection%20screen%20will%20no%20longer%20display%20a%20counter%20named%20SQL%20Server%3AXXXXX.%3C%2FP%3E%0A%3CP%3E(For%20named%20instances%2C%20counters%20named%20MSSQL%24%26lt%3B%20named%20instance%20name%20%26gt%3B%3AXXXXX%20will%20no%20longer%20appear.)%3C%2FP%3E%0A%3CP%3EAlso%2C%20the%20WMI%20class%20corresponding%20to%20the%20counter%20will%20no%20longer%20be%20available.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBefore%20%26lt%3B%20version%20upgrade%26gt%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yohei_Kawajiri_0-1646726813148.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353705iFE2982EBBF2EA70E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Yohei_Kawajiri_0-1646726813148.jpeg%22%20alt%3D%22Yohei_Kawajiri_0-1646726813148.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20upgrading%20%26lt%3B%26gt%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yohei_Kawajiri_1-1646726813150.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353706i6327BCA698AE6705%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Yohei_Kawajiri_1-1646726813150.jpeg%22%20alt%3D%22Yohei_Kawajiri_1-1646726813150.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20these%20cases%2C%20you%20can%20resolve%20the%20issue%20by%20taking%20one%20of%20the%20following%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%20%3C%2FSPAN%3E%3CSPAN%3EIf%20you%20have%20a%20data%20collector%20set%20that%20you%20created%20before%20upgrading%20the%20OS%2C%20you%20don't%20need%20to%20recreate%20the%20data%20collector%20set%20if%20you%20start%20it%20after%20this%20support.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EA.%20Sql%20Server%20Repair%20Installation%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E1)%20Run%20the%20setup%20.exe%20in%20the%20folder%20that%20was%20deployed%20when%20installing%20SQL%20Server.%3C%2FP%3E%0A%3CP%3E2)%20When%20the%20wizard%20appears%2C%20select%20Maintenance%20-%20%26gt%3B%20Repair.%3C%2FP%3E%0A%3CP%3E3)%20On%20the%20instance%20selection%20screen%2C%20select%20the%20target%20instance.%3C%2FP%3E%0A%3CP%3E4)%20When%20the%20repair%20is%20complete%2C%20close%20the%20wizard.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EB.%20Re-register%20performance%20counters%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E1)%20Open%20the%20command%20prompt%20with%20administrator%20privileges%20and%20run%20the%20following%20command%20to%20rebuild%20the%20performance%20counter.%3C%2FP%3E%0A%3CP%3E*****%3C%2FP%3E%0A%3CP%3Ecd%20c%3A%5Cwindows%5Csystem32%3C%2FP%3E%0A%3CP%3Elodctr%20%2FR%3C%2FP%3E%0A%3CP%3Ecd%20c%3A%5Cwindows%5CsysWOW64%3C%2FP%3E%0A%3CP%3Elodctr%20%2FR%3C%2FP%3E%0A%3CP%3E*****%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2)%20Then%20run%20the%20following%20command.%3C%2FP%3E%0A%3CP%3E*****%3C%2FP%3E%0A%3CP%3EWINMGMT.%20EXE%20%2FRESYNCPERF%3C%2FP%3E%0A%3CP%3E*****%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E3)%20Start%20PowerShell%20with%20administrator%20privileges%20and%20run%20the%20following%20command%3A%3C%2FP%3E%0A%3CP%3E*****%3C%2FP%3E%0A%3CP%3EGet-Service%20-Name%20%22pla%22%20%7C%20Restart-Service%20-Verbose%3C%2FP%3E%0A%3CP%3E*****%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E4)%20Then%20run%20the%20following%20command%20in%20PowerShell%3A%3C%2FP%3E%0A%3CP%3E*****%3C%2FP%3E%0A%3CP%3EGet-Service%20-Name%20%22winmgmt%22%20%7C%20Restart-Service%20-Force%20-Verbose%3C%2FP%3E%0A%3CP%3E*****%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E(Reference%20information)%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Ftroubleshoot%2Fwindows-server%2Fperformance%2Fmanually-rebuild-performance-counters%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EManually%20rebuild%20performance%20counters%20-%20Windows%20Server%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat's%20all.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Co-Authors
Version history
Last update:
‎Mar 08 2022 12:09 AM
Updated by: