Example: lrd_server_attach
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);