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