Error Detect SQL Servers Initialization failure

h_shalih_shali Posts: 5 New member
edited July 13, 2023 5:54AM in Redgate Monitor
Hi
I am trying to add a server to the monitoring and I have encountered the following


My login in SQL is sys admin
Tagged:

Best Answer

  • Alex BAlex B Posts: 1,157 Diamond 4
    Hi @h_shali,

    Please do let me know if what @andrewboggs said works for you as well.  But if the MSCluster namespace doesn't exist then the only other thing it should be trying to do in that discover phase is query the root\cimv2 namespace with
    SELECT Name FROM Win32_Service WHERE Name = 'MSSQLSERVER' OR Name LIKE 'MSSQL$%'
    And if that is failing then you may need to repair WMI in some way to get tthe Win32_Service class back.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?

Answers

  • Hi,
    From the information provided, it's difficult to see exactly where the issue is here and this could be potentially caused by a range of things.
     
    Can I ask you to try adding the SQL Server to SQL Monitor even though the test fails?
     
    Then once added, please navigate to Configuration>Monitored servers and check the instance to see if the same error is flagged. To do this you can select the "Show log" option in "Monitored servers".

    Have messaged you directly via our ticketing system so we can have a look at your logs without you needing to post anything publicly on the forum. Once we've resolved will post again here for anyone else looking to resolve this issue.
    Kind regards

    Tom Claringbold | Redgate Software
    Have you visited our Help Center?
  • h_shalih_shali Posts: 5 New member
    Hi
    I connected the server to monitoring and no error occurred
    But it is not displayed in the servers section.
  • andrewboggsandrewboggs Posts: 4 New member
    Facing this same issue running the latest version (13.0.14.17503). Can add the Host machine, but shows failure on SQL Instance "Initialization Failure". SA Credentials being used. SQL Instance is SQL 2022 if that makes a difference. Even after adding, the machine shows up in the list of Monitored Servers without any SQL Instance and no errors in the log.

  • Alex BAlex B Posts: 1,157 Diamond 4
    Hi all,

    We have seen this issue before where the MSCluster namespace is present on a standalone server.

    Please perform the WBEMtest described on this page under Testing WMI connections manually > "Testing a WMI Connection using WBMETest" but in step 5 connect to the \\YourServerName\root namespace and in step 7 use this query:
    </code><pre class="CodeBlock"><code><code>SELECT Name FROM __Namespace See if MSCluster is returned in the list of namespaces.  If MSCluster is returned and the entity is NOT a cluster (as seems to be the case) then it will need to be removed and I will provide directions to do so.

    As for why when you have added the server there is not a card on the dashboard, it is because there is a problem discovering the SQL Server entities and there is only a card on the global dashboard for each SQL instance.

    Kind regards,
    Alex

    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • andrewboggsandrewboggs Posts: 4 New member
    Thank you Alex! Sure enough MSCluster is listed as a Namespace.
  • Alex BAlex B Posts: 1,157 Diamond 4
    Hi @andrewboggs

    Righto, that will be it! 

    To remove it you will need to download and unzip the attached file - it is a .mof file extension for modifying WMI.  You can open it as a text file to check its contents - it just sets the namespace to "root" and deletes the "MSCluster" namespace.
    Copy this to the C:\Windows\System32\wbem folder on the target server and open an elevated command prompt to the C:\Windows\System32\wbem directory on that server as well, then run the ClusWMIUninstall.mof at the prompt, the namespace will be deleted.

    After that, remove the entity and re-add it to SQL Monitor and it should be able to discover everything correctly.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • h_shalih_shali Posts: 5 New member
    Alex B

    I ran a query(SELECT Name FROM __Namespace) and there was no output



    But when I added the server again, I got the following error


  • h_shalih_shali Posts: 5 New member
    Hi all

    I run a query and there was no output


    But when I added the server again, I got the following error


  • andrewboggsandrewboggs Posts: 4 New member
    Hi Alex, after removing the Failover Cluster feature from the server I started facing the "Invalid Class" error , the same as h_sali above, but after deleting the MSCluster Namespace, as you suggested, it all worked perfectly! Thank you so much!
  • h_shalih_shali Posts: 5 New member
    Alex B said:
    Hi @h_shali,

    Please do let me know if what @andrewboggs said works for you as well.  But if the MSCluster namespace doesn't exist then the only other thing it should be trying to do in that discover phase is query the root\cimv2 namespace with
    SELECT Name FROM Win32_Service WHERE Name = 'MSSQLSERVER' OR Name LIKE 'MSSQL$%'
    And if that is failing then you may need to repair WMI in some way to get tthe Win32_Service class back.

    Kind regards,
    Alex
    Hi   @Alex
    My problem was solved by repairing WMI
    Thank you very much
Sign In or Register to comment.