Welcome to Port3101.org : Your BES Connection Mark forums read | View Forum Leaders
Port3101.org : Your BES Connection



Reply
LinkBack (1) Thread Tools Display Modes
KB03569 - DB Upgrade Failed. Error Executing SQL statement
 
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 09-14-2009, 09:50 PM
hdawg's Avatar
Proprietor
 
Join Date: Nov 2008
Posts: 2,257
Blog Entries: 147
Default KB03569 - DB Upgrade Failed. Error Executing SQL statement

KB03569 - DB Upgrade Failed. Error Executing SQL statement


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®
  • Microsoft® SQL Server®
  • Microsoft SQL Server Desktop Engine (MSDE)
  • SDR39550
  • SDR94195



Overview

When installing or upgrading the BlackBerry Enterprise Server, the following error message appears:
DB Upgrade Failed. Error Executing SQL statement.
The installation can continue, but the BlackBerry Configuration Database is created with errors and does not function properly.



Cause

This issue may be caused by one of the following:
  1. Microsoft SQL Server clustering is configured for failover.
  2. The MDSS and MDSS_Dis databases already exist.
  3. Mixed-mode authentication is not turned on.
  4. The account used to install the BlackBerry Enterprise Server software is not assigned the administrator role.
  5. A duplicate job exists.
  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 Microsoft SQL server to upgrade the BlackBerry Configuration database.
  10. The BlackBerry Enterprise Server cannot register the version of the BlackBerry Configuration database.
  11. The BlackBerry Enterprise Server was installed using a Microsoft SQL Server, but the database was downgraded to MSDE.



Resolution

Complete the appropriate resolution for the cause.
Cause 1 (IBM Lotus Domino only)

Warning: The following procedure involves modifying the computer registry. This can cause substantial damage to the Windows® operating system. Document and back up the registry entries prior to implementing any changes.
Microsoft SQL Server clustering is configured for failover. The BlackBerry Enterprise Server installation program tries 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

To resolve this issue, 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 by completing the following steps:
  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.
  5. Complete the configurations.
  6. Restart the BlackBerry Enterprise Server add-in task.

Cause 2

The MDSS and MDSS_Dis databases already exist.
Resolution

To resolve this issue, delete the existing BlackBerry Configuration Databases and continue the installation process. This will create the BlackBerry Configuration Database.

Cause 3

Mixed-mode authentication is not turned on.
Resolution

To resolve this issue, complete the following steps:
  1. Enable mixed-mode authentication. For more information, see article 325022 in the Microsoft Support Knowledge Base.
  2. Delete the existing BlackBerry Configuration Database and continue the installation process. This will create the BlackBerry Configuration Database.

Cause 4

The account used to install the BlackBerry Enterprise Server software is not assigned the administrator role.
Resolution

To resolve this issue, complete the following steps:
  1. Grant the administrator role to the account being used for installation.
  2. Delete the existing BlackBerry Configuration Database and continue the installation process. This will create the BlackBerry Configuration Database.

Cause 5

Warning: The following procedure involves modifying the computer registry. This can cause substantial damage to the Windows operating system. Document and back up the registry entries prior to implementing any changes.
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'. Specify @job_id instead of @job_name to uniquely identify the job
The duplicate job exists because there is a new computer name for the computer hosting the Microsoft SQL Server or MSDE.
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 Windows Trusted Authentication, type the following:
    osql -S <BlackBerry_Enterprise_Server_name> -E
    For Microsoft SQL Server Authentication, type the following:
    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 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 = ''
    2> go
  5. Close the command prompt.
Resolution 2

Complete the following steps:
  1. Change the computer name of the computer hosting the Microsoft SQL Server or MSDE Server back to the original name. For more information, see article 281642 in the Microsoft Support Knowledge Base.
  2. Determine what the original Microsoft SQL Server name was at the time that the Microsoft SQL Server job was created.
  3. Perform the following Microsoft SQL Server query when connected to the Microsoft SQL Server through Object-Structured Query Language (OSQL) as per step 2 from Resolution 1 above.
    1> use msdb



    2>
    go



    1>
    select job_id, originating_server, name from sysjobs



    2>
    where name = ''RIMPurgeHistoryBESMgmt'



    3> go
  4. Change the computer name of the computer hosting the Microsoft SQL Server or MSDE back to the original name from the above query result.
  5. Follow the steps in Resolution 1 above to remove the job.
