Forum Discussion

JonHunt's avatar
JonHunt
Level 5
5 years ago

How to change database connection details for NSS?

How do i change the database connection details for the NSS databases in the case of a password change or server change?

  • Changing DB connection details in NSS 8.1.2 and 8.2.

    There are two main components to NSS – the portal (request management, Front Office) and the NetBackup Adapter (the NBU-specific web services) – each has their own database (tends to always be on the same SQL Server)

    In the application files of the above, a database connection string is held in multiple, encrypted config files.

    So, in order to make changes to the connection string, the following steps must be followed for both portal and adapter:

    • Stop Biomni Windows service on web server
    • Decrypt the config files (single batch file to run on both portal and adapter)
    • Update the DB connection strings in multiple config files
    • Start Biomni Windows service on web server
    • Test
    • Re-encrypt the config files (single batch file to run on both portal and adapter)

     

    Notes on above:

    Decrypting Portal config files:

    1. Find the following file in the application files on web server:
      …\Biomni\Front Office 9.x\MSBuild\ConfigDecrypt.bat
    2. Run the batch file. Enter Y when prompted.

     

    Updating Portal config files:

    1. Update the database connection strings in the following files:
      (the line for editing starts with: <add name="MainDBConnectionString" connectionString="):
      …\Biomni\Front Office 9.x\PublicWebService\web.config
      …\Biomni\Front Office 9.x\Website\web.config
      …\Biomni\Front Office 9.x\ServiceHost\DirectaSvcHost.exe.config

     

    Decrypting Adapter config files:

    1. a) Find the following file in the application files on web server:

    …\Biomni\NetBackup Self Service Adapter 8.x\MSBuild\ConfigDecrypt.bat

    1. Run the batch file. Enter Y when prompted.

     

    Updating Adapter config files:

    1. Update the database connection strings in the following files
      (the line for editing starts with: <add name="AdapterDb" connectionString="):
      …\Biomni\NetBackup Self Service Adapter 8.x\NetBackupAdapterPanels\web.config
      …\Biomni\NetBackup Self Service Adapter 8.x\NetBackupAdapterServices\web.config
      …\Biomni\NetBackup Self Service Adapter 8.x\NetBackupAdapterTasks\bin\app.config

     

    Once files have been updated, NSS can run with them in an unencrypted state. 

    Restart the Windows service at this stage, prior to testing.

    For convenience, best to test while unencrypted.  When you’re happy the database connection is sound (and you don’t need to make any further changes/fixes to the files), you can then re-encrypt them using:

    Portal: …\Biomni\Front Office 9.x\MSBuild\ConfigEncrypt.bat
    Adapter: …\Biomni\NetBackup Self Service Adapter 8.x\MSBuild\ConfigEncrypt.bat

1 Reply

  • Changing DB connection details in NSS 8.1.2 and 8.2.

    There are two main components to NSS – the portal (request management, Front Office) and the NetBackup Adapter (the NBU-specific web services) – each has their own database (tends to always be on the same SQL Server)

    In the application files of the above, a database connection string is held in multiple, encrypted config files.

    So, in order to make changes to the connection string, the following steps must be followed for both portal and adapter:

    • Stop Biomni Windows service on web server
    • Decrypt the config files (single batch file to run on both portal and adapter)
    • Update the DB connection strings in multiple config files
    • Start Biomni Windows service on web server
    • Test
    • Re-encrypt the config files (single batch file to run on both portal and adapter)

     

    Notes on above:

    Decrypting Portal config files:

    1. Find the following file in the application files on web server:
      …\Biomni\Front Office 9.x\MSBuild\ConfigDecrypt.bat
    2. Run the batch file. Enter Y when prompted.

     

    Updating Portal config files:

    1. Update the database connection strings in the following files:
      (the line for editing starts with: <add name="MainDBConnectionString" connectionString="):
      …\Biomni\Front Office 9.x\PublicWebService\web.config
      …\Biomni\Front Office 9.x\Website\web.config
      …\Biomni\Front Office 9.x\ServiceHost\DirectaSvcHost.exe.config

     

    Decrypting Adapter config files:

    1. a) Find the following file in the application files on web server:

    …\Biomni\NetBackup Self Service Adapter 8.x\MSBuild\ConfigDecrypt.bat

    1. Run the batch file. Enter Y when prompted.

     

    Updating Adapter config files:

    1. Update the database connection strings in the following files
      (the line for editing starts with: <add name="AdapterDb" connectionString="):
      …\Biomni\NetBackup Self Service Adapter 8.x\NetBackupAdapterPanels\web.config
      …\Biomni\NetBackup Self Service Adapter 8.x\NetBackupAdapterServices\web.config
      …\Biomni\NetBackup Self Service Adapter 8.x\NetBackupAdapterTasks\bin\app.config

     

    Once files have been updated, NSS can run with them in an unencrypted state. 

    Restart the Windows service at this stage, prior to testing.

    For convenience, best to test while unencrypted.  When you’re happy the database connection is sound (and you don’t need to make any further changes/fixes to the files), you can then re-encrypt them using:

    Portal: …\Biomni\Front Office 9.x\MSBuild\ConfigEncrypt.bat
    Adapter: …\Biomni\NetBackup Self Service Adapter 8.x\MSBuild\ConfigEncrypt.bat