1, to do the JDBC request , first to understand what this JDBC object is, and now take SQL Server as an example to illustrate
First download the corresponding database driver (Baidu "JDBC SQL Server Driver" and then download).
Note : After the download is complete, change the sqljdbc4.zip to the jar suffix name directly. Then put it in the JMeter \lib directory, for example C:\jmeter-2.13\lib.
2, as for the creation of JMeter project here no longer detailed, direct see ( add configuration element JDBC Connection configuration)
Refer to the following table for the URL and JDBC drivers above (also available in Ps:jmeter's help)
Datebase |
Driver class |
Database URL |
Mysql |
Com.mysql.jdbc.Driver |
Jdbc:mysql://host:port/{dbname} |
PostgreSQL |
Org.postgresql.Driver |
Jdbc:postgresql:{dbname} |
Oracle |
Oracle.jdbc.driver.OracleDriver |
Jdbc:oracle:thin:user/[email Protected]//host:port/service |
Ingres (2006) |
Ingres.jdbc.IngresDriver |
Jdbc:ingres://host:port/db[;attr=value] |
MSSQL |
Com.microsoft.sqlserver.jdbc.SQLServerDriver Or Net.sourceforge.jtds.jdbc.Driver |
Jdbc:sqlserver://ip:1433;databasename=dbname Or jdbc:jtds:sqlserver://localhost:1433/"+" library " |
3 . Add the JDBC Request and fill in the SQL statement you want (Note: Variable name is the name you wrote above)
4. Direct test to see if the call was successful. If there is a 1433 port connection failure problem, please locate whether SQL Server TCP/IP is a problem, I also have a method in another article.
RPM: JDBC Driver configuration related