Overview
When performing an upgrade of GFI LanGuard, the following error is encountered:
Failed to upgrade the database. Installation will not continue in order to avoid damaging the integrity of the GFI LanGuard Engine.
Environment
GFI LanGuard
Root Cause
Here are some of the possible causes:
- A connection to the SQL server is not established due to incorrect credentials entered for authenticating with the database.
- The account does not have the required permissions.
- The SQL server is not started.
Resolution
Using a Microsoft SQL Server Database Backend
- Check the SQL server connection:
- Verify that the SQL server is accessible by using the SQL Server Management Studio to connect to that server.
- You may also create a connection to the SQL server using the Control Panel Administrative Tools Data Sources (ODBC) tool and perform ODBC test.
- If the credentials provided via GFI LanGuard Database Maintenance when connecting to the SQL database are no longer valid, if the user has been disabled or the password was changed:
- Open GFI LanGuard application, go to Configuration Database Maintenance Options and specify valid credentials for that SQL server.
Once the credentials are validated, close the application and re-initiate the upgrade. - SQL SA account credentials are most likely to have permissions. Enter SA account credentials and proceed with the upgrade process.
- Open GFI LanGuard application, go to Configuration Database Maintenance Options and specify valid credentials for that SQL server.
- If the database file exists already e.g., due to a previously failed installation attempt.
The installation log%temp%\na_na_lnssinstsql.csv
shows the following:
error ","CreateDbOnSQLServerEx - Failed to create the database 'LNSSScanResults12'. Result 7. Additional error details Cannot create file 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.SQLE2012ACMP\MSSQL\DATA\LNSSScanResults12.mdf' because it already exists. Change the file path or the file name, and retry the operation...
- Detach the database from the SQL and delete or rename the MDF and LDF files previously created for the LNSSScanResults12 database.
Using a Microsoft Access Database Backend
If the database is no longer available:
The Microsoft Access database which by default located on %ProgramDataFolder%\GFI\LanGuard XX\scanresults.mdb
was deleted or is stored in a location no longer available e.g., remote SharePoint, removable drive, etc.
- Verify that the Access MDB file location specified in Configuration Database Maintenance Options is valid and that the file is accessible.
NOTE: If LanGuard database was created using an older SQL server version and upgraded on a new SQL server, the process may fail. In this situation verify if it's possible to revert to the previous SQL server version and proceed with the upgrade process of LanGuard.
Priyanka Bhotika
Comments