JMeter with SQL Server

Source: Internet
Author: User
Tags postgresql

This section describes how to use JMeter for connection testing of SQL Server, using test libraries and test tables as well as the previous section, "Performance test Tool operations Database (vii)-loadrunner and SQL Server", to make it easy for you to learn in comparison.

1. Install the JDBC driver first

Driver download link address: http://pan.baidu.com/s/1bpDpjSr Password: v6tn
After downloading the decompression, place the Sqljdbc4.jar in the JMeter installation directory/lib, restart JMeter after replication, or refer to the jar package path directly in the test plan as follows:

2. Add and configure the JDBC Connection configuration after adding the thread group

To configure the connection as described above, the parameters that need to be configured are:

(1) This value is also used in subsequent JDBC request Variable Name:sqlconn (connection pool name);
(2) Database Url:jdbc:sqlserver://172.16.1.215:1433;databasename=layim (the default port number is 1433, everyone according to their own database environment configuration);
(3) JDBC Driver Class:com.microsoft.sqlserver.jdbc.SQLServerDriver (many of the online is wrong, different versions of the database requirements match);

You need to determine your SQL Server version, which is 2003 or 2008, because two versions of the drive configuration are not the same, 2008 is Com.microsoft.sqlserver.jdbc.SQLServerDriver, the previous version is Com.microsoft.jdbc.sqlserver.SQLServerDriver.

(4) Username the user name and password of the password database;

3. Add Query JDBC Request

4. Add Insert data jdbc Request

In this case, the variable parameter is inserted as a placeholder, so the query type is required to be prepared Update Statement, and the type criteria can be found in the Performance test tool operations Database (vi)-jmeter and PostgreSQL The difference between the statement,preparedstatement,callablestatement of JDBC

5. Update and delete are not examples, as with insert.

In the last summary, the URL connection to the JMeter operation database and the driver class are listed to

Database

Driver class

Database URL

Sample URL

Oracle

Oracle.jdbc.driver.OracleDriver

Jdbc:oracle:thin: @host:p Ort:service

Jdbc:oracle:thin:@172.16.1.70:1521:orcl

Mysql

Com.mysql.jdbc.Driver

Jdbc:mysql://host:port/{dbname}

Jdbc:mysql://172.16.1.67:3306/testdb

Mongodb

Using the templates in the

Mongodb.jmx

PostgreSQL

Org.postgresql.Driver

Jbdc:postgresql://ip:port/{dbname}

Jbdc:postgresql://172.16.1.67:5432/testdb

MS SQL

Com.microsoft.sqlserver.jdbc.SQLServerDriver

Jdbc:sqlserver://host:port;databasename=dbname

Jdbc:sqlserver://172.16.1.215:1433;databasename=layim

JMeter with SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.