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

Are there any sample code I could connect to oracle database using lr_db_connect

Frequent Visitor

Are there any sample code I could connect to oracle database using lr_db_connect

  lr_db_connect("StepName=myStep",     "ConnectionString=Initial ConnectionString=DATA SOURCE=jdbc:oracle:thin:@p2pyak-vip.es.ad.adp.com:1522:an3;"  "user id =XXXX;password = XXXX;" ,  "ConnectionName=MyConnection",  "ConnectionType=ORACLE",  LAST);

 

 lr_db_executeSQLStatement("StepName=MyStep",  "ConnectionName=MyConnection",  "SQLQuery=SELECT * FROM Addresses",  "DatasetName=ds1",  LAST);

 

I got below error:

 

Error -- Unresolved symbol : lr_db_connect.

1 REPLIES
Highlighted
Frequent Advisor

Re: Are there any sample code I could connect to oracle database using lr_db_connect

You are using the oracle 2 tier protocol? Else the neccessary headers for db need to be imported explicitly.

 

Next step, note you need a list of stuff such as Ora handle, Ora Session etc that you need to setup before connect.

I dont have a sample script, but you could check in the help and use the examples provided.

 

Regards

AJ