views:

131

answers:

1

The following query generates the error below in 10g:

 select DBMS_METADATA.GET_DDL('TABLE','TEST_TABLE','TEST') from dual;

Got:

ORA-04031: unable to allocate 128 bytes of shared memory ("shared pool","SELECT /*+rule*/ SYS_XMLGEN(...","sql area","qeeOpt: qeesCreateOpt")
ORA-06512: at "SYS.DBMS_METADATA", line 1546
ORA-06512: at "SYS.DBMS_METADATA", line 1583
ORA-06512: at "SYS.DBMS_METADATA", line 1901
ORA-06512: at "SYS.DBMS_METADATA", line 2792
ORA-06512: at "SYS.DBMS_METADATA", line 4333
ORA-06512: at line 1

from some reading, it appears this issue can be resolved by adjusting some of the shared memory parameters of Oracle.

However, can anyone give a little extra info on possible causes of the error? This is just a single table without about 10 columns, so I'd be surprised if the query itself was the source of the problem. Additionally, Toad can display all my DDL just fine.

What things should be I be looking for? Or should I just send this error to my DBA and say, "please fix?"

A: 

DBMS_METADATA is a very large PL/SQL package and it needs to get loaded into the shared pool. If you want it to execute then you will need to get the DBA to increase the shared pool. Also you may (on 9i and maybe on 10i) need to increase the Java pool. It appears to me that they have changed the innards of the DBMS_METADATA and it no longer needs as much Java pool space.

Philip Schlump