When upgrading to BlackBerry Enterprise Server 5.0 SP4 MR7, the installation fails with "Error writing to database."

Article ID: KB36039

Type: Support Content

Last Modified: 06-20-2014

 

Product(s) Affected:

  • BlackBerry Enterprise Server for Microsoft Exchange
  • BlackBerry Enterprise Server for IBM Domino
  • BlackBerry Enterprise Server for Novell GroupWise
CollapseEnvironment
  • BlackBerry Enterprise Server 5.0 SP4 MR7
  • JI 701955
CollapseOverview

When upgrading to BlackBerry Enterprise Server 5.0 SP4 MR7, the installation fails on the Start Services screen. The following error message is displayed:

Error writing to database.

The Setup log will initially show successful database connectivity:

[30000] (05/10 10:40:52.743):{0x2034} [ENV] [DB] Connection String = Server=SQL_Server_Name;Database=BESMgmt;Network=dbmssocn;Trusted_Connection=Yes
[30000] (05/10 10:40:52.743):{0x2034} [ENV] [DB] DBMS Name = Microsoft SQL Server; DBMS Version = 10.50.2500; Provider Name = sqlncli10.dll; Provider Friendly Name = Microsoft SQL Server Native Client 10.0; OLE DB Version = 02.80; Provider Version = 10.0.2531.0; Failover Partner =
[35019] (05/10 10:40:52.743):{0x2034} [ENV] [DB] Database Schema Version: 5.0.4 <5.0.2012.08.09>
[40000] (05/10 10:40:52.743):{0x2034}
Connected to BESMgmt successfully.

Then, the Setup log will show an error connecting to the database:

[30000] (05/10 10:42:38.366):{0x2388} <5>May 10 10:42:38 CRPPBSP01 {0xAE4} 0360: (#30000) CBASAdminSettingsCon::ApplyPub begins - PN[], PNM=-1, HTTPS=-1, HTTP=-1, JNDI=-1, LocJNDI=-1, BASPwd[<NIL>], BASPwdCon[<NIL>], #BAS[0], CES[000 00000 0],
[30000] (05/10 10:42:38.366):{0x2388} <3>May 10 10:42:38 CRPPBSP01 {0xAE4} 0361: (#10000)
CBASAdminSettingsCon::ApplyPub could not execute as database was not connected - PN[], PNM=-1, HTTPS=-1, HTTP=-1, JNDI=-1, LocJNDI=-1, BASPwd[<NIL>], BASPwdCon[<NIL>], #BAS[0], CES[000 00000 0],
[30000] (05/10 10:42:38.366):{0x2388} <3>May 10 10:42:38 CRPPBSP01 {0xAE4} 0362: (#10000) [PIPTOOL]:
Start Service failed to save the BAS Admin Settings container, code [3]
[30000] (05/10 10:42:38.366):{0x2388} <3>May 10 10:42:38 CRPPBSP01 {0x2034} 0363: (#10000) [PIPTOOL]: CStartService::OnCommonFunctionsThreadResult is processing return code of 5 (success=0) for Next Button action.

Despite the error message, the BlackBerry Enterprise Server services may start and run successfully.

CollapseCause

Setup did not re-initialize all of the component or container data after one of the following conditions occurred:

  • The server hosting the BlackBerry Enterprise Server installation was rebooted during the upgrade.
  • Setup was cancelled at the Start Services dialog and then setup ran again.

This resulted in empty data and caused setup to fail to connect to the database.

CollapseResolution
This is a previously reported issue that is being investigated by our development team. A resolution is currently unavailable.
CollapseWorkaround

Workaround steps:

  1. Navigate to one the following registry keys:
    • 32-bit servers: HKEY_LOCAL_MACHINE\SOFTWARE\Research In Motion\BlackBerry Enterprise Server\Setup\
    • 64-bit servers: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Research In Motion\BlackBerry Enterprise Server\Setup\
       
  2. Export the registry key to back it up.
  3. Edit the StepSeq registry value.
  4. In the StepSeq registry value, add 9,2: after 1,2:
    Note: The value of SetupSeq should look similar to the following, although the exact values may differ: 1,2:7,2:17,2:18,2
    • For the example shown above, the value of StepSeq should be modified to:
       
      1,2: 9,2 :7,2:17,2:18,2:
       
  5. Re-run setup for BlackBerry Enterprise Server 5.0 SP4 MR7 while logged in with the account that was originally used to install the BlackBerry Enterprise Server.
    Note: If the account used to run the BlackBerry services was switched after the BlackBerry Enterprise Server was originally installed and before the upgrade, then use that account.
CollapseAdditional Information

After the issue occurs but before the workaround is applied, the following error appears when launching the BlackBerry Server Configuration panel:

Please run Setup.exe to complete the installation before launching the BlackBerry Server Configuration Panel.

Disclaimer

By downloading, accessing or otherwise using the Knowledge Base documents you agree:

   (a) that the terms of use for the documents found at www.blackberry.com/legal/knowledgebase apply to your use or reference to these documents; and

   (b) not to copy, distribute, disclose or reproduce, in full or in part any of the documents without the express written consent of RIM.


Visit the BlackBerry Technical Solution Center at www.blackberry.com/btsc.