|
OCILIB (C and C++ Driver for Oracle)
4.0.0
|
Static class in charge of library initialization / cleanup. More...
#include <ocilib.hpp>
Public Types | |
| enum | HAEventSourceValues { SourceInstance = OCI_HES_INSTANCE, SourceDatabase = OCI_HES_DATABASE, SourceNode = OCI_HES_NODE, SourceService = OCI_HES_SERVICE, SourceServiceMember = OCI_HES_SERVICE_MEMBER, SourceASMInstance = OCI_HES_ASM_INSTANCE, SourcePreConnect = OCI_HES_PRECONNECT } |
| HA Event sources enumerated values. More... | |
| enum | HAEventTypeValues { EventDown = OCI_HET_DOWN, EventUp = OCI_HET_UP } |
| HA Event types enumerated values. More... | |
| enum | EnvironmentFlagsValues { Default = OCI_ENV_DEFAULT, Threaded = OCI_ENV_THREADED, Events = OCI_ENV_EVENTS } |
| Environment Flags enumerated values. More... | |
| enum | ImportModeValues { ImportLinkage = OCI_IMPORT_MODE_LINKAGE, ImportRuntime = OCI_IMPORT_MODE_RUNTIME } |
| OCI libraries import mode enumerated values. More... | |
| enum | CharsetModeValues { CharsetAnsi = OCI_CHAR_ANSI, CharsetWide = OCI_CHAR_WIDE } |
| Charset mode enumerated values. More... | |
| enum | SessionFlagsValues { SessionDefault = OCI_SESSION_DEFAULT, SessionXa = OCI_SESSION_XA, SessionSysDba = OCI_SESSION_SYSDBA, SessionSysOper = OCI_SESSION_SYSOPER } |
| Session flags enumerated values. More... | |
| enum | StartModeValues { StartOnly = OCI_DB_SPM_START, StartMount = OCI_DB_SPM_MOUNT, StartOpen = OCI_DB_SPM_OPEN, StartFull = OCI_DB_SPM_FULL } |
| Oracle instance start modes enumerated values. More... | |
| enum | StartFlagsValues { StartDefault = OCI_DB_SPF_DEFAULT, StartForce = OCI_DB_SPF_FORCE, StartRestrict = OCI_DB_SPF_RESTRICT } |
| Oracle instance start flags enumerated values. More... | |
| enum | ShutdownModeValues { ShutdownOnly = OCI_DB_SDM_SHUTDOWN, ShutdownClose = OCI_DB_SDM_CLOSE, ShutdownDismount = OCI_DB_SDM_DISMOUNT, ShutdownFull = OCI_DB_SDM_FULL } |
| Oracle instance shutdown modes enumerated values. More... | |
| enum | ShutdownFlagsValues { ShutdowntDefault = OCI_DB_SDF_DEFAULT, ShutdowTrans = OCI_DB_SDF_TRANS, ShutdownTransLocal = OCI_DB_SDF_TRANS_LOCAL, ShutdownImmediate = OCI_DB_SDF_IMMEDIATE, ShutdownAbort = OCI_DB_SDF_ABORT } |
| Oracle instance shutdown flags enumerated values. More... | |
| typedef Enum< HAEventSourceValues > | HAEventSource |
| Source of HA events. More... | |
| typedef Enum< HAEventTypeValues > | HAEventType |
| Type of HA events. More... | |
| typedef Flags < EnvironmentFlagsValues > | EnvironmentFlags |
| Environment Flags. More... | |
| typedef Enum< ImportModeValues > | ImportMode |
| OCI libraries import mode. More... | |
| typedef Enum< CharsetModeValues > | CharsetMode |
| Environment charset mode. More... | |
| typedef Flags< SessionFlagsValues > | SessionFlags |
| Sessions flags. More... | |
| typedef Enum< StartModeValues > | StartMode |
| Oracle instance start modes. More... | |
| typedef Flags< StartFlagsValues > | StartFlags |
| Oracle instance start flags. More... | |
| typedef Enum< ShutdownModeValues > | ShutdownMode |
| Oracle instance shutdown modes. More... | |
| typedef Flags < ShutdownFlagsValues > | ShutdownFlags |
| Oracle instance shutdown flags. More... | |
| typedef void(* | HAHandlerProc )(Connection &con, HAEventSource eventSource, HAEventType eventType, Timestamp &time) |
| User callback for HA event notifications. | |
Static Public Member Functions | |
| static void | Initialize (EnvironmentFlags mode=Environment::Default, const ostring &libpath=OTEXT("")) |
| Initialize the OCILIB environment. More... | |
| static void | Cleanup () |
| Clean up all resources allocated by the environment. More... | |
| static Environment::EnvironmentFlags | GetMode () |
| Return the Environment mode flags. More... | |
| static Environment::ImportMode | GetImportMode () |
| Return the Oracle shared library import mode. | |
| static Environment::CharsetMode | GetCharset () |
| Return the OCILIB charset type. | |
| static unsigned int | GetCompileVersion () |
| Return the version of OCI used for compiling OCILIB. More... | |
| static unsigned int | GetRuntimeVersion () |
| Return the version of OCI used at runtime. More... | |
| static void | EnableWarnings (bool value) |
| Enable or disable Oracle warning notifications. More... | |
| static void | StartDatabase (const ostring &db, const ostring &user, const ostring &pwd, Environment::StartFlags startFlags, Environment::StartMode startMode, Environment::SessionFlags sessionFlags=SessionSysDba, const ostring &spfile=OTEXT("")) |
| Start a database instance. More... | |
| static void | ShutdownDatabase (const ostring &db, const ostring &user, const ostring &pwd, Environment::ShutdownFlags shutdownFlags, Environment::ShutdownMode shutdownMode, Environment::SessionFlags sessionFlags=SessionSysDba) |
| Shutdown a database instance. More... | |
| static void | ChangeUserPassword (const ostring &db, const ostring &user, const ostring &pwd, const ostring &newPwd) |
| Change the password of the given user on the given database. More... | |
| static void | SetHAHandler (HAHandlerProc handler) |
| Set the High availability (HA) user handler. More... | |
Static class in charge of library initialization / cleanup.
Definition at line 551 of file ocilib.hpp.
Source of HA events.
Possible values are Environment::HAEventSourceValues
Definition at line 591 of file ocilib.hpp.
Type of HA events.
Possible values are Environment::HAEventTypeValues
Definition at line 613 of file ocilib.hpp.
Possible values are Environment::EnvironmentFlagsValues
Definition at line 637 of file ocilib.hpp.
OCI libraries import mode.
Possible values are Environment::ImportMode
Definition at line 659 of file ocilib.hpp.
Environment charset mode.
Possible values are Environment::CharsetModeValues
Definition at line 681 of file ocilib.hpp.
Sessions flags.
Possible values are Environment::SessionFlagsValues
Definition at line 707 of file ocilib.hpp.
Oracle instance start modes.
Possible values are Environment::StartModeValues
Definition at line 733 of file ocilib.hpp.
Oracle instance start flags.
Possible values are Environment::StartFlagsValues
Definition at line 757 of file ocilib.hpp.
Oracle instance shutdown modes.
Possible values are Environment::ShutdownModeValues
Definition at line 783 of file ocilib.hpp.
Oracle instance shutdown flags.
Possible values are Environment::ShutdownFlagsValues
Definition at line 820 of file ocilib.hpp.
HA Event sources enumerated values.
Definition at line 566 of file ocilib.hpp.
HA Event types enumerated values.
| Enumerator | |
|---|---|
| EventDown |
The source of the event is down |
| EventUp |
The source of the event is up (not generated yet by Oracle) |
Definition at line 598 of file ocilib.hpp.
Environment Flags enumerated values.
| Enumerator | |
|---|---|
| Default |
Default mode |
| Threaded |
Enable support for multi-threading |
| Events |
Enable support for events related to subscriptions, HA and AQ notifications |
Definition at line 620 of file ocilib.hpp.
OCI libraries import mode enumerated values.
| Enumerator | |
|---|---|
| ImportLinkage |
OCI libraries are linked at compile time |
| ImportRuntime |
OCI libraries are dynamically loaded at runtime |
Definition at line 644 of file ocilib.hpp.
Charset mode enumerated values.
| Enumerator | |
|---|---|
| CharsetAnsi |
Environment is ANSI string or UTF8 string |
| CharsetWide |
Environment is UNICODE using wide character string |
Definition at line 666 of file ocilib.hpp.
Session flags enumerated values.
Definition at line 688 of file ocilib.hpp.
Oracle instance start modes enumerated values.
| Enumerator | |
|---|---|
| StartOnly |
Start the instance without mounting and opening it |
| StartMount |
Mount (only) the instance |
| StartOpen |
Open (only) the instance |
| StartFull |
Start, mount and open the instance |
Definition at line 714 of file ocilib.hpp.
Oracle instance start flags enumerated values.
Definition at line 740 of file ocilib.hpp.
Oracle instance shutdown modes enumerated values.
| Enumerator | |
|---|---|
| ShutdownOnly |
Shutdown the instance |
| ShutdownClose |
Close (only) the instance |
| ShutdownDismount |
Dismount (only) the instance |
| ShutdownFull |
Shutdown, close and dismount the instance |
Definition at line 764 of file ocilib.hpp.
Oracle instance shutdown flags enumerated values.
Definition at line 790 of file ocilib.hpp.
|
inlinestatic |
Initialize the OCILIB environment.
| mode | - Environment mode |
| libpath | - Oracle shared library path (optional) |
Definition at line 706 of file ocilib_impl.hpp.
References ocilib::Check(), OCI_HandleGetEnvironment(), and OCI_Initialize().
|
inlinestatic |
Clean up all resources allocated by the environment.
Definition at line 717 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_Cleanup().
|
inlinestatic |
Return the Environment mode flags.
Definition at line 726 of file ocilib_impl.hpp.
|
inlinestatic |
Return the version of OCI used for compiling OCILIB.
Definition at line 741 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_GetOCICompileVersion().
|
inlinestatic |
Return the version of OCI used at runtime.
Definition at line 746 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_GetOCIRuntimeVersion().
|
inlinestatic |
Enable or disable Oracle warning notifications.
| value | - enable/disable warnings |
Definition at line 751 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_EnableWarnings().
|
inlinestatic |
Start a database instance.
| db | - Oracle Service Name |
| user | - Oracle User name |
| pwd | - Oracle User password |
| startFlags | - Start flags |
| startMode | - Start mode |
| sessionFlags | - Session Flags |
| spfile | - Client-side spfile to start up the database (optional) |
Definition at line 758 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DatabaseStartup().
|
inlinestatic |
Shutdown a database instance.
| db | - Oracle Service Name |
| user | - Oracle User name |
| pwd | - Oracle User password |
| shutdownFlags | - Shutdown flags |
| shutdownMode | - Shutdown mode |
| sessionFlags | - Session flags |
Definition at line 765 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DatabaseShutdown().
|
inlinestatic |
Change the password of the given user on the given database.
| db | - Oracle Service Name |
| user | - Oracle User name |
| pwd | - Oracle User password |
| newPwd | - Oracle User New password |
Definition at line 772 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_SetUserPassword().
|
inlinestatic |
Set the High availability (HA) user handler.
| handler | - HA handler procedure |
Definition at line 777 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_SetHAHandler().