Closed kubo closed 4 years ago
I have no current plans, but I'll look into this further at some point. I agree that it is low priority.
Is there any way to accomplish this in cx_Oracle?
Not currently. But once I've added this support here, adding it in cx_Oracle is quite straightforward.
Oh has this been implemented here? I see that the issue is still open.
No, it hasn't been done here yet. I'm just saying that once I've added it here, adding it to cx_Oracle is straightforward. :-)
ah. Gotcha. Thanks.
I've added support for this by adding a new method dpiConn_startupDatabaseWithPfile(). If you call this new function with a PFILE of NULL and a length of 0, it is equivalent to calling the existing function dpiConn_startupDatabase(). The documentation for the new function is as follows:
int dpiConn_startupDatabaseWithPfile(dpiConn *conn, const char *pfile, uint32_t pfileLength, dpiStartupMode mode)
Starts up a database with a parameter file (PFILE).
The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
conn [IN] – a reference to the connection to the database which is to be started up. If the reference is NULL or invalid an error is returned. The connection must be created with the authorization mode set to DPI_MODE_AUTH_PRELIM along with one of DPI_MODE_AUTH_SYSDBA or DPI_MODE_AUTH_SYSOPER.
pfile [IN] – a pointer to a byte string in the encoding used for CHAR data which identifies the name of the parameter file (PFILE) that will be used to startup the database. This value may be NULL if the pfileLength parameter is zero. In that case this function behaves identically to the dpiConn_startupDatabase() function.
pfileLength [IN] – the length of the pfile parameter, in bytes.
mode [IN] – one of the values from the enumeration dpiStartupMode.
ODPI-C 4.0 was just released containing these changes.
Do you have any plan to make
dpiConn_startupDatabase()
accept pfile as Data Provider for .NET does?The priority of this feature is extremely low. I sometimes use
startup pfile=xxx
on sqlplus to check effect of initialization parameters without changing persistent parameters. However I could not imagine who use it in applications.