### Connect the old databases

You need to detach, and then remove, rename, or delete the factory (new) database files before you can connect the old database files to the new system.

Distributed System Note: Complete these steps on the Database Server.

#### Detach the default databases

Before you can remove, rename, or delete the factory installed ION_Data, and ION_Network, and ApplicationModules databases on the new PME system with the copies made from the old IONESPMPME system, you must first detach the factory installed databases.

To detach the ION_Data database from the new system:

1. Go to SQL Server Management Studio and right-click ION_Data > Tasks > Detach.

   Note: If you cannot detach a database because of active connections, click Drop Connections in the detach dialog in SQL Server Management Studio. For example:

1. Follow the same steps to detach the ION_Network and ApplicationModules databases.

#### Remove, rename, or delete the factory databases

Detaching the databases will not remove the database files from the new PME folder structure. Since the old databases that you need to upgrade must be in the same location as the factory ones, you need to delete, remove, or rename the factory database files.

1. Navigate to the location where you installed the factory database files.

   Note: The default installation location is `...\Schneider Electric\Power Monitoring Expert\Database`. However, you might have picked a different location during installation.

2. Rename the factory database files.

   For example:

#### Restore the databases from the old system

Note: At a minimum, you need to restore the ION_Network and ApplicationModules databases for Power Monitoring Expert to be functional.

Restore the old databases to the new PME system at their installation location.

To restore copies of the old IONESPMPME databases into the new PME system:

1. In SQL Server Management Studio, right-click Databases and then click Restore Database.

1. Click Device and then click ... (the ellipsis button).

1. Click Add.

2. In the Locate Backup File dialog, navigate to the IONESPMPME database file from the `...\SBS Upgrade Package\Database_Backups` folder and enter the database name in the File name field.

   For example:

1. Click OK.
2. Make sure that Restore is checked:

3. Click on the Files tab on the upper left of the window, click Relocate all files to folder, and then select the location for restoring the database:

4. Select the default location for the PME databases. For example:

5. Click OK.

The following image shows the restored databases:

Note: Expect the database restore to take about 5 minutes for a 10 GB database.

#### Restore the archive databases to the new system

Since the new PME system does not have a default folder location for database archives, create a folder called `…\Schneider Electric\Power Monitoring Expert\Database\Archives`.

Repeat steps 1 through 9 above, restoring the archive databases to this folder.

For example: