I am trying to connect to a DB2 database but the following command in Vugen is failing:
lr_db_connect("StepName=Connect",
"ConnectionName=DB2",
"ConnectionString=Driver={IBM ODBC DB2 DRIVER};Database=SYSIBM;Hostname=mvs2.XXXX..us;Port=XXXX;Protocol=TCPIP;Uid=userid;Pwd=password;",
"ConnectionType=ODBC",
LAST);
The error I get is given below:
Virtual User Script started at : 9/16/2016 3:51:02 PM
Starting action vuser_init.
vuser_init.c(9): DB Connection "Connect" started ... Wait ....
vuser_init.c(9): DB Connection failed {"ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"}
vuser_init.c(9): Error (-17944): DB Connection failed {"Connect"}
Abort was called from an action.
The Loadrunner 12.5 Function reference help document suggests to use the mouse to click on: Design >
Insert in Script > New Step. When the Steps Toolbox panel appears select the lr_db_connect function and a Connection wizard is supposed to appear.
However, the lr_db_connect function is NOT LISTED, so no Connection Wizard windows appears. Why? Is the 12.5 function reference incorrect? Why is the commonly used, lr_db_connect command not listed in the Steps Toolbox?
is there another way to start the Connection Wizard for the DB2 database connection?
How do you let Vugen know the connection parameters for your DB2 database? The general information provided in the help documentation is insufficient in order to determine what is needed. I have other database tools that use an ODBC connection to DB2 and those tools work fine. However, Vugen does NOT know of the configuration details contained within the configuration settings for those other database tools.
What I really need is some examples showing the full lr_db_connect command needed for connecting to a IBM DB2 mainframe database using an ODBC connection. I just need the correct Connection string syntax (with all the REQUIRED parameters) and the documentation that describes where to get or how to define the values for those REQUIRED parameters. For example, I know the hostname, the port to use for the connection, the database name, the protocol (TCPIP), the userid and the password. However, I do not know how to tell Vugen 1) what IBM ODBC Driver to use and 2) where the software of this driver is located on my WIndows system.
I was reading some community post that stated that they fixed this problem using a DSN name. If that is true, then where do you specify this DSN name and what is the proper syntax within the lr_db_connect command to do this?