Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle (1536 Views)
Reply
Occasional Advisor
franzvino
Posts: 12
Registered: ‎07-30-2008
Message 1 of 10 (2,006 Views)

Loadrunner 9.5 and web (http/html) and connect DB Oracle

[ Edited ]

Hi,
i must connect my script into a db (SQLSERVER or Oracle) and all iterations must be run a query.
I have found LR_DB_CONNECT and other function but i haven't some doc tha explain me what i must to do.
Tnx a lot
Franz

 

 

P.S. This thread has been moved from Performance Center Support and News Forum to LoadRunner Support Forum.
-HP Forum Moderator

Please use plain text.
HP Expert
KMadan
Posts: 1,074
Registered: ‎05-27-2009
Message 2 of 10 (2,004 Views)

Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle

It doesn't work in web http/html protocol. It works only in Web Service protocol. It was newly added in LR95

Madan
Please use plain text.
Occasional Advisor
franzvino
Posts: 12
Registered: ‎07-30-2008
Message 3 of 10 (2,004 Views)

Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle

Web Service is inside "Web and Multimedia protocol" license fo LR?
Please use plain text.
Valued Contributor
vpathak78
Posts: 209
Registered: ‎12-02-2008
Message 4 of 10 (2,004 Views)

Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle

It is part of Web 2.0 bundle or SOA bundle.

Web service is not included in web and multimedia bundle.
Please use plain text.
Occasional Advisor
franzvino
Posts: 12
Registered: ‎07-30-2008
Message 5 of 10 (2,004 Views)

Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle

SO, if i want
-in init:
connect to database,
-in action:
execute a select to read parameter,
execute an update to mark this data like used -in end
commit and close the connection

And this for ani iteration, How i can do it?

tnx a lot
Franz
Please use plain text.
Valued Contributor
vpathak78
Posts: 209
Registered: ‎12-02-2008
Message 6 of 10 (2,004 Views)

Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle

init ()


lr_db_connect("StepName=Connect to DB",
"ConnectionName=DB1",
"ConnectionString=Data Source=VPATHAK-T43;Initial Catalog=Northwind;Integrated Security=True",
"ConnectionType=SQL",
LAST);

Action()
{

int i = 1;

lr_db_executeSQLStatement("StepName=execute",
"ConnectionName=DB1",
"SQLStatement=select * from dbo.orders ",
"DatasetName=ResultsSet",
LAST);

while (i<4) {

lr_db_getvalue("StepName=GetValue",

"DatasetName=ResultsSet",

"Column=OrderID",

"Row=next",

"OutParam=MyOutputParam",

LAST );

lr_output_message("The value is: %s", lr_eval_string("{MyOutputParam}") );


i=i+1;

}

return 0;
}


vuser_end()
{


lr_db_disconnect("StepName=Disconnect",
"ConnectionName=DB1",
LAST);


return 0;
}
Please use plain text.
Occasional Advisor
franzvino
Posts: 12
Registered: ‎07-30-2008
Message 7 of 10 (2,004 Views)

Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle

Sorry i forgott to add this condition, i have LR licensed only for WEB and MULTIMEDIA.
My scipt is WEB (Http/Html), the db is an oracle 10...tnx
Please use plain text.
Valued Contributor
vpathak78
Posts: 209
Registered: ‎12-02-2008
Message 8 of 10 (2,004 Views)

Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle

LR 9.5 have these db functions assigned only to web service protocol.

You might be better off going through front end for HTTP/HTML protocol.

Please use plain text.
Occasional Advisor
franzvino
Posts: 12
Registered: ‎07-30-2008
Message 9 of 10 (2,004 Views)

Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle

Hi,
i have some problem witth the connection string about throught this script with oracle....
i have this orcle connection string:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521)))(CONNECT_DATA=(SID=prod)(server=dedicated)))

How i translate this string? Where i put the connection port and SID?

I attempted with the connection string generato fo loadrunner but with poor results.
Tnx a lot
Franz
Please use plain text.
Occasional Visitor
Viswa123
Posts: 2
Registered: ‎08-02-2013
Message 10 of 10 (1,536 Views)

Re: Loadrunner 9.5 and web (http/html) and connect DB Oracle

Hi

 

Did you fine solution for this ? If yes, please share with me. Even i am not able to connect to Oracle.

 

-Vis

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