Tuesday, June 08, 2010

CD APEX 4.0: Import APEX 3.2 app in 4.0

This blog post is part of a series posting "Count Down to APEX 4.0 Public Release" (click on link to view history).

Yesterday we took an export of our application and included the script to create the database objects and data in the Supporting Objects of APEX.

So the only thing we need to do now is importing our application in APEX 4.0.
In the Application Builder click on the Import button and select the exported file.

The file will import into the APEX Repository.

Next we have to install the application, so click the Next button.
Select the parsing schema and how you want the Application Id assigned to it. Finally click the Install button which will install the application into your workspace.


When the installation of the application is finished, the wizard won't stop yet, as we have Supporting Objects included in the export file. So the wizards asks if you want to install these Supporting Objects as well. As we need the database objects and some data we click Next and make sure the Yes option is selected.

We get a confirmation message which asks if we are sure we want to go further with the install, so click Install.

The wizard comes back with the result of the install of the Supporting Objects.

In my case I got a few errors. When you click on the Install Summary button you can review the outcome.


Most of the errors were data related. It's a pity SQL Developer wasn't able to produce me a "correct" sql which just works.

In this case I prefer to build a new script, delete my objects in APEX 4.0 and rerun the script for creating the database objects. You don't need to install the full application again, as that was successfully installed. You can just upload your new file to SQL Workshop and run it from there.

To get data or database object from one database to another I prefer the methods in this order
  1. datapump when possible (in my case I can't use it as I don't have direct access to the database of apex.oracle.com)
  2. separate scripts for database objects and data
  3. depending the size of the script upload to Supporting Objects or run manually
    (for really big data sets you can't use APEX to upload your data)
So whenever you finished with the database objects and loading the data we can go further with real APEX 4.0 features... but that is for tomorrow.

No comments:

Post a Comment