For more information, see article 281642 in the Microsoft Support Knowledge Base.
Resolution 3
Back up the BlackBerry Configuration Database and restore it with a different name. Then, perform the BlackBerry Enterprise Server upgrade again.
  1. Connect to the BlackBerry Configuration Database.
  2. At the command prompt, type one of the following commands.
    For Windows Trusted Authentication, type the following:
    osql -S <BlackBerry_Enterprise_Server_name> -E
    For Microsoft SQL Server Authentication, type the following:
    osql -S <BlackBerry_Enterprise_Server_name> -U <user_name> -P <password>
  3. 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
  4. Upgrade the BlackBerry Enterprise Server 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

To resolve this issue, see 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

To work around this issue, back up the BlackBerry Configuration Database manually and clear the Backup database checkbox during the installation.
The upgrade should finish correctly. A backup of the BlackBerry Configuration Database should be created prior to any upgrade in case a previous version must be restored.

Cause 8
The transation log for the BlackBerry Configuration Database is full.
Resolution
To resolve this issue, enlarge or shrink the transaction log for the BlackBerry Configuration Database. Fore more information, see KB03968 .

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
To resolve this issue, apply the necessary Microsoft SQL Server permissions for the BlackBerry Enterprise Server administration account. For more information, see KB03633 .

Cause 10
The BlackBerry Enterprise Server cannot register the version of the BlackBerry Configuration database.
To confirm whether this is the cause, look for the following entry in the db install log that is found in C:\Program Files\Research In Motion\BlackBerry Enterprise Server\ConfigUtil\db:
[30000] (11/18 09:53:33.216):{0xD68} SQL being executed:

insert into DB_VERSION (CurrentVersion, BuildDateTime) values ('4.1',N'20060922')

[20000] (11/18 09:53:33.216):{0xD68} SQL Error Message from CBESDBInstaller::ExecuteSql.executeDirect: SQLSTATE: 42S02 Native error: 208 Message: Invalid object name 'DB_VERSION'.

[20000] (11/18 09:53:33.216):{0xD68} Problem setting db version
Resolution
To resolve this issue, complete the following steps:
  1. Back up the BlackBerry Configuration Database.
  2. Run the setup.exe file from the installation folder of the BlackBerry Enterprise Server.
  3. Run the database installation of the BlackBerry Configuration Database.

Cause 11
Warning: The following procedure involves modifying the computer registry. This can cause substantial damage to the Windows operating system. Document and back up the registry entries prior to implementing any changes.
The BlackBerry Enterprise Server was installed using a Microsoft SQL Server, but the database was downgraded to MSDE.
In this scenario, if you try to upgrade the BlackBerry Enterprise Server, you may receive the following error:

[20000] (10/25 17:47:47.774):{0x1EC0} SQL Error Message from CBESDBInstaller::ExecuteSql.executeDirect: SQLSTATE: 42000 Native error: 50000 Message: Unable to set MDSPushMaxStoredMessages as this feature is disabled for MSDE
Resolution
To resolve this issue, update the MDSPushMaxStoredMessages column to a value of zero in the GlobalSettings table of the BlackBerry Configuration Database. At the command prompt, type the following commands in the specified order:
1> use <database>
2> go
1> update globalsettings set MDSPushMaxStoredMessages = 0
2> go
__________________
http://blog.port3101.org/hdawg/
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.port3101.org/featured-blackberry-kb-articles/1885-kb03569-db-upgrade-failed-error-executing-sql-statement.html
Posted By For Type Date
Data Recovery Reports: BlackBerry Service Solution: Backup Database BES Server This thread Refback 01-19-2010 11:11 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
KB18743 - "Failed (error=5406) to convert XML record" error occurs after 5.0 Upgrade hdawg Featured BlackBerry KB Articles 0 07-30-2009 03:23 PM
KB14246 - "Failed to connect to server. Error: 0x80070422" error message hdawg Featured BlackBerry KB Articles 0 06-18-2009 11:08 AM
KB04953 - DB Upgrade Failed. Error Executing SQL statement. hdawg Featured BlackBerry KB Articles 0 05-26-2009 01:12 PM
KB16184 - DB Upgrade Failed error when upgrading BESMgmr database during BES upgrade hdawg Featured BlackBerry KB Articles 0 01-14-2009 07:44 PM
KB16453 - Error occurred executing a SQL statement when attempting to upgrade.... Si Featured BlackBerry KB Articles 0 11-25-2008 10:58 AM


All times are GMT -4. The time now is 02:17 PM.
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.


 

SEO by vBSEO 3.3.2 PL2