Highlighted
Absent Member.
Absent Member.
7359 views

not able to connect to Oracle DB using lr_db_connect.

Jump to solution

Hi All,

 

I am trying to connect to Oracle DB using lr_db_connect but getting following error.

my code

vuser_init()
{
lr_db_connect("StepName=ConnectionToDB",
"ConnectionName=DB1",
"ConnectionString=Provider=OraOLEDB.Oracle.1;Data Source=<TNS name from TNSNames.ora file>;User ID=<MyUID>;Password=<mYPassword>",
"ConnectionType=OLEDB",
LAST);
return 0;
}

 

ReplyLog:

Virtual User Script started at : 2014-03-26 15:51:25
Starting action vuser_init.
vuser_init.c(16): DB Connection "ConnectionToDB" started ... Wait ....
vuser_init.c(16): Error: DB Connection failed {"The 'OraOLEDB.Oracle.1' provider is not registered on the local machine."}
vuser_init.c(16): Error: DB Connection failed {"ConnectionToDB"}
Abort was called from an action.

 

Debugging done so far:
1. Verified the Oracle client path. This is set correctly.
C:\app\<myName>\product\11.2.0\client_1;C:\app\<myName>\product\11.2.0\client_1\bin

2. Registered the OraOLEDB11.dll correctly.

3.TNSname.ora file is upto date.

4. Created function in Web Services scripts protocol using Insert -> New Step -> Database: Connect

5. Oracle Home is also set

C:\Users\[myName]>echo Oracle_home %ORACLE_HOME%

Oracle_home C:\app\[myName]\product\11.2.0\client_1

 

my environment information: 

 

HP LoadRunner Software 11.04
Product Version: 11.04.0.0
Product Build: Build 9409

Installed Components:
Analysis :11.04.0.0 
Online Documentation: 11.04.0.0 
Samples: 11.04.0.0 
Vuser Generator: 11.04.0.0

 

Installed Patches:
LRVUG_00002 for HP Vugen SA 11.00 QFE 
HP Virtual User Generator 11.00 Patch 4 
LRVUG_00045 for HP LoadRunner 11.00 
HP Analysis 11.00 Patch 4

Protocol used: Web Service Protocl

 

Any pointer would be really helpful.

 

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Re: not able to connect to Oracle DB using lr_db_connect.

Jump to solution

I was able to reslove this.

 

I initially had 64-bit Oracle version and registered OraOLEDB11.dll using regsvr32. But was not able to connect it to DB. Then uninstalled 64-bit Oracle client and  installed 32-bit Oracle version and registered OraOLEDB11.dll using regsvr32. But on 64-bit windows regsvr32 starts in 64-bit version by default. I had to re-register OraOLEDB11.dll with 32-bit version of regsvr32 using following.

 

C:\Windows\system32>%systemroot%\SysWoW64\regsvr32 "C:\app\<myName>\product\11.2.0\client_1\BIN\OraOLEDB11.dll"

 

After this was done I was able to connect it to DB.

 

 

View solution in original post

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: not able to connect to Oracle DB using lr_db_connect.

Jump to solution

I was able to reslove this.

 

I initially had 64-bit Oracle version and registered OraOLEDB11.dll using regsvr32. But was not able to connect it to DB. Then uninstalled 64-bit Oracle client and  installed 32-bit Oracle version and registered OraOLEDB11.dll using regsvr32. But on 64-bit windows regsvr32 starts in 64-bit version by default. I had to re-register OraOLEDB11.dll with 32-bit version of regsvr32 using following.

 

C:\Windows\system32>%systemroot%\SysWoW64\regsvr32 "C:\app\<myName>\product\11.2.0\client_1\BIN\OraOLEDB11.dll"

 

After this was done I was able to connect it to DB.

 

 

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: not able to connect to Oracle DB using lr_db_connect.

Jump to solution

It doesnt solve my problem.

 

Here is my code generation log :

rd.c/fjInitDB: Cannot load the ORACLE library (DLL), "ora805.dll", specified after a "+"  in the "805" entry in section [ORACLE_WINNT] in the "lrd.ini" file.  - Das angegebene Modul wurde nicht gefunden.
Processing continues


lrd.c/fjInitDB: Cannot load the ORACLE library (DLL), "oci.dll", specified after a "+"  in the "816" entry in section [ORACLE_WINNT] in the "lrd.ini" file.  - (null)Processing continues


lrd.c/fjInitDB: Cannot load the ORACLE library (DLL), "oraclient8.dll", specified after a "+"  in the "815" entry in section [ORACLE_WINNT] in the "lrd.ini" file.  - Das angegebene Modul wurde nicht gefunden.
Processing continues


lrd.c/fjInitDB: Cannot load the ORACLE library (DLL), "ora804.dll", specified after a "+"  in the "804" entry in section [ORACLE_WINNT] in the "lrd.ini" file.  - Das angegebene Modul wurde nicht gefunden.
Processing continues


lrd.c/fjInitDB: Cannot load the ORACLE library (DLL), "ora803.dll", specified after a "+"  in the "803" entry in section [ORACLE_WINNT] in the "lrd.ini" file.  - Das angegebene Modul wurde nicht gefunden.
Processing continues


lrd.c/fjInitDB: Cannot load the ORACLE library (DLL), "ora73.dll", specified after a "+"  in the "73" entry in section [ORACLE_WINNT] in the "lrd.ini" file.  - Das angegebene Modul wurde nicht gefunden.
Processing continues


lrd.c/fjInitDB: Cannot load the ORACLE library (DLL), "ora72.dll", specified after a "+"  in the "72" entry in section [ORACLE_WINNT] in the "lrd.ini" file.  - Das angegebene Modul wurde nicht gefunden.
Processing continues


lrd.c/fjInitDB: Cannot load the ORACLE library (DLL), "orant71.dll", specified after a "+"  in the "71" entry in section [ORACLE_WINNT] in the "lrd.ini" file.  - Das angegebene Modul wurde nicht gefunden.
Processing continues


lrd.c/fjInitDB: None of the library combinations specified in section [ORACLE_WINNT] in the "lrd.ini" file could be loaded.  Initializing for ORACLE failed


lrd_to_printable: ERROR, return-code=LRDE2015.   


lrd_to_printable: Warning: continuing after error, return-code=LRDE2015.   


LRD error 2015 when generating value for lrd_assign(&MaxCharLength_D1,...) -
    The generated lrd_assign is commented out, with a value of ???.
    It can be found by searching "lrd_assign(&MaxCharLength_D1".

        value passed to lrd_assign may be invalid for MaxCharLength_D1:
        lrd_error=2015

        value passed to lrd_assign may be invalid for MaxCharLength_D1:
        lrd_error=2015

Code generation failed: Database client binaries were not found.
Install the same Oracle Client Library that was installed on the machine on which this Vuser script was originally recorded.

 

 

I know the Vugen don't find the Oracle binaries. I looked for the binaries in the Oracle folder but i cant find them. Maybe the oracle.dlls in the lrd.ini has the wrong names because its a newer version of oracle client ? Can someone post his Oracle Winnt part of the lrd.ini for compare with mine.

0 Likes
Highlighted
New Member.

Re: not able to connect to Oracle DB using lr_db_connect.

Jump to solution

I was facing similar issues since long time and found this discussion but no luck.

Then I installed Oracle Client 32 bit as my VUGen is a 32 bit application.
Registered OraOLEDB11 using regsvr32.exe.

I am able to connect the DB successfully.

Regards,
Archan

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.