Able to connect to database via Oracle SQL Developer but fails to connect via Load Runner

209 views Asked by At

Via Oracle SQL Developer as well as JMeter, able to connect Database.

But, when we try to connect DB via load runner(Vugen), getting below error:

Replay Error From Vugen:

"DB Connection failed {"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"}"

LR code used to connect DB:

lr_db_connect("StepName=DatabaseConnection", 
    "ConnectionString=Data Source=XXXXXX;Initial Catalog=InvDatabase;Persist Security Info=True;User ID=XXXXX;Password=XXXXX", 
    "ConnectionName=XXXXX", 
    "ConnectionType=SQL", 
    LAST );

Any help on this is much appreciated.

2

There are 2 answers

4
James Pulley On

OK, you are connecting via ODBC it looks like. Your ODBC driver is configured as Named Pipes. Use ODBC Query from MS Office as a test app tyo see if you can connect across the same ODBC Driver

0
Yasir On

The issue is fixed, once followed below:

Need to update tnsnames.ora file to have DB connection details.

tnsnames.ora file path in oracle installed folder below: C:\ORACLE\product\19.0.0\client_1\network\admin\tnsnames.ora

If you dont have tnsnames.ora file, you can copy the same file from below path, update it to have your DB connection details and place it under admin folder.

C:\ORACLE\product\19.0.0\client_1\network\admin\sample