Share this page

# lrd_session_begin

Creates and begins a user session for a server. (Oracle 8 and later)

    LRDRET lrd_session_begin( void *mpvLRDDBIHandleSvcCtx, void *mpvLRDDBIHandleSession, unsigned long muliCredentials, long mliMode, int miDBErrorSeverity );

mpvLRDDBIHandleSvcCtx | A pointer to an LRDDBI service context handle.
mpvLRDDBIHandleSession | A pointer to an LRDDBI session handle.
muliCredentials | Credentials for establishing the user session.
mliMode | The mode of operation. Only a zero value is supported.
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

The lrd_session_begin function and begins a user session for a server. This function is only supported for Oracle 8.0 and higher.

For additional details, refer to the Function Header File lrd.h.

## Return Values

See LRD Return Values.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In the following example, lrd_session_begin sets up an access path to a database server.

Copy code

    lrd_initialize_db(LRD_DBTYPE_ORACLE, 2, 0);
    lrd_env_init(LRD_DBTYPE_ORACLE, &OraEnv1, 0, 0);
    lrd_handle_alloc_ora(OraEnv1, SERVER, &OraSrv1, 0);
    lrd_handle_alloc_ora(OraEnv1, SVCCTX, &OraSvc1, 0);
    lrd_handle_alloc_ora(OraEnv1, SESSION, &OraSes1, 0);
    lrd_server_attach(OraSrv1, "rman", -1, 0, 0);
    lrd_attr_set_ora(OraSvc1, SERVER, OraSrv1, 0, 0);
    lrd_attr_set_ora(OraSes1, USERNAME, "orman2", -1, 0);
    lrd_attr_set_ora(OraSes1, PASSWORD, "tdtdtd", -1, 0);
    lrd_attr_set_ora(OraSvc1, SESSION, OraSes1, 0, 0);
    lrd_session_begin(OraSvc1, OraSes1, 1, 0, 0);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: