How to solve the problem of jmeter accessing Oracle and MySQL through JDBC (the test plan instance is downloaded in the message)

Source: Internet
Author: User

Keywords: Open-Source Performance Testing ToolJmeter Oracle


JmeterThe Manual describes how to accessMySQLBut does not explain how to accessOracle. ForJavaApplication development experience andOracleIf you are not familiar with it, refer to this article.ArticleEasy and quick ConfigurationJmeterInJDBCConnection andJDBC request.

Steps:

    1. Create A thread group ;

    2. added JDBC connection configuration ;

    3. click the newly added JDBC connection configuration . The parameters to be modified include:

    • Variable name: You can enter oneOracleWill explain;

    • Database URL:JDBC: oracle: thin :@{ host_ip_or_machine_name }:{ OracleListener Port}:{YourOracleInstance name} -- Note that the braces "{}" are used only for instructions. When configuring jmeter, remove the braces "{}". ^_^

    • JDBC Driver Class:Oracle. JDBC. Driver. oracledriver

    • Username: Access the aboveOracleInstance Username

    • Password: Password

    1. AddJDBC request, The parameters to be modified include:

    • Variable name:JDBC connection ConfigurationEnter the same content. This indicatesJDBC connection ConfigurationCreateOracleConnection Pool, followed by otherJDBC requestAll share this connection pool;

    • Query:Select * From table_name. We recommend that you open your data query tool and enterSQLQuery statement to ensure that the result is displayed, and thenCopyCome here;

    1. AddView results tree;

    2. ClickRunTo view the results. You canResponse Data TabThe response result is displayed.

Note:

    1. Prompt during execution:No suitable driver.

      Search on your computerClasses12.jarThis file, and thenCopyToJmeterOfLibDirectory. If noClasses12.jarFind this file.Classes12.zipFile, and then change the extensionJar;

    2. Prompt during execution:ORA-00911: Invalid character..

      Make sure you areJDBC requestInsideQueryInput inSQLThe statement is correct.

JmeterIn the user manualJDBCThe following section tests the database performance:

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

In addition, I made two test plans, one for Oracle and the other for MySQL. You can click the following link to download the plan.

Jmeter test plan for oraclejmeter test plan for mysqlmysql JDBC Driver (after downloading, you need to change the extension to. jar and put it under the lib directory of jmeter)
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.