1, to do the JDBC request , first to understand what this JDBC object is, now has SQL Server as an example to illustrate
First download the corresponding database driver, I have uploaded to my network disk, please download directly, no longer in the CSDN with points downloaded.
address : Http://yunpan.cn/QaEjwXyXFrA5H (Extract code: 1F35)
Note : After the download is complete, change the sqljdbc4.zip to the jar suffix name directly. Then put it under the Apache-jmeter-2.6\lib.
2, as for the creation of JMeter project here no longer detailed, direct see ( add configuration element JDBC Connectionconfiguration)
Refer to the following table for the URL and JDBC drivers above (also available in Ps:jmeter's help)
< Span style= "margin:0px; padding:0px ">datebase |
< Span style= "margin:0px; padding:0px ">driver class |
< Span style= "margin:0px; padding:0px ">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. in the request, 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.