Getting ORA-12154: TNS:could not resolve service name while using lr_db_connect (253 Views)
Reply
Occasional Visitor
AviNachman
Posts: 2
Registered: ‎07-15-2013
Message 1 of 3 (253 Views)

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?

Please use plain text.
Trusted Contributor
leobor
Posts: 195
Registered: ‎07-08-2009
Message 2 of 3 (244 Views)

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.

Please use plain text.
Occasional Visitor
AviNachman
Posts: 2
Registered: ‎07-15-2013
Message 3 of 3 (232 Views)

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?

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation