vuser_init()
{
lrd_init(&InitInfo, DBTypeVersion);
lrd_initialize_db(LRD_DBTYPE_ORACLE, 2, 0);
lrd_env_init(LRD_DBTYPE_ORACLE, &OraEnv1, 0, 0);
lrd_ora8_handle_alloc(OraEnv1, SERVER, &OraSrv1, 0);
lrd_ora8_handle_alloc(OraEnv1, SVCCTX, &OraSvc1, 0);
lrd_ora8_handle_alloc(OraEnv1, SESSION, &OraSes1, 0);
lrd_ora8_handle_alloc(OraEnv1, SESSION, &OraSes2, 0);
lrd_server_attach(OraSrv1, "Test_db", 7, 0, 0);
lrd_ora8_attr_set_from_handle(OraSvc1, SERVER, OraSrv1, 0, 0);
Error occured at lrd_server_attach function call.
PFB the error code:
vuser_init.c(19): Error: lrdo_server_attach: "OCIServerAttach" return-code=OCI_ERROR, error-code=12154:
vuser_init.c(19): Error: ORA-12154: TNS:could not resolve the connect identifier specified
vuser_init.c(19): server_attach: ERROR, return-code=LRDE2009. ServerHandle=OraSrv1, ServerID="Test_db"
vuser_init.c(19): Error: ORA-12154: TNS:could not resolve the connect identifier specified
vuser_init.c(19): server_attach: ERROR, return-code=LRDE2009. ServerHandle=OraSrv1, ServerID="Test_db"
Actions performed to fix the issue:
Verified TNSnames fileand oracle Environment variables.
Tried replacing ServerID with DNS name.
Able to connect to Database via SQL Plus using same TNS names.ora file.
Loadrunner and SQL Plus are installed on same machine.
Still no luck.......
Any suggestions to fix the issue