In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "Jmeter how to connect Mysql and Oracle database", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "Jmeter how to connect Mysql and Oracle database"!
1. Connect to Mysql database
All the basic jmeter component functions are not covered in this article. To connect to the mysql database for jmeter, you must first download the mysql jdbc driver package (Note: the version of the driver package must match the version of your database. If the driver version is lower than the mysql version, it may cause connection failure to report an error. I downloaded mysql-connector-java-5.1.28.jar here. See the introduction at the end of the article for the driver download method.
Put the downloaded jar package in the lib\ ext directory of the jmeter home directory, and then restart jmeter
Add a thread group
Create a new JDBC Connection Configuration configuration component under the thread group, as shown in the following figure
After the configuration is completed, you can add a jdbc request and create a new jdbc request as follows:
At this point, you can add a view result tree, run it, and the results are as follows
Like other requests, jdbc requests support parameterization and assertions, and can be added as needed.
Second, connect to Oracle database
The above error report is caused by the failure of sid connection. You need to check the tnsnames.ora file under the oracle installation directory, oracle\ product\ 10.2.0\ db_1\ network\ ADMIN. The configuration is as follows. In this case, SID=emsuat is the jdbc:oracle:thin:@10.16.33.192:1608:emsuat that we need to configure in database URL.
Ems_uat = (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.16.33.192) (PORT = 1608))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = emsuat)
))
It is suggested that the error is due to the failure to put the jdbc driver package in the corresponding directory, put ojdbc14.jar under the jmeter home directory lib/ext, restart jmeter, and solve the problem.
Like Mysql, you first need to download the oracle driver package ojdbc14.jar, which can be found in the oracle installation directory, copy the files in the oracle installation directory (oracle\ product\ 10.2.0\ db_1\ jdbc\ lib\ ojdbc14.jar) to the JMeter/lib/ext directory, and then start jmeter
Add a thread group
Create a new JDBC Connection Configuration configuration component under the thread group, as shown in the following figure
After the configuration is completed, you can add a jdbc request and create a new jdbc request as follows:
At this point, you can add a view result tree, run it, and the results are as follows
If an error is reported during the connection, check whether the database URL in the configuration is correct
Common error explanations:
Thank you for your reading, the above is the content of "how Jmeter connects Mysql and Oracle databases". After the study of this article, I believe you have a deeper understanding of how Jmeter connects Mysql and Oracle databases, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.