Thursday, August 20, 2009

ORA-31609: error loading file "kuauddef.xsl" from file system directory

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

Sometimes i wish certain things were a little bit easier.
I was attempting to import a datapump export obtained with the DBMS_METADATA "demo" export program i mentioned a while ago, but unfortunately it blows up while processing trigger information.
After investigating the problem, it seemed that, for some reason, there were missing stylesheets that needed to be loaded using a script called initmeta.sql, under the $ORACLE_HOME/rdbms/admin folder according to a user who reported that after doing that, the problem was fixed, but to my surprise i could not find such script in my Oracle XE linux installation.
So i began another iteration, in pursue of a solution for this new "problem" and i found an OTN forum discussion where someone else could not spot the fatal script, but a DBA published the content of initmeta.sql for Oracle version 10gR1, which is a single line:
EXECUTE SYS.DBMS_METADATA_UTIL.LOAD_STYLESHEETS('/Users/oracle/.../rdbms/xml/xsl');
(whole path omitted)

Apparently i only needed to modify the file path, but first i wanted to have a look at the package specification of DBMS_METADATA_UTIL.
Interestingly enough, in version 10gR2 (XE) something must have been changed, because procedure LOAD_STYLESHEETS doesn't take any parameters.
Oh good, i thought, it means that they are retrieving the path themselves, so i removed the parameter and ran the procedure as SYS:
EXECUTE SYS.DBMS_METADATA_UTIL.LOAD_STYLESHEETS;

ORA-31609: error loading file "kuauddef.xsl" from file system directory
"/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/xml/xsl"

ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 1793
ORA-06512: at line 1
31609. 00000 - "error loading file \"%s\" from file system directory \"%s\""
*Cause: The installation script initmeta.sql failed to load
the named file from the file system directory into the database.
*Action: Examine the directory and see if the file is present
and can be read.
And there you go, with ORA-31609.
It's curious that SQL Developer explains the error message mentioning the initmeta.sql script that didn't run at all, it means that procedure LOAD_STYLESHEETS is expected to be run only in that occasion.

So, here is where i am stuck now, the missing $ORACLE_HOME/rdbms/xml directory.
May be i'll update this entry if i manage to work around this problem.

Fortunately there are still the good-ole EXP/IMP utilities to keep the ball rolling.

See message translations for ORA-31609 and search additional resources.

2 comments:

mdmd said...

any proceedings in that case? I had to install a full enterprise version, for strictly personal use, of course, to get dbms_metadata.get_ddl working.

Byte64 said...

Nope,
either I decided to pursue a different approach or I simply gave up trying.

Sorry about that.
Flavio

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles