14 Replies Latest reply on Mar 14, 2018 8:26 AM by Bill Robinson

    BSA Database issue

      Trying to run some tests in the QA environment, and when we do this we will normally sync up our QA environment to look like our production environment.  So we pulled a backup of our production database and restored our QA database with it (destroyed and recreated our QA database based on the backup of production).  When attempting to restart blappserv it fails with an odd constraint issue:


      [08 Aug 2014 09:29:34,820] [main] [ERROR] [::] [] Error installing to Start: name=bladelogic.service.AppServerService state=Create

      com.bladelogic.om.infra.app.service.ServiceInitializationException: com.bladelogic.om.infra.app.db.DBException: An error occurred while attempting to access the database:

      Message : ORA-00001: unique constraint (BLADELOGIC.XPKBL_VALUE) violated

      SQLState: 23000 ErrorCode: 1


      I was able to run blappconf to sync up the passwords, but am sure I have missed something.  What have I missed???

        • 2. Re: BSA Database issue

          Unluckily not...  We had issues connecting to the database, but the blappconf gets past the first page which means it was able to login.  And, we aren't getting the specific error it is giving in the kb.  One of the BMC support tech's is saying that we need to reinstall BladeLogic to be able to do this???


          Most likely the tech is going to end up right, and I am going to be wrong...  But it doesn't make sense why as I didn't think there was that much information outside of the database?  And at worst I would think I could run blappconf with the install flag?

          • 3. Re: BSA Database issue
            Bill Robinson

            How did you export the prod db ?

            • 4. Re: BSA Database issue
              Joe Piotrowski

              Could this have anything to do with the file server storage not being somewhat in sync with the database?

              • 5. Re: BSA Database issue
                Monoj Padhy

                I don't find file server sync as a problem. We can modify the file server

                location at anytime for an running bsa environment and for sure during that

                time database is not in sync with the new file server location. But we can

                still have access to bsa.


                This must be something related to database issue or may be some user

                lockout. A similar scenario is explained in the kb article in my previous


                • 6. Re: BSA Database issue
                  Barry McQuillan



                  Its possible that the Database connection is defined incorrectly in one of the other deployed instances.

                  When cloning a BSA environment I always have the following step included:


                  1. Check that all appserver deployments have correct database connection details in: <NSH_DIR>/br/deployments/<instanceName>/services/asDataSourceService.xml

                  Using blappconf doesn't change all of these files, be especially sure to check:




                  Check connection string and user.

                  • 7. Re: BSA Database issue

                    Derrick, I wish to ask same question Bill has asked ..


                    How did you export the prod db ?


                    Looking at error you posted, which looks similar to error mentioned in below Kb page



                    1 of 1 people found this helpful
                    • 8. Re: BSA Database issue

                      We opened a ticket with BMC and they also believe the export was done incorrectly.  I believe this is the KB they referenced, but I cannot get access to this KB so I couldn't mark your response as the answer to my question.  Thanks for the information though!

                      • 9. Re: BSA Database issue
                        Monoj Padhy

                        Error: Article not found.

                        Ruturaj D can you post the KB content here ? I think the KB is only for internal use.

                        • 10. Re: BSA Database issue
                          Joseph Schuler


                          Knowledge Article

                          BSA: ORA-00001: unique constraint (BLADELOGIC.XPKBL_VALUE) violated SQLState: 23000 ErrorCode: 1

                          Knowledge Article ID:  KA396202
                          Version:  1.1
                          Available To:  External
                          Status:  Unpublished
                          Updated:  07/02/2014



                          SQLState: 23000 ErrorCode: 1


                          LP: BMC BladeLogic Server Automation Suite 8.2.01
                          DR: BMC BladeLogic Database and Migration 8.2.01


                          Details: BladeLogic Version:
                          Database: Oracle 11g R2


                          In order to troubleshoot some of our production issues, we restored a backup of our Production Database and File Server in our Dev/QA environment. This environment consists of a single Windows Application Server and a Linux File Server.


                          After we restored the Database and File Servers are there any other actions/tasks we need to do to get it running our Dev/QA environment?


                          The Database restore appeared to be successful. The database started up with no problems. When I ran through the Configuration Wizard, there are no problems.


                          When I start the Application Server for the first time, I get the following Error (full log is attached to this ticket):


                          [22 Mar 2013 15:45:27,337] [main] [ERROR] [::] [] Error installing to Start: name=bladelogic.service.AppServerService state=Create
                          com.bladelogic.om.infra.app.service.ServiceInitializationException: com.bladelogic.om.infra.app.db.DBException: An error occurred while attempting to access the database:
                          Message : ORA-00001: unique constraint (BLADELOGIC.XPKBL_VALUE) violated
                          SQLState: 23000 ErrorCode: 1


                          at com.bladelogic.om.infra.app.service.appserver.DefaultAppServerServiceImpl.start(DefaultAppServerServiceImpl.java:439)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                          at java.lang.reflect.Method.invoke(Unknown Source)
                          at org.jboss.joinpoint.plugins.reflect.ReflectMethodJoinPoint.dispatch(ReflectMethodJoinPoint.java:72)
                          at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$DispatchJoinPoint.run(KernelControllerContextActions.java:631)
                          at java.security.AccessController.doPrivileged(Native Method)
                          at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextActions.java:99)
                          at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelControllerContextActions.java:452)
                          at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$1.run(KernelControllerContextActions.java:156)
                          at java.security.AccessController.doPrivileged(Native Method)
                          at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:179)
                          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
                          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
                          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
                          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
                          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
                          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
                          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151)
                          at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:291)
                          at com.bladelogic.om.infra.app.service.bootstrap.ServiceBeanXMLDeployer.deployBean(ServiceBeanXMLDeployer.java:38)
                          at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:261)
                          at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:117)
                          at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:91)
                          at com.bladelogic.om.infra.app.service.bootstrap.ServiceBootstrap.deploy(ServiceBootstrap.java:252)
                          at com.bladelogic.om.infra.app.service.bootstrap.ServiceBootstrap.deployService(ServiceBootstrap.java:199)
                          at com.bladelogic.om.infra.app.service.bootstrap.ServiceBootstrap.bootstrap(ServiceBootstrap.java:153)
                          at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:91)
                          at com.bladelogic.om.infra.app.service.bootstrap.ServiceBootstrap.startup(ServiceBootstrap.java:66)
                          at com.bladelogic.om.infra.mfw.fw.BlManager.start(BlManager.java:881)
                          at com.bladelogic.om.infra.mfw.fw.BlManager.main(BlManager.java:1401)
                          Caused by: com.bladelogic.om.infra.app.db.DBException: An error occurred while attempting to access the database:
                          Message : ORA-00001: unique constraint (BLADELOGIC.XPKBL_VALUE) violated
                          SQLState: 23000 ErrorCode: 1




                          Issue Summary: Restoring a Production BladeLogic Database





                          Please use an export command like this:


                          expdp / full=y directory=DATA_PUMP_DIR dumpfile=exp_dp${ORACLE_SID}_${EXPORT_DATE}.dmp logfile=${ORACLE_SID}_${EXPORT_DATE}_exp.log flashback_time="\"to_timestamp(to_char(sysdate,'mm-dd-yyyy hh24:mi:ss'), 'mm-dd-yyyy hh24:mi:ss')\""


                          and then on import either drop all the user objects before import, or specify an option to replace the existing options w/ the imdp command (TABLE_EXISTS_ACTION=REPLACE)

                          • 11. Re: BSA Database issue
                            Santhosh Kurimilla

                            Joseph Schuler


                            Our Team has followed the same steps as mentioned but, we are still finding the same BLADELOGIC.XPKBL_VALUE violation error on starting the Application Server service.


                            Can you please confirm if there is anything else that we can validate from DB or App side?

                            • 12. Re: BSA Database issue
                              Bill Robinson

                              please open a support ticket so we can investigate the issue.  it's not a great idea to run random sql from a four year old communities post.

                              • 13. Re: BSA Database issue
                                Santhosh Kurimilla

                                Yes Bill,


                                Case 00487979 has been submitted for the same. BMC Support has been pushing us to use this solution.

                                • 14. Re: BSA Database issue
                                  Bill Robinson

                                  ok, then follow up w/ support ?



                                  what command did you use the export the database ?  was it:


                                  expdp / full=y directory=DATA_PUMP_DIR dumpfile=exp_dp$_$.dmp logfile=$_$_exp.log flashback_time="\"to_timestamp(to_char(sysdate,'mm-dd-yyyy hh24:mi:ss'), 'mm-dd-yyyy hh24:mi:ss')\"" ?



                                  because from the ticket it seems like your dba may not have done this.