BlackBerry Administration Service is unable to remain started after an attempt to upgrade the database was unsuccessful "An error occurred while executing a SQL statement"

Article ID: KB24111

Type: Support Content

Last Modified: 01-03-2012

 

Product(s) Affected:

  • BlackBerry Enterprise Server for Novell GroupWise
  • BlackBerry Enterprise Server for Microsoft Exchange
  • BlackBerry Enterprise Server for IBM Lotus Domino
CollapseEnvironment
  • BlackBerry® Enterprise Server and BlackBerry Enterprise Server Express 5.0
  • DT 765824
CollapseOverview

When running the setup application to upgrade the BlackBerry® Enterprise Server the following error occurs:

"An attempt to upgrade the database was unsuccessful. An error occurred while executing an SQL statement"

The following lines appear in the setup<TimeAndDateStamp>.log in the Logs\Installer directory:

[20000] (07/09 20:47:42.895):{0x22B4} [CBESDBInstaller::executeRetryDDL] COM Error 0x80040E2F - IDispatch error #3119 - Source: "Microsoft OLE DB Provider for SQL Server" - Description "Violation of PRIMARY KEY constraint 'PK_BASAuthenticationCredentials'. Cannot insert duplicate key in object 'dbo.BASAuthenticationCredentials'." Native error = 2627
[20000] (07/09 20:47:42.895):{0x22B4} [CBESDBInstaller::executeRetryDDL] COM Error 0x80040E2F - IDispatch error #3119 - Source: "Microsoft OLE DB Provider for SQL Server" - Description "The statement has been terminated." Native error = 3621
[20000] (07/09 20:47:42.895):{0x22B4} [CBESDBInstaller::executeRetryDDL] SQL Error for:
[10000] (07/09 20:47:42.895):{0x22B4} An attempt to upgrade the database was unsuccessful. An error occurred while executing an SQL statement.

 

As a result the BlackBerry® Administration Service process keeps restarting in a loop giving the following error in the logs:


(04/16 14:23:45:931):{main} [org.hibernate.util.JDBCExceptionReporter] [WARN] SQL Error: 208, SQLState: S0002

(04/16 14:23:45:931):{main} [org.hibernate.util.JDBCExceptionReporter] [ERROR] Invalid object name 'BASTimerInitialStartDateTimes'.

(04/16 14:23:45:931):{WorkManager(2)-22} [com.rim.bes.bas.asynchronousmanager.AsynchronousManagerNonClusteredBean] [DEBUG] [BBAS-200] {u=SystemUser, t=260} Enter bean AsynchronousManagerNonClusteredBean.sendObjectMessage

(04/16 14:23:45:931):{WorkManager(2)-22} [com.rim.bes.bas.securitymanager.BASPrincipal] [DEBUG] [BBAS-200] {u=SystemUser, t=261} _checkForAllRoles this user has ALL CAPABILITIES

(04/16 14:23:45:946):{WorkManager(2)-22} [com.rim.bes.bas.serviceinstancemanager.ServiceInstanceManagerBean] [DEBUG] [BBAS-200] {u=SystemUser, t=261} Enter bean ServiceInstanceManagerBean.findServiceInstancesByPlugInAndServiceTypeLocal

(04/16 14:23:45:946):{WorkManager(2)-22} [com.rim.bes.bas.serviceinstancemanager.ServiceInstanceManagerBean] [DEBUG] [BBAS-200] {u=SystemUser, t=261} _findServiceInstance parameters: serviceInstanceId=43, locale=null, includeStatus=false, includeExtendedData=false, loadServiceConsumerRelationhships=false, loadServiceProducerRelationships=false

(04/16 14:23:45:946):{WorkManager(2)-22} [com.rim.bes.bas.securitymanager.BASPrincipal] [DEBUG] [BBAS-200] {u=SystemUser, t=262} _checkForAllRoles this user has ALL CAPABILITIES

(04/16 14:23:45:946):{main} [com.rim.bes.bas.BASExceptionStackInterceptor] [WARN] [BBAS-2007] {u=SystemUser, t=258} Caught unhandled RuntimeException in org.jboss.ejb3.EJBContainerInvocation method onStartupPerformStartupOperationsLocal - javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query


*** Start of original stack trace ***

 

javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query

    at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)

    at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)

    at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)

CollapseCause
The BASAuthenticationCredentials table already contains a row with the CredentialIdentifier of AD:
CollapseResolution

This is a previously reported issue that is being investigated by our development team. No resolution time frame is currently available.

CollapseWorkaround
Please contact support to obtain the Microsoft® SQL Server® script to remove the entry from the database.

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.