HomeSupercharger KBHow ToMigrating Supercharger to Another SQL Server

5.29. Migrating Supercharger to Another SQL Server

NOTE:  The instructions below apply if you already have Supercharger installed and configured. The steps below will migrate the Supercharger data (load balancers, load balanced subscriptions, performance history, etc...) to another SQL Server. If you are setting up a new installation of Supercharger and want to use your own SQL Server and not the SQL Server that installs by default with Supercharger, then please see this article.

We strongly recommend that you use the SQL Server that installs by default with Supercharger.

Supercharger does not use SQL Server in the traditional sense as a relational database nor does it store the organization’s business data or data normally considered to be specifically scoped into compliance regulations. Supercharger’s use of SQL server is for storage of system information and as an inter-process communication facility between manager and controllers.

Supercharger is designed to use a local instance of SQL Server Express 2016 to store:

Supercharger automatically installs, secures and configures SQL Server Express on the manager. For Free Edition, we do not offer support for using a different installation of SQL Server. For Enterprise Edition customers with an active support contract, we determine on a case-by-case basis whether to support a customer-installed instance of SQL server on another system. These are instructions related to such a scenario.

We believe Supercharger will work okay on a day-to-day basis without sysadmin, but it is required whenever you register a new Windows Event Collector or upgrade Supercharger to a new version. Supercharger should also work with most earlier versions of SQL Server including 2014.

All steps below assume that the existing SQL Server is using a Default Instance.

Steps 1 through 5 are on the new and/or existing SQL Server.

  1. Install SQL Server 2016 or later.
    1. Mixed Mode Authentication
    2. Service Broker enabled
    3. TCP protocol enabled
  2. Open port 1433 in Windows Firewall for SQL Server using this cmd: netsh advfirewall firewall add rule name= "SQL Server 1433 Inbound" dir=in action=allow protocol=TCP localport=1433
  3. Create a folder for temporary import purposes. These instructions assume this folder is C:\SCMIG. This folder can be deleted after the migration. Create the folder using this cmd: md c:\SCMIG
  4. Create another folder where the migrated database files will be stored permanently by SQL Server. In these instructions we are using C:\ScDB. Create the folder using this cmd: md c:\ScDB
  5. Create a user account and database for Supercharger. Specify a secure password in place of ???  Run the following command to perform this step:  sqlcmd -Q "USE MASTER; CREATE LOGIN ScManagerDbUser WITH PASSWORD=N'???', CHECK_EXPIRATION=OFF; GRANT CONNECT ANY DATABASE TO ScManagerDbUser; ALTER SERVER ROLE [sysadmin] ADD MEMBER ScManagerDbUser; CREATE DATABASE Supercharger"
    If any errors are reported in this step, STOP, take a screen print and contact support.
  6. Steps 6 through 8 are on the Supercharger Manager server. Stop the Supercharger Controller service and disable it using
    • sc stop "Supercharger Controller"
    • sc config "Supercharger Controller" start=disabled


  7. Create a folder for backup purposes by running md c:\SCMIG. These instructions assume this folder is C:\SCMIG. This folder can be deleted after the migration.
  8. Backup the Supercharger registry settings by running reg export HKLM\Software\MTG\Supercharger\Manager c:\scmig\Backup.reg 

    If any errors are reported in this step, STOP, take a screen print and contact support.
  9. On the SQL Server, target Supercharger in the registry. Run reg add HKLM\Software\MTG\Supercharger\Manager /v Server /d ??? /f
    Replace ??? with the new SQL Server's DNS name. If the existing SQL Server is a named instance, that must be added as sql.acme.com\instance.

    If any errors are reported in this step, STOP, take a screen print and contact support.
  10. On the Supercharger Server, backup the existing Supercharger DB. Run sqlcmd -Q "BACKUP DATABASE supercharger TO DISK = 'C:\scmig\sc.BAK'"

    If any errors are reported in this step, STOP, take a screen print and contact support.
  11. Shutdown SQL Services and disable it. Use these commands:
    • sc stop "MSSQL$SUPERCHARGER"
    • sc config "MSSQL$SUPERCHARGER" start=disabled

  12. Copy the sc.BAK file from step 10 above to the new SQL Server. Again, these steps assume this folder is C:\SCMIG\ on both servers.

  13. Restore the database to the new SQL Server. In these instructions we are using C:\SCMIG\ as our database backup location from step 3 above. We are also using C:\ScDB from step 4 above. Run these two commands on the new SQL Server:

    • sqlcmd -Q "EXEC SP_ADDUMPDEVICE 'DISK', 'SCDUMP', 'C:\scmig\SC.BAK';"
    • sqlcmd -Q "RESTORE DATABASE Supercharger FROM SCDUMP WITH REPLACE,MOVE 'Supercharger' TO 'C:\ScDB\Supercharger.mdf', MOVE 'Supercharger_log' TO 'C:\ScDB\Supercharger_log.ldf' "


    If any errors are reported in this step, STOP, take a screen print and contact support.

  14. On the SQL Server create the special registration account for the collectors. This is a known password, but the account only has INSERT ONLY permissions to the registration request table as part of the secure admin-controlled collector agent registration process. Run this command:  
    sqlcmd -Q “CREATE LOGIN ScControllerRegistrationUser WITH PASSWORD='xR0oa5bB9Po98DS3jgz', CHECK_EXPIRATION=OFF; USE Supercharger; ALTER USER ScControllerRegistrationUser WITH LOGIN = ScControllerRegistrationUser;”

    If any errors are reported in this step, STOP, take a screen print and contact support.

  15. Test connectivity to the new SQL Server. If this fails, you will have to diagnose this issue. The first to check is to make sure that the firewall is configured correctly according to step 2 above. The easiest way to test connectivity is to follow the steps in this blog post on the Supercharger Manager server.

  16. On the Supercharger Manager server, set the Supercharger Controller service back to Automatic and Enable it.

    • sc config "Supercharger Controller" start=auto
    • sc start "Supercharger Controller"
  17. Open Supercharger and wait. You should receive the Supercharger Database and Manager and Service Status page. Click on "Configure".
  18. Enter the required information.
    • Server = FQDN of the new SQL Server
    • Database, Username and Password were set in Step 5 above.
    • After clicking on "Save, if you receive the same previous "BadCredentials" screen, please verify that the SQL account (in our example ScManagerDbUser) is not locked.

  19. Verify that the Supercharger service is running and that you can see the Explorer page. The manager collector should be yellow or green, not red. All other collectors will be red.

  20. Open the Local Machine page and copy the current authenticator key to your clipboard.

  21. On each collector you will have to perform steps 21 through 26. Stop the Supercharger Controller service. Run sc stop "Supercharger Controller"

  22. Add the registration authenticator to the registry where ??? is the authenticator key. Run this command: 
    reg add HKLM\Software\MTG\Supercharger\Controller /v RegistrationAuthenticator /d “???” /f 

    If any errors are reported in this step, STOP, take a screen print and contact support.

  23. Modify the Server registry value for the collector. Run this command and for ??? use the FQDN of the new SQL Server: 
    reg add HKLM\Software\MTG\Supercharger\Controller\Db /v Server /d "???" /f

  24. On each collector you will also have to clear the login key in the registry. Run this command: 
    reg add HKLM\Software\MTG\Supercharger\Controller\Db /v Login /d "" /f 

  25. Start the Supercharger service using this command: sc start "Supercharger Controller"

  26. In Supercharger Manager, you will eventually receive an "Approve" button for each collector from the previous two steps. Click approve, confirm it and in a few minutes the collector should change from red to yellow or green.

This page was: Helpful | Not Helpful