Sun Fuqiang
Sun Fuqiang

Reputation: 21

ORA-00972 error from dbms_cube.import_xml() call

I create a cube by hand in AWM, and export it as a template. But when I try to import it with dbms_cube.import_xml('/app/oracle/product/11.2.0/XML_DIR','test.xml'), it throws an ORA-00972 error.

ORA-00972: 
ORA-06512:  "SYS.DBMS_LOB", line 744
ORA-06512:  "SYS.DBMS_CUBE", line 334
ORA-06512:  "SYS.DBMS_CUBE", line 478
ORA-06512:  "SYS.DBMS_CUBE", line 491
ORA-06512:  line 1
00972. 00000 -  "identifier is too long"

I could use AWM to import the template successfully.

Upvotes: 0

Views: 280

Answers (1)

Alex Poole
Alex Poole

Reputation: 191360

The IMPORT_XML procedure expects the name of a database directory object, not an operating system directory path.

The value you're passing is taken as the name of a directory object, as would be shown in DBA_DIRECTORIES etc. The length is therefore limited to 30 characters by the object naming rules. You are passing in a 34-character path, which is too long to be an object name (identifier), and it's that which generates the ORA-00972; but even if it was shorter it would not be a valid database directory object name.

If you have a directory object called XML_DIR defined against path /app/oracle/product/11.2.0/XML_DIR, you can call this as:

dbms_cube.import_xml('XML_DIR','test.xml')

You can read more about creating drectory objects in the documentation.

Upvotes: 1

Related Questions