Answered Removing a deleted managed instance

  • Thursday, June 07, 2012 12:41 AM
     
     

    We have the Utility Explorer set up monitoring our SQL instances.  A dev has uninstalled 2 instances before we have removed them from the utility explorer.

    I can not use the GUI to remove them as it tries to make a connection to the managed instance...which is already long gone.

    How can i remove these entries from the Utility Explorer?

    Cheers

    smitty


    MCDBA, MCAD, MCITP, MCTS

All Replies

  • Thursday, June 07, 2012 3:58 AM
     
     Answered
    You may find the Powershell script mentioned in this article useful.



    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @PradeepAdiga

  • Friday, June 08, 2012 2:09 AM
     
     

    Cheers


    MCDBA, MCAD, MCITP, MCTS

  • Tuesday, June 26, 2012 1:16 PM
    Moderator
     
     Answered Has Code

    The Powershell script requires connection to the managed instance in order to remove it.  If the instance has already been uninstalled, you can run the following script from the UCP to remove the dead instance:

    DECLARE @instance_id int;
    SELECT @instance_id = mi.instance_id
    FROM msdb.dbo.sysutility_ucp_managed_instances AS mi
    WHERE mi.instance_name = 'ComputerName\InstanceName';
    
    EXEC msdb.dbo.sp_sysutility_ucp_remove_mi @instance_id;
    Thanks,
    Sam Lester (MSFT)

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.