Unable to Connect to DB after Upgrade to SQL 2019

After our database team upgraded the Bigfix database to SQL server 2019, I am unable to connect to the database on our test Bigfix server. The DB team also changed the name of the SQL server. I changed the ODBC settings and they test successfully. I restarted all of the Bigfix services and the Bigfix server, and now I am getting the following message. The database is remote.

Unable to login to server. Have you run BESAdmin to create the signing key on the server? Is the server able to connect to the database?

I have run BESAdmin several times, but the same message is returned. Is there something that needs to be done inside BESAdmin? The message says just run it.

Can you get the SQL connections error messages from besrelay.log, or gatherdbdata.log, or filldbdata.log?

What is the SQL Authentication Type? “Windows Integrated” or “SQL Authentication”?

Authentication type is Windows Integrated. However, I am logging onto Bigfix with a local account.

This is what is in the BESRelay.log.

Wed, 05 Apr 2023 09:26:59 -0700 - Main Thread (4188) - Startup failed: error testing database connection: Database Error: The database is not initialized.
Wed, 05 Apr 2023 09:26:59 -0700 - Main Thread (4188) - Will retry in 5 seconds
Wed, 05 Apr 2023 09:27:04 -0700 - Main Thread (4188) - Startup failed: error testing database connection: Database Error: The database is not initialized.
Wed, 05 Apr 2023 09:27:04 -0700 - Main Thread (4188) - Will retry in 5 seconds
Wed, 05 Apr 2023 09:27:09 -0700 - Main Thread (4188) - Startup failed: error testing database connection: Database Error: The database is not initialized.
Wed, 05 Apr 2023 09:27:09 -0700 - Main Thread (4188) - Will retry in 5 seconds
Wed, 05 Apr 2023 09:27:14 -0700 - Main Thread (4188) - Startup failed: error testing database connection: Database Error: The database is not initialized.

This is probably best worked through a support ticket for live troubleshooting, but a couple of things I’d try -

  • Be sure you’re logged into Windows using the same user account that the BES services are using for login and test the ODBC connections. With Windows Integrated Auth to SQL, the ODBC test is using your session logon, so it should be the same account as the Services.

  • Install SQL Management Studio, use that as well to connect to the database. Make sure you can connect to the BFEnterprise database and query it.

It sounds like the account probably has SQL permission to connect to the server, but perhaps does not have permission to connect to the BFEnterprise database. At minimum the service account you’re using should have db_owner permission to the BFEnterprise database.

The problem turned out to be that the ODBC configuration was not correct. I neglected to add the entry to change the default database to: BFEnterprise for the SDN bes_bfenterprise, and BESReporting for the SDN LocalBESReportinServer.

1 Like

Glad to hear you got it sorted, and thanks for posting your solution