OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
Static class in charge of library initialization / cleanup. More...
#include <types.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 , SessionSysAsm = OCI_SESSION_SYSASM , SessionSysBkp = OCI_SESSION_SYSBKP , SessionSysDgD = OCI_SESSION_SYSDGD , SessionSysKmt = OCI_SESSION_SYSKMT , SessionSysRac = OCI_SESSION_SYSRAC , SessionPreAuth = OCI_SESSION_PRELIM_AUTH } |
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... | |
enum | AllocatedBytesValues { OracleClientBytes = OCI_MEM_ORACLE , OcilibBytes = OCI_MEM_OCILIB , AllBytes = OCI_MEM_ALL } |
Allocated Bytes enumerated values. More... | |
typedef core::Enum< HAEventSourceValues > | HAEventSource |
Source of HA events. | |
typedef core::Enum< HAEventTypeValues > | HAEventType |
Type of HA events. | |
typedef core::Flags< EnvironmentFlagsValues > | EnvironmentFlags |
Environment Flags. | |
typedef core::Enum< ImportModeValues > | ImportMode |
OCI libraries import mode. | |
typedef core::Enum< CharsetModeValues > | CharsetMode |
Environment charset mode. | |
typedef core::Flags< SessionFlagsValues > | SessionFlags |
Sessions flags. | |
typedef core::Flags< StartModeValues > | StartMode |
Oracle instance start modes. | |
typedef core::Flags< StartFlagsValues > | StartFlags |
Oracle instance start flags. | |
typedef core::Flags< ShutdownModeValues > | ShutdownMode |
Oracle instance shutdown modes. | |
typedef core::Flags< ShutdownFlagsValues > | ShutdownFlags |
Oracle instance shutdown flags. | |
typedef core::Flags< AllocatedBytesValues > | AllocatedBytesFlags |
Allocated Bytes. | |
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. | |
static void | Cleanup () |
Clean up all resources allocated by the environment. | |
static Environment::EnvironmentFlags | GetMode () |
Return the Environment mode flags. | |
static Environment::ImportMode | GetImportMode () |
Return the Oracle shared library import mode. | |
static Environment::CharsetMode | GetCharset () |
Return the OCILIB charset type. | |
static unsigned int | GetCharMaxSize () |
Return maximum size for a character. | |
static big_uint | GetAllocatedBytes (AllocatedBytesFlags type) |
Return the current number of bytes allocated internally in the library. | |
static bool | Initialized () |
Return true if the environment has been successfully initialized. | |
static OracleVersion | GetCompileVersion () |
Return the version of OCI used for compiling OCILIB. | |
static unsigned int | GetCompileMajorVersion () |
Return the major version number of OCI used for compiling OCILIB. | |
static unsigned int | GetCompileMinorVersion () |
Return the minor version number of OCI used for compiling OCILIB. | |
static unsigned int | GetCompileRevisionVersion () |
Return the revision version number of OCI used for compiling OCILIB. | |
static OracleVersion | GetRuntimeVersion () |
Return the version of OCI used at runtime. | |
static unsigned int | GetRuntimeMajorVersion () |
Return the major version number of OCI used at runtime. | |
static unsigned int | GetRuntimeMinorVersion () |
Return the minor version number of OCI used at runtime. | |
static unsigned int | GetRuntimeRevisionVersion () |
Return the revision version number of OCI used at runtime. | |
static void | EnableWarnings (bool value) |
Enable or disable Oracle warning notifications. | |
static bool | SetFormat (FormatType formatType, const ostring &format) |
Set the format string for implicit string conversions of the given type. | |
static ostring | GetFormat (FormatType formatType) |
Return the format string for implicit string conversions of the given type. | |
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. | |
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. | |
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. | |
static void | SetHAHandler (HAHandlerProc handler) |
Set the High availability (HA) user handler. | |
Static class in charge of library initialization / cleanup.
Source of HA events.
Possible values are Environment::HAEventSourceValues
Type of HA events.
Possible values are Environment::HAEventTypeValues
Environment Flags.
Possible values are Environment::EnvironmentFlagsValues
OCI libraries import mode.
Possible values are Environment::ImportMode
Environment charset mode.
Possible values are Environment::CharsetModeValues
Sessions flags.
Possible values are Environment::SessionFlagsValues
Oracle instance start modes.
Possible values are Environment::StartModeValues
Oracle instance start flags.
Possible values are Environment::StartFlagsValues
Oracle instance shutdown modes.
Possible values are Environment::ShutdownModeValues
Oracle instance shutdown flags.
Possible values are Environment::ShutdownFlagsValues
Allocated Bytes.
Possible values are Environment::AllocatedBytesValues
ocilib::Environment::HAHandlerProc |
HA Event sources enumerated values.
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 |
Charset mode enumerated values.
Enumerator | |
---|---|
CharsetAnsi | Environment is ANSI string or UTF8 string |
CharsetWide | Environment is UNICODE using wide character string |
Session flags enumerated values.
Oracle instance shutdown flags enumerated values.
|
inlinestatic |
Initialize the OCILIB environment.
mode | - Environment mode |
libpath | - Oracle shared library path (optional) |
Definition at line 32 of file Environment.hpp.
|
inlinestatic |
Clean up all resources allocated by the environment.
Definition at line 37 of file Environment.hpp.
References OCI_GetUserData(), and OCI_SetUserData().
|
inlinestatic |
Return the Environment mode flags.
Definition at line 52 of file Environment.hpp.
|
inlinestatic |
Return the Oracle shared library import mode.
Definition at line 57 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetImportMode().
|
inlinestatic |
Return the OCILIB charset type.
Definition at line 62 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetCharset().
|
inlinestatic |
Return maximum size for a character.
Definition at line 67 of file Environment.hpp.
|
inlinestatic |
Return the current number of bytes allocated internally in the library.
type | : type of memory to request |
Definition at line 72 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetAllocatedBytes().
|
inlinestatic |
Return true if the environment has been successfully initialized.
Definition at line 77 of file Environment.hpp.
|
inlinestatic |
Return the version of OCI used for compiling OCILIB.
Definition at line 82 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetOCICompileVersion().
|
inlinestatic |
Return the major version number of OCI used for compiling OCILIB.
Definition at line 92 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetOCICompileVersion().
|
inlinestatic |
Return the minor version number of OCI used for compiling OCILIB.
Definition at line 97 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetOCICompileVersion().
|
inlinestatic |
Return the revision version number of OCI used for compiling OCILIB.
Definition at line 102 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetOCICompileVersion().
|
inlinestatic |
Return the version of OCI used at runtime.
Definition at line 87 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetOCIRuntimeVersion().
|
inlinestatic |
Return the major version number of OCI used at runtime.
Definition at line 107 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetOCIRuntimeVersion().
|
inlinestatic |
Return the minor version number of OCI used at runtime.
Definition at line 112 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetOCIRuntimeVersion().
|
inlinestatic |
Return the revision version number of OCI used at runtime.
Definition at line 117 of file Environment.hpp.
References ocilib::core::Check(), and OCI_GetOCIRuntimeVersion().
|
inlinestatic |
Enable or disable Oracle warning notifications.
value | - enable/disable warnings |
Definition at line 122 of file Environment.hpp.
References OCI_EnableWarnings().
|
inlinestatic |
Set the format string for implicit string conversions of the given type.
formatType | - Type of format |
format | - Format string |
Formats can set at 2 levels:
When the library needs to perform a string conversion, it search for a valid format using the following order:
Definition at line 127 of file Environment.hpp.
References ocilib::core::Check(), and OCI_SetFormat().
|
inlinestatic |
Return the format string for implicit string conversions of the given type.
formatType | - Type of format |
Definition at line 132 of file Environment.hpp.
References ocilib::core::Check(), ocilib::core::MakeString(), and OCI_GetFormat().
Referenced by ocilib::Timestamp::FromString(), ocilib::Date::FromString(), ocilib::Number::FromString(), ocilib::Number::ToString(), ocilib::Date::ToString(), and ocilib::Timestamp::ToString().
|
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 137 of file Environment.hpp.
References ocilib::core::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 144 of file Environment.hpp.
References ocilib::core::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 151 of file Environment.hpp.
References ocilib::core::Check(), and OCI_SetUserPassword().
|
inlinestatic |
Set the High availability (HA) user handler.
handler | - HA handler procedure |
Definition at line 156 of file Environment.hpp.
References ocilib::core::Check(), and OCI_SetHAHandler().