LoadRunner Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Getting ORA-12154: TNS:could not resolve service name while using lr_db_connect

Highlighted
Occasional Visitor

Getting ORA-12154: TNS:could not resolve service name while using lr_db_connect

Hey

i am try to connect to oracle DB with this command:

lr_db_connect("StepName=example",
         "ConnectionName=example",
         "ConnectionString=Provider=OraOLEDB.Oracle.1;Data Source=SPROU14;Password=sa ;User ID=sa",
         "ConnectionType=OLEDB",
 LAST);

 

and getting Error: DB Connection failed {"ORA-12154: TNS:could not resolve service name"}

i did TNSPING from command line and its pass:

 tnsping SPROU14

Used TNSNAMES adapter to resolve the alias
Attempting to contact (description=(address=(protocol=tcp)(host=illin267)(port=1
521))(connect_data=(sid=SPROU14)))
OK (120 msec) 

 

any idea what can be the issue?

2 REPLIES
Respected Contributor

Re: Getting ORA-12154: TNS:could not resolve service name while using lr_db_connect

Please try to connect to your Oracle instance using SQLPLUS with the service name and credentials like in your LR statement. You may discover some problems there too.

Occasional Visitor

Re: Getting ORA-12154: TNS:could not resolve service name while using lr_db_connect

Hey

SQLplus is working :( ,i currently have oracle client of 9i on Load Runner Machine  and i am running on DB with oracle 11i can it be the issue?

can u please advice any other suggestions?