9. Restore connection to SQL Server

As we explained multiple times along this document, all the data regarding VAC are stored into the back-end SQL Server database. For this reason, it’s extremely important that the connection between VAC Service and SQL database is always guaranteed. Aslo, there may be situations where we need to modify this connection settings, for example when we move from the one of the deployments types to another.

In all these cases, we are in a situation where the settings are stored into the database itself, but the database itself is not reachable. VAC however has a specific option to enter the console without the connection to SQL, in order to restore it, or change it.

If we try to connect to VAC when the database connection is lost, we may get this error:

We cannot login if SQL database is not reachable

The message is generic on purpose, as we want to avoid attackers to brute-force the login screen to find out if SQL is down or not, if the user exists, and so on.

As administrators, we can fix the SQL connection with this procedure:

  1. Log into the server running the VAC service;

  2. stop the VAC service using the command line string:
    sc stop VeeamManagementPortalSvc
    
  3. start the VAC in Lightweight Mode, using the command line string:
    sc start VeeamManagementPortalSvc lightweight
    
  4. log locally (or via Remote Desktop) into a machine running VAC Web UI;

  5. Open a browser and point it to the URL https://localhost:1280.

    NOTE: do not use the link created by the installer. That one leads to the FQDN (Fully Qualified Domain Name) of the server, that doesn’t allow to login. Login must happen against the Localhost interface;

  6. Log into the UI using a user that is a local administrator of the Windows machine where VAC service is running. Lightweight Mode always allows local administrators to login in order to fix database connection issues. In a distributed installation, if WEB01 is the Web UI server, and VAC is the VAC server, we will need to log using VAC\Administrator

  7. we are now logged into VAC in Maintenance Mode:

    VAC in Maintenance Mode

    As we can see, there are only two possible operations here, and the default one is to edit the SQL connection settings. Once this is fixed and saved, maintenance mode is disabled and SQL connection is correctly restored.

    SQL connection is restored

NOTE: if we configured VAC theme to use a colour other than the default Blue, we will notice that maintenance mode also reverts back to this colour, because the setting is also stored in the database which is not accessible. When the UI returns to the colour we chose, this is a quick sign that SQL connection has been restored.