Change the location and name of a SQL Server database

The management server, event server, log server, Identity Provider, and XProtect Incident Manager connect to different SQL Server databases using connection strings. These connection strings are stored in the Windows registry. If you have changed the location or name of a SQL Server database, you must edit all connection strings that point to that SQL Server database.

Database

Used by
Surveillance database
  • Management Server service

  • Event Server service

  • VideoOS Management Server app pool

  • VideoOS Report Server app pool

Surveillance_IDP

  • VideoOS IDP app pool

Surveilance_IM

  • VideoOS IM app pool

Surveillance_LogServerV2

  • Log Server service

Before you proceed:

  • Back up the SQL Server databases and the Windows registry.

  • Make sure that the user that runs the related services and app pools is the owner of the database.

  • Complete the content migration from the old SQL Server database to the new one.

To update the connection strings with the new location and name of a SQL Server database:

  1. Stop all XProtect VMS services and app pools that use the SQL Server database.

    Depending on your system architecture, the services and app pools might run on different computers. You must stop all app pools and services that connect to the same SQL Server database.

  2. In Registry Editor, go to HKEY_LOCAL_MACHINE\SOFTWARE\VideoOS\Server\ConnectionString.

  3. Update the connection strings with the new location and name of the SQL Server database.

    The default connection strings for all SQL Server databases are:

    • ManagementServer: Data Source=localhost;Initial Catalog=Surveillance;Integrated Security=True;Max Pool Size=1000;Encrypt=True;Trust Server Certificate=True

    • EventServer: Data Source=localhost;Initial Catalog=Surveillance;Integrated Security=True;Max Pool Size=1000;Encrypt=True;Trust Server Certificate=True

    • ServerService: Data Source=localhost;Initial Catalog=Surveillance;Integrated Security=True;Max Pool Size=1000;Encrypt=True;Trust Server Certificate=True

    • ReportServer: Data Source=localhost;Initial Catalog=Surveillance;Integrated Security=True;Max Pool Size=1000;Encrypt=True;Trust Server Certificate=True

    • IDP: Data Source=localhost;Initial Catalog=Surveillance_IDP;Integrated Security=True;Max Pool Size=1000;Encrypt=True;Trust Server Certificate=True

    • IncidentManager: Data Source=localhost;Initial Catalog=Surveillance_IM;Integrated Security=True;Max Pool Size=1000;Encrypt=True;Trust Server Certificate=True

    • LogServer: Data Source=localhost;Initial Catalog=SurveillanceLogServerV2;Integrated Security=True;Max Pool Size=1000;Encrypt=True;Trust Server Certificate=True

  4. Start all XProtect services and app pools that you have stopped in step 1.