Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Import apex application from a database to another (APEX 3.2.1, Oracle 11.2.0.4, Linux Red Hat 6)
Import apex application from a database to another [message #628533] Wed, 26 November 2014 02:06 Go to next message
Malakay79
Messages: 41
Registered: September 2007
Member
I need to migrate a workspace from a database to another one.
I use APEX 3.2.1
Oracle 11.2.0.4 on Linux Red Hat 6

I have recreated the workspace with this command in my destination database:

begin
 APEX_INSTANCE_ADMIN.ADD_WORKSPACE(NULL,'WORKSPACE_NAME', 'WORKSPACE_NAME','WORKSPACE_NAME');
 commit;
 
 wwv_flow_api.set_security_group_id(p_security_group_id=> apex_util.find_security_group_id('WORKSPACE_NAME'));
 apex_util.create_user (p_user_name => 'ADMIN', p_first_name => 'ADMIN',
p_last_name => 'ADMIN', p_description => 'ADMIN', p_web_password => 'xx', p_email_address => 'pec-dc@cineca.it',
p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL', p_change_password_on_first_use => 'N');
 
 commit;
   
 APEX_UTIL.UNEXPIRE_END_USER_ACCOUNT(p_user_name => 'ADMIN');
 commit;
end;
/


I exported the application in the workspaces with these commands:
1) In my source database:
select to_char(application_id) from apex_applications where workspace like 'WORKSPACE_NAME';

And then:
java oracle.apex.APEXExport -db db08-int.dbc.cineca.it:4099:db08 -user APEX_030200 -password ap3xpr\!pr0d -applicationid <ID>
java oracle.apex.APEXExport -db db08-int.dbc.cineca.it:4099:db08 -user APEX_030200 -password ap3xpr\!pr0d -applicationid <ID>

In order to import my application I execute as APEX_030200 the sql file f*sql:

@f70036201.sql
APPLICATION 70036201 - Reporting allocazione costi
Set Credentials...
Check Compatibility...
API Last Extended:20090112
Your Current Version:20090112
This import is compatible with version: 20090112
COMPATIBLE (You should be able to run this import without issues.)
Set Application ID...
begin
*
ERROR at line 1:
ORA-02291: integrity constraint (APEX_030200.WWV_FLOWS_FK) violated - parent
key not found
ORA-06512: at "APEX_030200.WWV_FLOW_API", line 555
ORA-06512: at line 3


I suppose this error depend on the different workspace id. How can I fix this?

I can't use web interface.

[Updated on: Wed, 26 November 2014 02:07]

Report message to a moderator

Re: Import apex application from a database to another [message #628545 is a reply to message #628533] Wed, 26 November 2014 03:38 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
The solution (thanks to LittleFoot) is here, http://www.orafaq.com/forum/mv/msg/189352/594751/#msg_594751

Though I should mention that your release is so old that I do not know if the solution applies.
Previous Topic: Default Value For Item
Next Topic: Excel Problem (double quotes issue)
Goto Forum:
  


Current Time: Thu Mar 28 11:58:19 CDT 2024