locked
Obsolete Monitored SQL Databases Cleanup RRS feed

  • Question

  • Hi All,

    Just wanted to ask if what the correct method is for cleaning-out any monitored SQL Server databases instances that have been placed offline pending decommissioning?

    I currently have a situation where a number of databases on SQL Server hosts are showing as Critical in the Microsoft SQL Server > Databases > Database State view but in fact I know a good deal of these are probably simply offline or due to be decommissioned.

    My question is what is the recommended method for removing any databse nstances that were previously discovered and monitored but which are now no longer in production use and which no longer require to be monitroed?

    SCOM environment is 2007 R2 with CU5 and the SQL MP is version 6.1.400.0.

    All considered replies appreciated.

    Kind Regards,

    Michael


    • Edited by michael_f Monday, April 23, 2012 2:37 AM
    Monday, April 23, 2012 2:36 AM

Answers

  • Hi

    The SQL database discovery does have an override that allows you to state which databases to ignore, as an example:

    - Authoring -> Management Pack Objects -> Object Discoveries - scope for SQL Server 2005 DB and there is a discovery rule for discover databases for a database engine. On the overrides tab there is an exclude list which takes a comma seperated list of databases to exclude from monitoring. Depending on the number of SQL Servers \ databases involved you could do an override for specific object of class SQL Server 200X DB Engine and specify the databases on each server.

    An alternative is to create a group of databases that you don't want to monitor and override the discovery for the group, running remove-disabledmonitoringobject to clean up the discoveries. This is discussed here:

    http://social.technet.microsoft.com/Forums/en-US/operationsmanagermgmtpacks/thread/19bd04a5-28d4-49ac-8d15-05f6b9189d1d/

    Cheers

    Graham


    Regards Graham New System Center 2012 Blog! - http://www.systemcentersolutions.co.uk
    View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/

    • Marked as answer by michael_f Tuesday, April 24, 2012 7:47 AM
    Monday, April 23, 2012 7:43 AM

All replies

  • Hi

    The SQL database discovery does have an override that allows you to state which databases to ignore, as an example:

    - Authoring -> Management Pack Objects -> Object Discoveries - scope for SQL Server 2005 DB and there is a discovery rule for discover databases for a database engine. On the overrides tab there is an exclude list which takes a comma seperated list of databases to exclude from monitoring. Depending on the number of SQL Servers \ databases involved you could do an override for specific object of class SQL Server 200X DB Engine and specify the databases on each server.

    An alternative is to create a group of databases that you don't want to monitor and override the discovery for the group, running remove-disabledmonitoringobject to clean up the discoveries. This is discussed here:

    http://social.technet.microsoft.com/Forums/en-US/operationsmanagermgmtpacks/thread/19bd04a5-28d4-49ac-8d15-05f6b9189d1d/

    Cheers

    Graham


    Regards Graham New System Center 2012 Blog! - http://www.systemcentersolutions.co.uk
    View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/

    • Marked as answer by michael_f Tuesday, April 24, 2012 7:47 AM
    Monday, April 23, 2012 7:43 AM
  • Hi Graham,

    Thanks for the pointer.  I'll read the article and follow-up accordingly.

    Kind Regards,

    Michael

    Tuesday, April 24, 2012 7:47 AM
  • Hi Grahame,

    Don't seem to be having any success with this.

    The situation I have is that I want to disable monitoring of various databases that are hosted on a a default instance of SQL server (2005) as all of the SQL Server 2005 versions of the databases have been migrated to a named SQL Server 2008 instance. 

    That being the case what is the correct syntax for targetting a db instance in the Discovery Overrides Exclison list field?

    For example, using a SQ: Server 2005 dtabase named ReportServerTempDB running on FOOBAR.com;MSSQLSERVER how do I construct the above object hierarchy of default SQL Server and database instance in the exlusion field so that the ReportServerTempDB object is no longer monitored?

    If you can proivde an example for the correct way to reference databse instances, whether resding on a default or named instance of SQL Server I would be grateful.

    Kind Regards,

    Michael

    Thursday, April 26, 2012 2:33 AM
  • Hi Michael

    On the authoring, object discoveries - scope for SQL 2005 db (e.g. for SQL 2005 databases).

    Then override the discovery for a specific SQL DB Engine instance where the database resides

    On the overides tab, complete the Exclude list with the name of the database.

    Bounce the System Center management service on the SQL Server.

    That should do it.

    Cheers

    Graham


    Regards Graham New System Center 2012 Blog! - http://www.systemcentersolutions.co.uk
    View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/

    Thursday, April 26, 2012 10:50 AM