A few tips for export/import database
2 years ago
Originally Published: 2007-06-12
Article Number
000053128
Applies To
AA On-Prem version 5.7.x
Oracle database

Issue
Reliable database recovery

Problem 1: After export/import database, received "unique constraint" error in pmw_server.log, and user could not login:

com.passmarksecurity.PassMarkException: ORA-00001: unique constraint
(PMSC.PK_DESKTOPS) violated
ORA-06512: at "PMSC.INSERTDEVICE4", line 43
ORA-06512: at line 1


Problem 2: After export/import database, received following error in pmw_server.log:

2007-04-16 13:26:18,961 ERROR [Servlet.Engine.Transports : 6] [] [] [com.passmarksecurity.dao.sp.GroupsStoredProcBase]
<Caught SQL exception: OrgsStoredProcBase.getOrgAndParentHeirarchy(DiscoverCard
Throwing PassMark DatabaseExceptio
java.sql.SQLException: ORA-06550: line 1, column 1
PLS-00201: identifier 'GETORGANDPARENT' must be declar
ORA-06550: line 1, column
PL/SQL: Statement ignored


Cause
Problem 1: The "unique constraint" violation on primary keys is caused by the sequence ID was off during importing of the database

Problem 2: The 'GETORGANDPARENT' must be declared error is caused by permission was not exported when exporting the database

Resolution
Problem 1: Make sure the sequence Id  in new DB was set higher than the old DB.
Problem 2: Check export permissions before exporting database.