Oracle instances (on the same computer or on a remote server) can be
Several options are handled for this actions
#include "ocilib.h" int main(void) { OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT); /* start remote instance */ OCI_DatabaseStartup("db", "sys_usr", "sys_pwd", OCI_SESSION_SYSDBA, OCI_DB_SPM_FULL, OCI_DB_SPF_FORCE, NULL); /* shutdown remote instance */ OCI_DatabaseShutdown("db", "sys_usr", "sys_pwd", OCI_SESSION_SYSDBA, OCI_DB_SDM_FULL, OCI_DB_SDF_ABORT); OCI_Cleanup(); return EXIT_SUCCESS; }
Functions | |
OCI_EXPORT boolean OCI_API | OCI_DatabaseStartup (const mtext *db, const mtext *user, const mtext *pwd, unsigned int sess_mode, unsigned int start_mode, unsigned int start_flag, const mtext *spfile) |
Start a database instance. | |
OCI_EXPORT boolean OCI_API | OCI_DatabaseShutdown (const mtext *db, const mtext *user, const mtext *pwd, unsigned int sess_mode, unsigned int shut_mode, unsigned int shut_flag) |
Shutdown a database instance. |
OCI_EXPORT boolean OCI_API OCI_DatabaseShutdown | ( | const mtext * | db, | |
const mtext * | user, | |||
const mtext * | pwd, | |||
unsigned int | sess_mode, | |||
unsigned int | shut_mode, | |||
unsigned int | shut_flag | |||
) |
Shutdown a database instance.
db | - Oracle Service Name | |
user | - Oracle User name | |
pwd | - Oracle User password | |
sess_mode | - Session mode | |
shut_mode | - Shutdown mode | |
shut_flag | - Shutdown flag |
Possible (exclusive) value for parameter shut_flag (from Oracle documentation) :
Definition at line 1408 of file library.c.
References OCI_Connection::cxt, OCI_Connection::err, OCI_ConnectionCreate(), OCI_ConnectionFree(), OCI_ExecuteStmt(), OCI_StatementCreate(), OCI_StatementFree(), OCI_TransactionFree(), and OCI_Connection::trs.
OCI_EXPORT boolean OCI_API OCI_DatabaseStartup | ( | const mtext * | db, | |
const mtext * | user, | |||
const mtext * | pwd, | |||
unsigned int | sess_mode, | |||
unsigned int | start_mode, | |||
unsigned int | start_flag, | |||
const mtext * | spfile | |||
) |
Start a database instance.
db | - Oracle Service Name | |
user | - Oracle User name | |
pwd | - Oracle User password | |
sess_mode | - Session mode | |
start_mode | - Start mode | |
start_flag | - Start flags | |
spfile | - Client-side spfile to start up the database (optionnal) |
Possible (combined) values for parameter start_flag :
Definition at line 1278 of file library.c.
References OCI_Connection::cxt, OCI_Connection::err, OCI_ConnectionCreate(), OCI_ConnectionFree(), OCI_ExecuteStmt(), OCI_StatementCreate(), and OCI_StatementFree().