How to migrate the repository database to a different SQL Server

Applies to
ApexSQL Monitor

This article describes post migration steps after the ApexSQL Monitor central repository database has been migrated to another SQL Server instance.


If the ApexSQL Monitor central repository database needs to be monitored to a new SQL Server, it can be moved via backup and restore, attach or detach etc.

Modifying the Monitor.dat file

Whatever method was used to migrate the repository database to a new SQL Server, the next step is altering the Monitor.dat file to accommodate the new information for the repository database. The Monitor.dat file is located in the <drive-letter>:\ProgramData\ApexSQL\ApexSQLMonitor.

Replace <drive_letter> with an appropriate drive letter depending on where ApexSQL Monitor is installed.

Change the name of the server that hosts the repository database by entering the name of the SQL Server that is going host it in the following line:


Replace the highlighted text with the adequate SQL Server name. In the example below it should look like this


Optionally, in case that the repository database is restored using the new name, to allow the ApexSQL Monitor to recognize the new repository name should be entered in the following line as well:


The final look of the Monitor.dat file should be like this

<?xml version=”1.0″?>
<ExternalInfo xmlns:xsd=”” xmlns:xsi=””>
 <HttpsSiteName />

Save the altered Monitor.dat file and restart the ApexSQL Monitor service

The migration of the repository database is now completed, and ApexSQL Monitor will now be storing the collected data into the new repository.