Schedule and automate the discovery of SQL Server instances

Applies to:

ApexSQL Manage


This article provides an extensive look into the scheduling process for operations within ApexSQL manage.


In the world of ever-growing SQL Server environments, there is a need for automation of DBAs daily assignments, among which is discovery and maintenance of newly created SQL Server instances. This article aims to provide a meaningful guide on how to automate the discovery of new SQL Servers in ApexSQL Manage.

Previous articles relevant to the topic of schedules are:

Creating a discovery schedule

To create a discovery schedule, go to the Schedules tab. Click the Create button and opt for the Server discovery schedule:

Creating a SQL Server discovery schedule

This will open the Server discovery window, and by default, the primary tab will be Schedule. Here, a schedule name can be specified, frequency of the schedule execution as well as additional customization for precise periods of execution and duration of the schedule that can be tailored to the DBA needs. For this article, the following configuration will be used:

  • Schedule name – Used to specify the schedule name that will be shown in the email
    • Daily discovery
  • Frequency – Frequency of scheduled execution
    • Daily
    • Every 1 day
  • Daily frequency – Precise time of scheduled execution
    • Once at 12:00:00 AM

Remaining options are left to the default values:

SQL Server discovery schedule options

Once this tab is configured, click the Scan tab to proceed with the schedule configuration. For this article, the following configuration will be used:

  • Include – Used to specify parameters of the scan
    • SQL Server – The application will only scan for SQL Server instances
  • Other – Used to scan for SQL Server instances and services that are installed locally (on the same machine)
    • SSRP – SQL Server Resolution Protocol – Scan method used for SQL Server discovery

Scan methods for SQL Server discovery schedule

The Notification tab is used to configure email notifications. For this example the following configuration will be used:

  • Discovery notify events – This option is used to specify when an email notification will be sent
    • Success
    • New servers(s) found

To add an email, click the Add button and specify the email address. Click OK to confirm adding of the email address:

Notifications for SQL Server discovery schedule

The Summary tab provides an overview of schedule parameters and is used as a final check before creating the schedule. Click the OK button to create the schedule:

Summary for SQL Server discovery schedule

Running a discovery schedule

Once the schedule is created, it will show up in the main schedule grid. To run the schedule manually, click the Run button:

Running a SQL Server discovery schedule

Upon running the schedule, an email notification will be sent with the information on newly discovered SQL Server instances, their type as well as a version number. For this example, the following email was received:

Email notification of discovered SQL Servers

Registering discovered SQL Servers

To register the discovered SQL Servers in ApexSQL Manage, click the description column of a discovery schedule. This will open the Register window where SQL Servers can be selected for registering. In this example, the following parameters will be used:

  • Check all discovered SQL Servers to register
  • Log in automatically using Windows authentication
    • Ask for credentials for failed logins will be left unchecked since Windows authentication is sufficient for registering
  • Add discovered SQL Servers to General folder

Click the OK button to register the SQL Servers in ApexSQL Manage:

Registering discovered SQL Servers

Registered SQL Server instances and their details can be found in the main grid of the Inventory tab:

Detailed overview of registered SQL Servers and their information

In summary, scheduling discovery of SQL Servers can provide faster management of DBAs time and have an always-ready email report of newly discovered SQL Server instances across their environment.