[cx-oracle-users] callproc dbms_metadata.add_file
Brought to you by:
atuining
From: Werner M. <wer...@gm...> - 2014-09-24 19:18:43
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi,</div> <div> </div> <div>I'm writing a little script which exports some data from my database and I want to use dbms_datapump.</div> <div> </div> <div>It almost works, I am stuck with the logfile though. To create one, you have to use the function dbms_datapump.add_file:</div> <div> </div> <div> <pre class="oac_no_warn">DBMS_DATAPUMP.ADD_FILE ( handle IN NUMBER, filename IN VARCHAR2, directory IN VARCHAR2, filesize IN VARCHAR2 DEFAULT NULL, filetype IN NUMBER DEFAULT DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE), reusefile IN NUMBER DEFAULT NULL;</pre> <div> </div> <div>when I call it with the first five parameters, I always get an ORA-6502 - for the size of the file (which is not needed for the logfile ...)</div> <div> </div> <div> <div>cur.callproc('dbms_datapump.add_file',[handle,'test.log','EXP_IMP',102400,'KU$_FILE_TYPE_LOG_FILE'])<br/> cx_Oracle.DatabaseError: ORA-06502: PL/SQL: numeric or value error: character to number conversion error</div> <div> </div> <div>As far as I have found out only positional parameters can be used, i.e. a dict or key/value is not supported - if it was I could use only the needed parameters here (handle, filename, directory and filetype).</div> <div> </div> <div>so, how can I get this to work? the parameter filesize is optional but how can I write that?</div> <div> </div> <div>br,</div> <div> </div> <div>Werner</div> <div> </div> </div> </div></div></body></html> |