Move Project with "hmvproj" not possible beause of database cloning (same database ID)
search cancel

Move Project with "hmvproj" not possible beause of database cloning (same database ID)

book

Article ID: 190619

calendar_today

Updated On:

Products

CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

After creating a project archive database from a copy of the production database we attempted to use hmvproj to move a project from one database to the other. We received the error that both the source and target databases have the same id. How can we move our projects, then?

Environment

Release : 13.x, 14.x

Component : CA Harvest Software Change Manager

Cause

The database id that the message references is in the "hartableinfo" table. The reason both databases have the same ID is because you copied the production database and used that to create your archive database. A very common thing to do and, except for this one type of situation, would never pose a problem.

Resolution

The solution is to change the database id for the archive database. To do this you will: 

1. Shut down the broker to the Archive system 

2. Execute the following on the Archive database to reset the database id to 0: 
update hartableinfo set databaseid = 0; 
commit; 
(there's only 1 record in this table so no need for a where clause) 

3. Restart the broker and try the hmvproj command again. 

When hmvproj runs again it will notice that the database id for the archive database is 0 and will assign a new valid database id to the archive database. All should be resolved after this.