term73 / oracle-ddl2svn

Automatically exported from code.google.com/p/oracle-ddl2svn
0 stars 0 forks source link

Error exporting DDL from Oracle 11g #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run oracle-ddl2svn v1.3 against Oracle 11gR2 instance

What is the expected output? What do you see instead?

Expected to get schema SQL file output but an error occurs after successfully 
connecting to the Oracle instance.

What version of the product are you using? On what operating system?

Using oracle-ddl2svn v1.3 on RHEL5 against an Oracle 11gR2 instance.

Please provide any additional information below.

Here is the error that I receive from executing the JAR:

$ java -jar scheme2ddl.jar -url user/pass@localhost:1521:ORCL -o /tmp/test/

...

ORA-31600: invalid input value 0 for parameter SEGMENT_ATTRIBUTES in function 
SET_TRANSFORM_PARAM
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA_INT", line 8330
ORA-06512: at "SYS.DBMS_METADATA_INT", line 9667
ORA-06512: at "SYS.DBMS_METADATA", line 4865
ORA-06512: at line 1

Original issue reported on code.google.com by wallyatkins on 8 Jun 2011 at 2:24

GoogleCodeExporter commented 8 years ago
Thanks for reporting. I not tested oracle-ddl2svn againist Oracle 11g.
I plan to test it, but i don't know when, becouse I'm busy at work now 

But you can configure parameters for dbms_metadata
in scheme2ddl.config.xml    
<util:map id="transformParams_for_dbms_metadata">
You can comment line 
<entry key="SEGMENT_ATTRIBUTES" value="0"/>
for using default value
Or try to play with value. May be in oracle 11r2 value must be TRUE or FALSE
 documetation link http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/d_metada.htm#i1000135

Please, report about your invetigation if it not dufficult.

Original comment by resh...@gmail.com on 8 Jun 2011 at 4:49

GoogleCodeExporter commented 8 years ago
I am now able to get things to run smoothly after commenting out the three 
entries under transformParams_for_dbms_metadata in the scheme2ddl.config.xml 
file.

Original comment by wallyatkins on 8 Jun 2011 at 5:08

GoogleCodeExporter commented 8 years ago
Hi There,

I've found this issue reported on Oracle 11g documentation:
http://docs.oracle.com/cd/B28359_01/java.111/b31224/apxtblsh.htm#i1005380

The only the solution is two wrap the DBMS_METADATA.SET_TRANSFORM_PARAM in a 
custom procedure with parameters that are not boolean and call the custom 
procedure from jdbc. The custom procedure will then translate to boolean and 
call the DBMS_METADATA.SET_TRANSFORM_PARAM proc. 

Original comment by malik.ch...@gmail.com on 15 Feb 2012 at 11:12

GoogleCodeExporter commented 8 years ago
Thanks for link to Oracle 11g documentation.

Unfortunally, custom procedure is not applicable for oracle-ddl2svn purpose.
In general case, user of database  don't have permission to create custom 
procedures 

Original comment by resh...@gmail.com on 15 Feb 2012 at 11:46

GoogleCodeExporter commented 8 years ago
You should call DBMS_METADATA.SET_TRANSFORM_PARAM from PL/SQL anonymous block 
like this:

sql = "begin DBMS_METADATA.SET_TRANSFORM_PARAM(-1,'" + param + "', " + 
transformParams.get(param) + "); end;";
CallableStatement cs = connection.prepareCall(sql);
cs.execute();

This works on Oracle 11gR2.

Original comment by tomislav...@gmail.com on 7 Mar 2012 at 9:57

GoogleCodeExporter commented 8 years ago
fixed in release 2.0

Original comment by resh...@gmail.com on 14 Nov 2012 at 6:22