#!/usr/bin/python
# -*- coding: UTF-8 -*-
import cx_Oracle
I want to use dbms_logmnr_d.build()
in Python, but following error occurs:
Traceback (most recent call last):
File "test.py", line 10, inx=c.callproc("EXECUTE dbms_logmnr_d.build(dictionary_filename => 'dictionary.ora', dictionary_location =>'/u01/app/oracle/product/11.2.0/xe/LOGMNR')")
cx_Oracle.DatabaseError:
ORA-06550: Line 1, column 15:
PLS-00103: Encountered the symbolDBMS_LOGMNR_D
when expecting one of the following:: = . ( @ % ; immediate
The symbol: =
was substituted forDBMS_LOGMNR_D
to continue.
Example:
conn=cx_Oracle.connect('example/pass@localhost/XE')
c=conn.cursor()
x=c.callproc("EXECUTE dbms_logmnr_d.build(dictionary_filename => 'dictionary.ora', dictionary_location =>'/u01/app/oracle/product/11.2.0/xe/LOGMNR')")
conn.commit();
c.close()
conn.close()