Go Back   The Unofficial BlackBerry Support Forum > BlackBerry Enterprise Server > General BES Discussion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 26-07-2007, 11:30 PM
BESadmin's Avatar
Administrator
Join Date: Aug 2006
Posts: 1,951
Images: 788
DB Upgrade Failed. Error Executing SQL statement

DB Upgrade Failed. Error Executing SQL statement

Doc ID : KB03569
Last Modified : 2007-07-24
Document Type : Support

Environment
  • BlackBerry® Enterprise Server software version 4.1
  • BlackBerry® Enterprise Server software version 4.0 for IBM® Lotus® Domino®
  • BlackBerry® Enterprise Server software version 4.0 for Microsoft® Exchange
  • BlackBerry® Enterprise Server software versions 4.0 Service Pack 3 (4.0.3) and 4.1 Service Pack 2 (4.1.2) for Novell® GroupWise®
  • BlackBerry® Mobile Data System (BlackBerry MDS)
  • Microsoft® SQL Server™
  • Microsoft SQL Server Desktop Engine (MSDE)
  • SDR39550
  • SDR94195
Warning: The procedures in this article may involve modifying databases used by the BlackBerry Enterprise Server. This can cause irreparable damage, resulting in unexpected server behavior or service failure. Back up the databases prior to implementing any changes.

Problem


When installing or upgrading the BlackBerry Enterprise Server, you receive the following error message:
DB Upgrade Failed. Error Executing SQL statement.
Although the installation can continue, the BlackBerry Configuration Database will be created with errors and will not function properly.

Cause

There are several possible causes for this problem.
  1. Clustering on multiple Microsoft SQL Servers has been setup for failover in the environment.
  2. The MDSS and MDSS_Dis databases already exist.
  3. Mixed-mode authentication is not enabled.
  4. The account used to install the BlackBerry Enterprise Server software is not assigned the System Administrator role.
  5. A duplicate job exists if Microsoft SQL Server configurations are set up in the BlackBerry Server Configuration tool.
  6. The DefaultData and DefaultLog registry value paths are blank or do not exist.
  7. The BlackBerry Enterprise Server could not create a backup file of the BlackBerry Configuration Database prior to upgrading the schema.
  8. The transaction log for the BlackBerry Configuration Database is full.
  9. The BlackBerry Enterprise Server administration account does not have the necessary permissions on the SQL server to upgrade the database.
Resolution

Complete the appropriate resolution for the cause.

Cause 1 (IBM Lotus Domino only)

Clustering on multiple Microsoft SQL Servers has been set up for failover in the environment. The BlackBerry Enterprise Server installation program is trying to create a similar clustered index in the SyncUserState table during the BlackBerry Configuration Database schema update.

If you upgrade and restart the BlackBerry Enterprise Server, you may receive an error message while setting up Microsoft SQL Server configurations in the BlackBerry Server Configuration panel.


In this case, the DB_InstallV<date_time>.log file under C:\Program Files\Research In Motion\BlackBerry Enterprise Server\ConfigUtil\db displays the following entries:
[10000] (12/09 16:11:42):{0x1468} SQL Error Message fromCBESDBInstaller::ExecuteSql.executeDirect: SQLSTATE: 42000 Native error:
1902 Message: Cannot create more than one clustered index on table 'SyncUserState'. Drop the existing clustered index 'SyncUserState6' before creating another.
Resolution

Contact the Microsoft SQL Server database administrator to delete the clustered index as stated in the DB_InstallV<date_time>.log file.

Once this index is deleted, close the BlackBerry Enterprise Server add-in task in the IBM Lotus Domino console and configure the BlackBerry Configuration Database again in the BlackBerry Server Configuration Panel.
  1. Go to the BlackBerry Server Configuration panel.
  2. Click the Database Connectivity tab.
  3. Click the Change Database button.
  4. Re-type the Microsoft SQL Server and BlackBerry Configuration Database name and complete the configurations.
  5. Restart the BlackBerry Enterprise Server add-in task.
Cause 2

The MDSS and MDSS_Dis databases already exist.

Resolution

Delete the existing BlackBerry Configuration Databases from the MSDE or Microsoft SQL Server (depending on the environment), and then continue the installation process. This should create the BlackBerry Configuration Database.

Cause 3

Mixed-mode authentication is not enabled.

Resolution

Complete the following steps:
  1. Enable mixed-mode authentication. For more information, search for article 325022 in the Microsoft Support Knowledge Base.
  2. Delete the existing BlackBerry Configuration Databases from the MSDE or Microsoft SQL Server (depending on your environment), and then continue the installation process. This should create the BlackBerry Configuration Database.
Cause 4

The account used to install the BlackBerry Enterprise Server software is not assigned the System Administrator role.

Resolution

Complete the following steps:
  1. Grant the System Administrator role to the account being used for installation.
  2. Delete the existing BlackBerry Configuration Databases from the MSDE or Microsoft SQL Server (depending on the environment), and then continue the installation process. This should create the BlackBerry Configuration Database.
Cause 5


