APEX 3.2 to 4.2 migration and #WORKSPACE_IMAGES#

After having to abandon a direct upgrade between Apex 3.2 and 4.2 due to a 4.2 Apex bug during an update from 11.2.0.2 to 11.2.0.3 ( i'll cover the details of this in another post) we ended up having to export all the workspaces/application in Apex 3.2, drop everything. install 4.2 and then import everything in. This worked pretty well apart from the issue i mentioned in my previous post with custom authentication.

The only other issue we really had was some image files weren't working after all the messing around. I initially thought we had forgot to export some images along with the applications (as helpfully this is a separate export - why....???). Anyway it turned out we hadn't missed anything.

So what had gone wrong?

Looking at the APEX code initially i was confusing myself - the image was referred to as #WORKSPACE_IMAGES##AMPEL#.gif

I started along the route thinking #AMPEL# was some clever built in in image for traffic lights and this function had been removed at 4.2 for some reason. Then i thought perhaps it's only available in German language APEX.....

Then i realized that it was just an application variable and depending of the output of some SQL was given a value - so #AMPEL~ ended up as RED/GREEN/AMBER so the file i was looking for was just in the normal location for #WORKSPACE_IMAGES# called coulour.gif.

OK...

So where is that location...?

After looking arounf it seems the images are uploaded into the "FLOWS_FILES"."WWV_FLOW_FILE_OBJECTS$" table. In our frenzy to upgrade to 4.2 we just dropped the FLOWS_FILES schema and let the installation of 4.2 create a fresh (blank) one.

The fix was just to export all the values from the original 3.2 version of the table (which very helpfully has not changed at all) and just import this in with datapump:

[oracle@server]:DB:/oracle/home/oracle# impdp / directory=tmp table_exists_action=append

Import: Release 11.2.0.2.0 - Production on Wed Aug 21 16:45:19 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "OPS$ORACLE"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "OPS$ORACLE"."SYS_IMPORT_FULL_01":  /******** directory=tmp table_exists_action=append
Processing object type TABLE_EXPORT/TABLE/TABLE
Table "FLOWS_FILES"."WWV_FLOW_FILE_OBJECTS$" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "FLOWS_FILES"."WWV_FLOW_FILE_OBJECTS$"      46.75 MB     240 rows
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/TRIGGER
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "OPS$ORACLE"."SYS_IMPORT_FULL_01" successfully completed at 16:45:31


After that all the images worked

0 comments:

Post a Comment