Re: [cx-oracle-users] callproc dbms_metadata.add_file
Brought to you by:
atuining
From: Doug H. <djn...@gm...> - 2014-09-26 16:43:00
|
On 24 September 2014 13:18, Werner Moser wrote: > 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; Note the misplaced ")" from the original Oracle document. > cur.callproc('dbms_datapump.add_file', [handle,'test.log','EXP_IMP',102400,'KU$_FILE_TYPE_LOG_FILE']) Try replacing 'KU$_FILE_TYPE_LOG_FILE' with the constant value defined in the DBMS_DATAPUMP package. If that works, you could try extracting that value by fetching the result of "select DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE from dual". Off the top of my head, I don't know an easier way to get a constant out of a package from python. BTW, in my tests, failures while defining the data pump job would result in a situation where I could not define a new job with the same name. I did not discover a way of clearing a job in the defining state other than a database stop/start cycle. You could not attach to the job because it was not running and you could not open it because it already existed. Without a handle, you could not Doug -- Doug Henderson, Calgary, Alberta, Canada |