Topic
  • 3 replies
  • Latest Post - ‏2013-08-26T18:37:52Z by mawrtea
mawrtea
mawrtea
3 Posts

Pinned topic Upgrading Test Database failed because of an exception

‏2013-08-15T19:27:27Z |
While using Designer, I made some changes in TEST; saved them; then ran 
Test Configurations to upgrade to the test database (with the         
intention of testing my changes).  We had backups taken prior to making 
the changes.                                                            
                                                                        
Specifically, my changes consisted of:                                  
- a new stateless table with 4 customized fields                        
- a reference to that table in an existing stateful table               
- a couple more new fields to existing stateless tables                 
                                                                        
I got the following error (and I've attached the log and sql file       
referenced):                                                            
                                                                        
Upgrading Test Database dcttt failed because of an exception.           
Caught a CQException at the JNI Boundary:                               
\bugbert.src\cqobjectmodel\cqdatabase.cpp: line 640-CRMMD1230E An error 
was detected in the middle of upgrading database "dcttt" to schema      
"DCT" version 226: CRMDB0001E SQLExecute: RETCODE=-1, State=37000,      
Native Error=1776                                                       
[Microsoft][ODBC SQL Server Driver][SQL Server]There are no primary or  
candidate keys in the referenced table 'ratl_replicas' that match the   
referencing column list in the foreign key 'fk_16788792'.               
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not create         
constraint. See previous errors.                                        
SQL statement="alter table new1 add CONSTRAINT fk_16788792 FOREIGN KEY  
(ratl_mastership) REFERENCES ratl_replicas (dbid)"                      
The database may be in an inconsistent state. The database will be      
locked to prevent users from logging on until it is restored from the   
latest backup. You must restore it and resolve this problem before      
attempting the upgrade again.                                           
The logfile C:\Users\NBE5ILL\AppData\Local\Temp\dcttt_DCT_226_upgrade.  
log may be useful in resolving this problem.     
  • DonaldN
    DonaldN
    287 Posts
    ACCEPTED ANSWER

    Re: Upgrading Test Database failed because of an exception

    ‏2013-08-16T00:31:13Z  

    The error says that there is data corruption in your ClearQuest database, where linkage between the master and the test database "dcttt" is incorrect. The easier solution should be just remove the test database and create a new one. If you need to keep the current one, some data manipulation is required and you should open a ticket with IBM to get guidance.

  • DonaldN
    DonaldN
    287 Posts

    Re: Upgrading Test Database failed because of an exception

    ‏2013-08-16T00:31:13Z  

    The error says that there is data corruption in your ClearQuest database, where linkage between the master and the test database "dcttt" is incorrect. The easier solution should be just remove the test database and create a new one. If you need to keep the current one, some data manipulation is required and you should open a ticket with IBM to get guidance.

  • mawrtea
    mawrtea
    3 Posts

    Re: Upgrading Test Database failed because of an exception

    ‏2013-08-16T20:53:53Z  

    thanks Donald - we got the procedure from IBM support and are giving it a go.  I'll post a reply when we get our results.

     

    marty schwartz

    bank of america

  • mawrtea
    mawrtea
    3 Posts

    Re: Upgrading Test Database failed because of an exception

    ‏2013-08-26T18:37:52Z  
    • mawrtea
    • ‏2013-08-16T20:53:53Z

    thanks Donald - we got the procedure from IBM support and are giving it a go.  I'll post a reply when we get our results.

     

    marty schwartz

    bank of america

    The procedure to recover from data corruption worked -- here it is for anyone else who may run into this:

    http://www-01.ibm.com/support/docview.wss?us=727&uid=swg21147345

     

    As per the above referenced technote.  The resolution to this problem, though not ideal, is to create a new SQL Server database and move the corrupt test database to the new location using  ClearQuest designer (Database > Move user database).

    Doing so will rebuild all of the tables and indexes, resolving the problem as I have seen reported in many similar issues to your own.

     

    Please ensure that you have valid and updated backups of your schema repository and all users databases as a safeguard before starting.

     

    1. The first step will be to unlock your current database for the purpose of the move. 

    - You will instructions here for unlocking your test database:

    http://www-01.ibm.com/support/docview.wss?uid=swg21133810

    - Video illustration is here if preferred:

    https://www.ibm.com/developerworks/community/blogs/nfrsblog/entry/unlocking_clearquest_databases_with_the_installutil_commands3?lang=en

     

    2. The next step is for you or your DBA to create a new empty SQL server database to move your current test database into.

    First, create a new, empty database in SQL Server:

    http://pic.dhe.ibm.com/infocenter/cqhelp/v7r1m2/topic/com.ibm.rational.clearquest.install_upgrade.doc/topics/c_config_sql_server.htm

     

    3. With the new empty database in place and your existing test database unlocked, we can now use the designer to move your test database to the new empty database, rebuilding the indexes:

    http://pic.dhe.ibm.com/infocenter/cqhelp/v7r1m2/topic/com.ibm.rational.clearquest.admin.doc/topics/t_move_user_db._w_dsgnr.htm