Highlighted
Absent Member.
Absent Member.
5307 views

Connecting to DB2 using LoadRunner....

lr_db_connect("StepName=sname",
"ConnectionName=conname",
"ConnectionString=Driver={SQLServer};Server=this;Database=ka;Trusted_Connection=yes",
"ConnectionType=ODBC",
LAST);

I need to connect to DB2 using lr_db_connect method... what are the properties values that i need to set in the above method....

Thanks,
Munaf
Tags (2)
0 Likes
12 Replies
Highlighted
Absent Member.
Absent Member.

Got this working.. just had to use

lr_db_connect("StepName=teststep",
"ConnectionName=dnconn",
"ConnectionString=Driver={IBM DB2 ODBC DRIVER};Database=DBname;Hostname=host;Port=300; Protocol=TCPIP;Uid=userID;Pwd=password;",
"ConnectionType=ODBC",
LAST);
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

how to did you make loadrunner pick IBM DB2 drivers?

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

I fixed it. Connected through DSN name.

0 Likes
Highlighted
New Member.

Hi vpathak,
I am facing the same issue as you have described in this thread.

I am curious to know as to how the issue got resolved using the DSN. Can you please brief me about it? this is little urgent and a project requirement.

 

My contact id : bismaya_pattanayak@infosys.com

 

 

Thanks in Advance

Bismaya

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

i am having following error message when connecting to sql server database.

Action.c(5): Error: C interpreter run time error: Action.c (5):  Error -- Unresolved symbol : lr_db_connect.
Action.c(5): Notify: CCI trace: Compiled_code(0): Action()

 

 

lr_db_connect("StepName=teststep",
       "ConnectionName=dnconn",
       "ConnectionString=Driver={SQLServer};Database=ABCDE;Hostname=xyz;Port=1433; Protocol=TCPIP;Uid=userid;Pwd=password;",
       "ConnectionType=ODBC",
       LAST);

0 Likes
Highlighted
Absent Member.
Absent Member.

You are using Web Services protocol?

 

Regards,

Mario M.

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

LoadRunner:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Customer/bd-p/loadrunner-support-customer-forum

Performance Center:
http://h30499.www3.hp.com/t5/Performance-Center-Support/bd-p/performance-center-support-customer

How to:
http://www.youtube.com/watch?v=4ChlysWupWM

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

no,i am using http protocol.  how do i connect sql server database when using http protocol ? i want to use some data from database on fly . please give me a quick reply on this.

0 Likes
Highlighted
Absent Member.
Absent Member.

When using web it means you only record web communication and there is no need to connect directly to the database, stressing to the database has to be done by the application that inserts the data into it, while web script stresses the application.

 

Regards,

Mario M.

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

LoadRunner:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Customer/bd-p/loadrunner-support-customer-forum

Performance Center:
http://h30499.www3.hp.com/t5/Performance-Center-Support/bd-p/performance-center-support-customer

How to:
http://www.youtube.com/watch?v=4ChlysWupWM

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

the purpose here to retrieve id's from the table  and use them in web_submit_data function. i have other solution to geberate id's dynamicaly and use those. is there any possibilty to connect sql server database when using http protocol?

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

0 Likes
Highlighted
Absent Member.
Absent Member.

Which protocol u used for this?

i want to connect sql db and run the queries on db through VUGEN.

My script as below:

lr_db_connect("StepName=DatabaseConnection", 
        "ConnectionString=Data Source=CMS_118;Initial Catalog=dcms;Persist Security Info=True;User ID=bususer1;Password=testdb@567", 
        "ConnectionName=InvDatabaseConnection", 
        "ConnectionType=SQL", 
        LAST );
    return 0;

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.