Jmeter and database - jmeter

I'd like to know the mechanism of performance testing Database by Jmeter, so need your help on my concern as below:
Q1. Does Jmeter will access directly to Database for testing ? Or,
it will access to database via a website having database URL (as the Database URL on JDBC request config) ?
Q2. which fields will be tested in Database : capacity or Database structure or others ? - please explain in advantage.
Besides, Jmeter is a good tool for testing database ? - which cases / why should we use ?
Thanks,

Q1: JMeter has JDBC Request sampler which can connect to database directly assuming appropriate JDBC driver in JMeter classpath and proper JDBC Connection Configuration
Q2: It's totally up to you as JMeter doesn't test anything. If you specify a query or a set of queries under Transaction Controller JMeter will report the time which queries took under the load and errors if any.

Related

How do I perform Star Schema Benchmark query concurrency test in jmeter

I perform Star Schema Benchmark to test ours DB product. I perform Star Schema Benchmark query concurrency test in jmeter.How do I set up SSB SQL to be executed concurrently in JMeter?
If you want to execute Star Schema Benchmark sample queries from JMeter you will need to:
Copy the JDBC driver for your "DB product" to "lib" folder of your JMeter installation (or any other folder in JMeter Classpath)
Add JDBC Connection Configuration and specify:
your "DB product" instance JDBC URL
fully qualified class name of the JDBC Driver
credentials
other options like pool size, timeouts, etc.
Add JDBC Request sampler and put your query there (one query per Sampler)
Now increase the number of users/loops in the Thread Group according to your workload model and run your test
More information:
Building a Database Test Plan
How to use Different JDBC Drivers

JMeter - Performance Testing - Third Party Backend GET Response

I am currently working on load testing an application, where the users can create orders. Once the order is created, the request reaches the Middleware which triggers a scheduler. From the scheduler, the GET Status reaches a 3rd Party API and the Response is stored at the Backend (DB). The GET Status response can only be seen on the Backend and it will not be visible to the User Interface. Please help on How to record this GET Status Response at the Backend using latest version of Jmeter.
You can use JDBC Request sampler for reading information from the database
Download JDBC Driver for the database you're using and drop it to JMeter Classpath
Restart JMeter to pick up the driver
Add JDBC Connection Configuration element and specify database URL, credentials and thread pool name
In the JDBC Request sampler set the same thread pool name as in the point 3 and create an SQL Select query to fetch the response from the database. If you will need the response later on it can be stored into a JMeter Variable

Neo4j to Oracle real time data sync

In one of the use cases in my application there is a requirement to publish neo4j transaction data to oracle database in real time. I did google on it, but couldn't find a tool or plug-in which can help. Everywhere on internet talks about rdbms to neo4j sync. So I am planning to do this by manually invoking jdbc commands.
Can you please suggest something?
Had to write my own jdbc code.

Can not load JDBC driver. in

Test Plan.
Add one Thread Group with default settings.
Add JDBC Connection Configuration with below setting.
Add JDBC Requset for Simple select stement.
Add Constant Timer with 5000 miliseconds Thread Delay.
Add View Results Tree.
My DBServer Name : proddbtest1.xyz.com
SQL Instance Name: Prodbtest1\LIVE
I fill up this parameter value in DB URL and Driver class. In fact I download latest JDBC sqljdbc42.jar from Net and past at Lib folder.
After running my test plan still I get an error message
"java.sql.SQLException: Cannot load JDBC driver class
com.microsoft.jdbc.sqlserver.SQLServerDriver"
Can any one help me where I am passing wrong configuration settings.
As per Using the JDBC Driver article the correct Microsoft JDBC Driver class name is:
com.microsoft.sqlserver.jdbc.SQLServerDriver
you are trying to use the following one:
com.microsoft.jdbc.sqlserver.SQLServerDriver
^^^^^^^^^^^^^^
So replace jdbc and sqlserver and your setup will work.
Also don't forget to restart JMeter to pick the sqljdbc42.jar up.
Just in case see The Real Secret to Building a Database Test Plan With JMeter article to learn more about database load testing using JMeter

Weblogic server: Profiling JDBC calls on a DataSource from an weblogic application

We are running applications on weblogic server. We have a requirement in which we want to monitor jdbc calls made on a data source. We only want to collect time taken for each sql to execute and number of times a sql is fired. I also want to collect this information per user session.
There are a few utilties on the web like weblogic jdbc spy, log4jdbc, etc. But they all required additional setup on the data source and provide output on a separate logging file which does not contain per session output as such. Is it possible to create another weblogic application that listens on a given data source and record all the sql and the timings per session? Please provide any pointers that you have.
TIA,
Siva Rajesh
Oracle JRockit Flight Recorder can be answer for you. I'm using him. Just make a record in defined time and then analyze gathered jfr file with Oracle JRockit Mission Control.
Links:
Oracle JRockit Flight Recorder manual
Oracle JRockit Mission Control
Or you can find your answer with parameter -Doracle.jdbc.Trace=true -Djava.util.logging.config.file=/jdbc/demo/OracleLog.properties

Resources