HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

How to remove a database server from Utility Explorer

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
explorerutilityremovedatabasehowserverfrom

Problem

I use the Utility Explorer to monitor some of my databases but I forgot to remove one before retiring the server. Normally, you could just right click and select "Remove Managed Instance" but I can't do that since the server has been wiped from existence. Now it is stuck in my list without any data

Solution

I've recently had to drop a defunct instance from a UCP.
Here's how:

DECLARE @instance_id int;

SELECT @instance_id = mi.instance_id
FROM msdb.dbo.sysutility_ucp_managed_instances AS mi
WHERE mi.instance_name = 'defunctservrname\instancename';

EXEC msdb.dbo.sp_sysutility_ucp_remove_mi @instance_id;

Code Snippets

DECLARE @instance_id int;

SELECT @instance_id = mi.instance_id
FROM msdb.dbo.sysutility_ucp_managed_instances AS mi
WHERE mi.instance_name = 'defunctservrname\instancename';

EXEC msdb.dbo.sp_sysutility_ucp_remove_mi @instance_id;

Context

StackExchange Database Administrators Q#20608, answer score: 2

Revisions (0)

No revisions yet.