How to troubleshoot JMeter access to Oracle and MySQL through JDBC

Source: Internet
Author: User

JMeter's manual describes how to access MySQL, but does not describe how to access Oracle. For a friend who has no Java application development experience and is not particularly familiar with Oracle, you can refer to this article to easily and quickly configure the JDBC connection and JDBC Request in JMeter.


Steps:

Create a new Thread Group;

Added JDBC Connection Configuration;

Click on the new JDBC Connection Configuration and the parameters that need to be modified include:

Variable Name: You can fill in an Oracle first, and so on, will explain;

Database url:jdbc:oracle:thin:@{host_ip_or_machine_name}:{oracle Listener Listening Port}:{The name of your Oracle instance}--you should note that the "{}" braces Just what I use to illustrate, when configuring JMeter, remove the "{}" brace ^_^

JDBC Driver Class:oracle.jdbc.driver.OracleDriver

Username: Access the user name of the Oracle instance above

Password: The corresponding password

A new JDBC Request is added, and the parameters that need to be modified include:

Variable Name: Fill in the same content with the JDBC Connection configuration above. This indicates that the JDBC Connection configuration establishes a connection pool named Oracle, after which the other JDBC request shared the connection pool;

Query:select * FROM table_name. It is recommended to open your data query tool, enter a SQL query statement, to ensure that the results can be executed, and then copy it over;

Added a view Results Tree;

Click Run to view the results. You can see the return result of the response in response Data tab.


Precautions:

Prompt at execution: No suitable Driver.

Search for the Classes12.jar file on your computer and copy it to the JMeter Lib directory. If you cannot find the Classes12.jar file, look for the Classes12.zip file, and then change the extension to jar;

Prompt at execution: ora-00911:invalid character.

Make sure that the SQL statement you entered in the query in the JDBC request is correct.


The sections in the JMeter user manual about configuring database performance through JDBC are as follows:

Http://jakarta.apache.org/jmeter/usermanual/build-db-test-plan.html

How to troubleshoot JMeter access to Oracle and MySQL through JDBC

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.