SQL Databases Properties are not Discovered by SQL Server Management Pack

I had this issue recently in two separate environments where properties for some SQL databases were not discovered by SQL Server Management Pack as you can see below:

image

Also collecting performance data for free space of the databases was returning zero (0):

image

Meanwhile in the Operations Manager log on the SQL servers I was only seeing this error:

image

Management Group: <MGMTGROUPNAME>.Script: DiscoverSQL2012FileGroups.js : Script ‘DiscoverSQL2012FileGroups.js’ failed.
Inner exception:
Error Number      :
Error Code        : 0
Win32 Facility    : 0
Error Description :
Call stack:Exception.constructor(Script ‘DiscoverSQL2012FileGroups.js’ failed.,Can’t close connection.
Inner exception:
Error Number      : -2146824584
Error Code        : 3704
Win32 Facility    : 10
Error Description : Operation is not allowed when the object is closed.
Call stack:Exception.constructor(Can’t close connection.,Operation is not allowed when the object is closed.
Error Number      : -2146824584
Error Code        : 3704
Win32 Facility    : 10
Error Description : Operation is not allowed when the object is closed.
), ADODB.Close),
Main({D6B26EFE-E183-24E9-DD23-F165CB716A28},{ADFFD930-BDE9-66A1-20F3-CB6FBA80CBC9},<SERVER FQDN>,<SERVER NETBIOS NAME>,MSSQLSERVER),
),
Main({D6B26EFE-E183-24E9-DD23-F165CB716A28},{ADFFD930-BDE9-66A1-20F3-CB6FBA80CBC9},<SERVER FQDN>,<SERVER NETBIOS NAME>,MSSQLSERVER),

So this was my issue but I couldn’t find where exactly was the problem. Some of the properties were discovered and there was even databases that all properties were discovered but performance data for free space was not working on all databases. This lead me think it was some kind of permissions issue but I’ve made the SCOM Action Account “SA” on all SQL servers.

How I fixed it:

1. I’ve created Run As account in SCOM.

2. Named it SQL with type Windows.

3. For credentials I’ve entered the SCOM Action Account.

4. Secured the account only to the SQL servers in my environment.

5. Added this account to these three profiles: SQL Server Default Action Account, SQL Server Discovery Account and SQL Server Monitoring Account.

After these steps all was working as it should be:

image

image

So it seems you really need to create Run As account and add it to the SQL Profiles even though the SQL Server Management Pack guide says otherwise:

By default, all discoveries, monitors, and tasks defined in the SQL Server management packs default to using the accounts defined in the “Default Action Account” Run As profile. If the default action account for a given system does not have the necessary permissions to discover or monitor the instance of SQL Server, then those systems can be bound to more specific credentials in the SQL Server Run As profiles, which do have access.

 

Keep in mind that I haven’t changed any permissions to my SCOM Action Account. This account had all SQL permissions all the time.

My Configuration was:

  • Windows Server 2012 with latest updates;
  • SCOM 2012 SP1 UR2
  • SQL Server Management Pack 6.3.173.1
  • SQL Server 2012 SP1 CU3

New MP: Microsoft Exchange Server 2013 Management Pack

Exchange 2012 Management Pack was just released by Microsoft. It seems that this is completely new management pack so goodbye to the correlation engine Smile. I’ve never liked that this management pack was some kind of different from all other Microsoft Management Packs. I hope I can test it really soon. You can test it by yourself by downloading it from here. You will not be able to download the guide for this MP as it is located in TechNet Library so here are the links:

Version 2.0 of My Script to Download All SCOM Management Packs with PowerShell

Not so long ago I’ve wrote a script that can download all SCOM Management Packs released by Microsoft. Unfortunately Microsoft has decided to change the interface of their download pages and didn’t asked me for approval Smile. Because of that the script stopped to work as it was dependent on the layout of the download web pages. I’ve decided to give it a try to fix the script. Looked at the layout of the new download page. Change a bit the logic and some lines and viola the script is working again.

You can grab Version 2.0 of the script from TechNet Gallery or from systemcentercentral.com.

P.S. The Script requires PowerShell 3.0.

New MP: Windows Azure SQL Database Management Pack

New management pack is available for Windows Azure service. Now you can monitor your Windows Azure SQL Databases from SCOM. These are the key features:

  • User-friendly wizard to discover Windows Azure SQL Database servers.
  • Provides availability status of Windows Azure SQL Database server.
  • Collects and monitors health of Windows Azure SQL Database databases.
    • Space monitoring:
      • Used space
      • Free space
      • Total allocated quota
    • Track the total number of databases per server
  • Collects and monitors performance information:
    • Average memory per session
    • Total memory per session
    • Total CPU time per session
    • Total I/O per session
    • Number of database sessions
    • Maximum Transaction execution time
    • Maximum Transaction lock count
    • Maximum Transaction log space used
    • Network Egress/Ingress bandwidth
  • Ability to define Custom thresholds for each monitor to configure the warning and critical alerts.
  • Run-as profile to securely connect to Windows Azure SQL Database.
  • Detailed knowledge to guide the IT operator with troubleshooting the problem
  • Custom tasks to redirect the user to the Windows Azure SQL Database online portal
  • Custom query support to enable application-specific availability and performance monitoring

Grab the management pack and the installation and configuration guide from here.

Updated MP: System Center Management Pack for Windows Server Operating System

As MSFT promised we have a new version of Windows Servers OS MP in Q2. The update brings a couple of bug fixes and one significant feature marked in bold:

  • Fixed a bug in Microsoft.Windows.Server.2008.Monitoring.mp where the performance information for Processor was not getting collected.
  • Made monitoring of Cluster Shared Volume consistent with monitoring of Logical Disks by adding performance collection rules. (“Cluster Shared Volume – Free space / MB”,”Cluster Shared Volume – Total size / MB”,”Cluster Shared Volume – Free space / %”,”Cluster Disk – Total size / MB”,”Cluster Disk – Free space / MB”,”Cluster Disk – Free space / %”)
  • Fixed bug in Microsoft.Windows.Server.ClusterSharedVolumeMonitoring.mp where the Cluster disks running on Windows Server 2008 (non R2) were not discovered.
  • Fixed bug ‘Cluster Disk Free Space Percent’ and Cluster Disk Free Space MB’ monitors generate alerts with bad descriptions when the volume label of a cluster disk is empty.
  • Added feature to raise event when NTLM requests time out and customers are unable to use mailboxes, outlook stops responding, due to the low default value for Max Concurrent API registry Key (HLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters) , which is a ceiling for the maximum NTLM or Kerberos PAC password validations a server can take care of at a time. It uses the “Netlogon” performance counter to check for the issue.
    The updated management pack and its guide you can find here. Smooth updating.