A duplicate job starting with RIM (such as RIMPurgeHistoryBESMgmt) exists. The setup<date>.log file located in <drive>:\Program Files\Research In Motion\BlackBerry Enterprise Server\logs\installer displays the following lines:
SQL Error Message from CBESDBInstaller::ExecuteSql.executeDirect: SQLSTATE: 42000 Native error: 14293 Message: There are two or more jobs named 'RIM<job_name>'. Specify @job_id instead of @job_name to uniquely identify the job
The duplicate job exists because there is a new machine name for the Microsoft SQL Server or MSDE Server.

There are multiple resolutions associated with this cause.

Resolution 1

If you have Microsoft SQL Server Enterprise Manager installed, complete the following steps:
  1. Open the Microsoft SQL Server Enterprise Manager.
  2. Expand the BlackBerry Enterprise Server hosting the BlackBerry Configuration Database.
  3. Go to Management/SQL Server Agent and select Jobs.
  4. Delete all job instances that begin with RIM.
  5. Restart the installation process.
If you do not have Microsoft SQL Server Enterprise Manager installed, complete the following steps:
  1. Connect to the BlackBerry Configuration Database.
  2. At the command prompt, type one of the following commands:
    For Microsoft Windows® Trusted Authentication:
    osql -S <BlackBerry_Enterprise_Server_name> -E
    For Microsoft SQL Server Authentication:
    osql -S <BlackBerry_Enterprise_Server_name> -U <user_name> -P <password>
  3. To remove the duplicate job, type the following commands in the specified order:
    1> use msdb
    2> go
    1> select job_id, name from sysjobs
    2> where name = 'RIM<job_name>'
    3> go
    The results of the query are returned as shown below.
    1> EXEC sp_delete_job @job_id = '<id string from the above query>'
    2> go
  4. Repeat the following commands from the previous step for each job_id returned in the previous step's query: 1> EXEC sp_delete_job @job_id = '<id string from the above query>'
    2> go
  5. Close the command prompt.
Resolution 2

Change the computer name of the Microsoft SQL Server or MSDE Server back to its original name. For more information, search for article 281642 in the Microsoft Support Knowledge Base.

Resolution 3

Back up the original BlackBerry Configuration Database and restore it with a different name. Then, perform the BlackBerry Enterprise Server upgrade again.
  1. Complete steps 1 and 2 in Cause 5, Resolution 1 (when Microsoft SQL Server Enterprise Manager is not installed).
  2. At the command prompt, type the following commands in the specified order:
    1> backup database <database_name> to disk = 'c\<filename>'
    2> go
    1> restore database <database_name>2 from disk = 'c:\<filename>' with recovery, replace
    2> go
  3. Upgrade the BlackBerry Enterprise Server software version again.
Cause 6

The DefaultData and DefaultLog registry values that correspond to the default data directory and the default log directory exist, but the folder paths in the registry values are blank or do not exist.

Resolution

For more information, search for article 836873 in the Microsoft Support Knowledge Base.

Cause 7

The BlackBerry Enterprise Server could not create a backup file of the BlackBerry Configuration Database prior to upgrading the schema.

In this case, the DB_InstallV<date_time>.log file under C:\Program Files\Research In Motion\BlackBerry Enterprise Server\ConfigUtil\db has the following entries:
[10000] (02/26 15:55:20):{0x1784} SQL Error Message from CBESDBInstaller::ExecuteSql.stillEx: SQLSTATE: 42000 Native error: 3202 Message: Write on 'C:\NotesBESMgmt\data\NotesBESMgmtBKUP.bak' failed, status = 112. See the SQL Server error log for more details.
[10000] (02/26 15:55:20):{0x1784} SQL Error Message from CBESDBInstaller::ExecuteSql.stillEx: SQLSTATE: 42000 Native error: 3013 Message: BACKUP DATABASE is terminating abnormally.
[10000] (02/26 15:55:20):{0x1784} Terminating because backup had a problem. See log file for details
Workaround

Back up the BlackBerry Configuration Database manually and clear the Backup database checkbox during the installation.

The upgrade should finish correctly. It is advisable to create a backup of the BlackBerry Configuration Database prior to any upgrade in case you must return to a previous version.

Cause 8

The BlackBerry Configuration Database transation log is full.

Resolution

Refer to KB03968 to enlarge or shrink the transaction log for the BlackBerry Configuration Database.

Cause 9

The BlackBerry Enterprise Server administration account does not have the required permissions on the Microsoft SQL Server to upgrade the BlackBerry Configuration Database.

Resolution

Refer to KB03633 to apply the necessary SQL permissions for the BlackBerry Enterprise Server administration account.
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move the BlackBerry Configuration Database to a new server instance BESadmin General BES Discussion 1 24-03-2008 12:50 AM
Move X amount of users from one environment to another with diff SQL versions. Live2Ride General BES Discussion 3 12-09-2007 11:43 AM
MSDE to SQL Server 2005 migration JeffreyK Microsoft Exchange 1 28-08-2007 08:07 PM
Permissions required for a BlackBerry Enterprise Server upgrade BESadmin General BES Discussion 0 15-06-2007 07:23 PM
How to move from MSDE to SQL BESadmin General BES Discussion 1 23-10-2006 12:10 AM


All times are GMT +11. The time now is 08:05 AM.

Copyright ©2006 - 2010 BLACKBERRYFORUMS - This website and its members are not affiliated with Research in Motion (RIM). RIM and BlackBerry are Registered Trademarks of Research In Motion


Search Engine Friendly URLs by vBSEO 3.5.0 RC2