Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Export-Import leads to unique constraint (APEX_200200.WWV_FLOW_WORKSHEET_RPTS_UK) violated

Sasha GomanukeFeb 20 2022

Here You are my way to that bug:
On Oracle 19c: java oracle.apex.APEXExport -expPubReports -expSavedReports -db HostName:1521:ServiceName -user UserName -password Password -applicationid 400
On Oracle 18 Express: /opt/sqlcl/bin/sql UserName/Password@HostName:1521:ServiceName @./script.sql
Where script.sql is

declare
  l_workspace_id number;
begin
  select workspace_id into l_workspace_id
   from apex_workspaces
   where workspace = 'NAME';
  --
  apex_application_install.set_workspace_id( l_workspace_id );
  apex_application_install.generate_offset;
  apex_application_install.set_schema( 'NAME' );
end;
/
.
@f400.sql

So it leads to:

Error starting at line : 131,313 File @ ./f400.sql
In command -
begin
wwv_flow_api.import_end(p_auto_install_sup_obj => nvl(wwv_flow_application_install.get_auto_install_sup_obj, false));
commit;
end;
Error report -
ORA-00001: unique constraint (APEX_200200.WWV_FLOW_WORKSHEET_RPTS_UK) violated
ORA-06512: at "APEX_200200.WWV_FLOW_API", line 1507
ORA-06512: at "APEX_200200.WWV_FLOW_API", line 27910
ORA-06512: at "APEX_200200.WWV_FLOW_API", line 30070
ORA-06512: at "APEX_200200.WWV_FLOW_API", line 30101
ORA-06512: at line 2
00001. 00000 - "unique constraint (%s.%s) violated"
*Cause:  An UPDATE or INSERT statement attempted to insert a duplicate key.
      For Trusted Oracle configured in DBMS MAC mode, you may see
      this message if a duplicate entry exists at a different level.
*Action:  Either remove the unique restriction or do not insert the key.
Disconnected from Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

Appreciate for any ideas to figure out it.

Comments
Post Details
Added on Feb 20 2022
0 comments
301 views