Oracle database Testing

In this blog, I’ll tell you how to load test the oracle database using loadrunner. There are different ways to achieve it and one simple way is writing SQL queries in vugen script.

In this blog I’m going to tell how to connect to database, how to execute query and how to disconnect. I will be using lr_db functions to achieve this. Loadrunner help is very useful with details about lr_db functions.


Connect to Oracle database:

lr_db_connect("StepName=Connect",
        "ConnectionString=Provider=OraOLEDB.Oracle; dbq=10.xx.xx.xx:1540; Data Source=XXXX; Persist Security Info=True; User ID=username; Password=password",
        "ConnectionName=OracleDB",
        "ConnectionType=OLEDB",
LAST );

SQL statement:
lr_db_executeSQLStatement("StepName=PerformQuery",
                "ConnectionName= OracleDB",
                "SQLStatement=SELECT * FROM \"TableName\" ",
                "DatasetName=MyDataset",
                LAST );

Disconnect from database:
                lr_db_disconnect("StepName=Disconnect",


                 "ConnectionName= OracleDB", LAST );


Pre-requisites:
Oracle Client need to be installed in load generator machine and TNS entry should be there for data source.
Use web services protocol for loadrunner vugen script.

Comments

  1. Excellent blog! I appreciate you sharing this valuable information. 5Data Inc, based in the USA, offers a range of services, including web security testing, functional testing, regression testing, app development, and mobile app development. Feel free to contact us for more details! Regression testing
    Web security Testing
    Performance testing Company

    ReplyDelete

Post a Comment

Popular posts from this blog

web_set_max_html_param_len

Lr Advance Param Function In Loadrunner With Example

Error -27492: "HttpSendRequest" failed, Windows error code=12057 (certificate revoked) and retry limit (0) exceeded for URL="