Avatar of Thomy-M
Thomy-M
Flag for Switzerland asked on

Deploying APEX Application including images using SQL*Plus

Hi all

Oracle APEX export and import feature allows to dump an application into an SQL-file which can be importet in an other environment. Doing this using the webapp gives the possibility to run the installation scripts of supporing objects after the import of the app.
When running the installation from commandline using sqlplus creates the installation scripts in the target repository but does not run them.

How can this step be automated as well?

Thanks for any help
Thomy
Oracle Database

Avatar of undefined
Last Comment
Thomy-M

8/22/2022 - Mon
Swadhin Ray

Is the workspace ID is same ?
Swadhin Ray

Thomy-M

ASKER
The workspace where the application and supporting objects are installed is the same. The workspace where the export file is coming from is a different one. I have to deploy from dev - test - prod which are different APEX instances on different systems.

The question ist, how to run the install scripts which are written to the target system by calling wwv_flow_api.create_install_script() in the exported file.
When exporting the application with parameter "Export Supporting Object Defintions" set to Yes, these scripts are included in the export file. When importing the file using APEX, the wizard ask to execute them after installing the application. But when executing the installation using sqlplus, this task has to be done using an according API-call. Unfortuanetly these packages seems not to be documented in public.

I found several hints in oracle forums which advices to call things like
wwv_flow_api.set_security_group_id();
But this package seems not to be documentd in public. I think that there might be a call there to run the install scripts as well.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Swadhin Ray

<<<The workspace where the application and supporting objects are installed is the same. The workspace where the export file is coming from is a different one. >>>

See if you have exported the application from different workspace then you need to modify the name and then install it on the traget database (so that what you are importing should be same as ID of the workspace on the target db).

And if you have apex installed on the target database why don't you directly import it from the import and export application which will also have the option to install the supporting objects.

Did you tried this ?
Swadhin Ray

Also check the APEX version from where you have exported and where you are installing .
The target APEX should be same or higher not lower version.
Thomy-M

ASKER
Surely I know that importing the application using APEX would run these scripts. The reason why I want to do this using cmdline is that we already have a setup tool to deploy a lot of other things. Our APEX-App ist only a small part of all and we would like to deploy everything at the same time using the same mechanism.

We require that the same APEX version is installed on all environments.

Everything is working fine except the app images.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Swadhin Ray

Did you checked if the import is taking the alias which might be the issue.

For more details you can check this link:
https://forums.oracle.com/forums/thread.jspa?threadID=617165
ASKER CERTIFIED SOLUTION
Thomy-M

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Swadhin Ray

That sounds great that you got the solution.
Thomy-M

ASKER
Apex-Deployment could be optimized
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23