Support Article
RAP import fails on a view with DB link
SA-46167
Summary
User uses public DB link using one set of credentials, but pointing to the other schema accessible on that DB link.
Rule-Admin-Product (RAP) export works fine and all schema names are preserved.
During import with automatic schema changes, the error is the original schema name is removed.
Error Messages
Encountered an issue applying DDL: ....Database-General Problem executing SQL to update database schema 942 42000 ORA-00942: table or view does not exist ORA-02063: preceding line from DWH DatabaseException caused by prior exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist ORA-02063: preceding line from <DB link name>| SQL Code: 942 | SQL State: 42000 -- See the log for additional information.
Steps to Reproduce
1. Create public DB link in Oracle DB used by Pega pointing to another database.
2. Create View in Pega DB using DB Link created to access the table on target system using schema name other than was used for DB link.
3. Create Data class for that view.
4. Create RAP including class.
5. Export RAP and try to import it into another environment.
Root Cause
An issue in the custom application code or rules: as import do not know if the related objects are created and ready to be used and manual apply of DDL is required.
Resolution
Perform the following local-change steps:
- Start Import Wizard and specify the RAP file, on the next step select Manual Schema changes and download DDL.
- Review DDL and add all required changes for the missing schemas and DB links. Apply schema changes.
- Return to the Import Wizard and continue with rules import.
Published March 19, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.