-
Notifications
You must be signed in to change notification settings - Fork 364
Description
For general questions:
I am trying to do the equivalent of "startup force mount pfile='/tmp/pfile.ora'" from a cx_oracle connection.
When I try to do this, I get DatabaseError: ORA-00900: invalid SQL statement
both with a PRELIM_AUTH connection and a normal connection.
There is also the startup command, but it does not allow one to specify a pfile.
-
What is your version of Python? Is it 32-bit or 64-bit?
Python 2.6.6 64 bit -
What is your cx_Oracle version?
5.1.2 -
What exact command caused the problem (e.g. what command did you try to install with)? Who were you logged in as?
cur.execute("startup force mount pfile='/tmp/pfile.ora'") -
What error(s) you are seeing?
DatabaseError: ORA-00900: invalid SQL statement -
What OS (and version) is Python executing on?
RHEL 6.3 -
What is your version of the Oracle client (e.g. Instant Client)? How was it installed? Where is it installed?
Client version 11.2.0.3.0
Installed via custom RPM.
Installed at
/usr/lib64/*
/usr/include/oracle/11.2/client64/* -
What is your Oracle Database version?
11.2.0.4 -
What is the
PATH
environment variable (on Windows) orLD_LIBRARY_PATH
(on Linux) set to? On macOS, what is in~/lib
?
not set -
What Oracle environment variables did you set? How exactly did you set them?
None -
Do you have a small, single Python script that immediately runs to show us the problem?
conn_perm = cx_Oracle.connect(conn_string % (user, password, conn_protocol, cname, port, service_name, cert_dn), mode=cx_Oracle.SYSDBA | cx_Oracle.PRELIM_AUTH, threaded=threaded)
cur = conn.cursor()
cur.execute("create spfile='/tmp/spfile.ora' from pfile")
cur.execute("alter system set spfile='/tmp/spfile.ora'")
cur.execute("create pfile='/tmp/pfile.ora' from spfile='/tmp/spfile.ora'")
# all the above work fine
cur.execute("startup force mount pfile='/tmp/pfile.ora'") # This statement causes an error