1

Here's the call and error I currently receive:

cursor.callproc('DBMS_METADATA.SET_TRANSFORM_PARAM', ['DBMS_METADATA.SESSION_TRANSFORM', 'STORAGE', 'false'])
cx_Oracle.DatabaseError: ORA-06550: line 1, column 7:
PLS-00307: too many declarations of 'SET_TRANSFORM_PARAM' match this call
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Barbaros Özhan
  • 59,113
  • 10
  • 31
  • 55
Beege
  • 665
  • 4
  • 18

1 Answers1

1

The issue is related to the use of quotations. The syntax for the procedure DBMS_METADATA.SET_TRANSFORM_PARAM

DBMS_METADATA.SET_TRANSFORM_PARAM (
   transform_handle   IN NUMBER,
   name               IN VARCHAR2,
   value              IN VARCHAR2|IN BOOLEAN DEFAULT TRUE|IN NUMBER, 
   object_type        IN VARCHAR2 DEFAULT NULL);

the last parameter(object_type) needn't to be specified obviously, since it has NULL value as default.

the penultimate parameter(value) might have three options for data type. Seems that is intended to be as BOOLEAN. So, remove quotes around false.

lastly, the first parameter(transform_handle) is also considered as numeric. So, remove quotes here too.

As a result, call the procedure as

cursor.callproc('DBMS_METADATA.SET_TRANSFORM_PARAM', 
                [DBMS_METADATA.SESSION_TRANSFORM, 'STORAGE', false]);
Barbaros Özhan
  • 59,113
  • 10
  • 31
  • 55
  • 1
    Good description of the issue and very close to working. It turns out that the DBMS_METADATA.SET_TRANSFORM_PARAM is a constant (defined as -1) in the Oracle space, but not in cx_oracle, so as written, this fails with an ORA-06502 (wrong datatype). Replacing that with an actual -1 works. – Beege Mar 09 '20 at 15:16