Server Upgrade Error Due to a Critical Database Script “add_server_role”
search cancel

Server Upgrade Error Due to a Critical Database Script “add_server_role”

book

Article ID: 286671

calendar_today

Updated On:

Products

Carbon Black App Control (formerly Cb Protection)

Issue/Introduction

During the Server upgrade process an error is displayed similar to:

A critical database script "add_server_role" needed to install the App Control Server failed with an error.

Once the "Ok" button is selected the upgrade completes. At this point the server was partially upgraded, the database was successfully upgraded, but the web Console and some registry values were only partially updated.

Environment

  • App Control Server: 8.10.2+

Cause

The error is displayed when the SQL Server doesn't have a login principal with name "SA" configured.

Resolution

  1. Verify the Service Account has the correct SQL permissions.
  2. Log in to the server with the App Control Service Account
  3. If an Agent is installed on the application server temporarily
  4. Open Control Panel > Programs > Uninstall Carbon Black App Control Server
  5. Run the Server Installer again > Don't accept the conditions just yet
  6. Navigate to the following folder: C:\Users\<AppCServiceAcct>\AppData\Local\Temp
  7. Order by date modified and find the most recent folders
  8. Search for the following file: 
    C:\Users\<AppCService>\AppData\Local\Temp\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX}\{ECD2D524-718A-4A49-8026-337428C013EB}\add_server_role.sql
  9. Open the file "add_server_role.sql" in Notepad and find the following file:
    CREATE SERVER ROLE [AppCWebServer] AUTHORIZATION SA;
  10. Update the line to: 
    CREATE SERVER ROLE [AppCWebServer];
  11. Save the changes to "add_server_role.sql"
  12. Continue with the server setup wizard and App Control will install successfully afterwards