Share this page

# lrd_server_attach

Creates an access path to a data source for database operations. (Oracle 8.0 and later)

    LRDRET lrd_server_attach( void *mpvLRDDBIHandleServer, char *mpcServerID, long mliServerIDLen, long mliMode,
    int miDBErrorSeverity );

mpvLRDDBIHandleServer | A pointer to an LRDDBI server handle.
mpcServerID | A pointer to the database server identification string.
mliServerIDLen | The length of the database server identification string.
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_server_attach function creates an access path to a data source for database operations. 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

The following argument can be parameterized using standard parameterization: mpcServerID

## Example

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

    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 Function Reference 26.1 All View Local Help Center View Online Help Center Version: