Response message: java.sql.SQLException: No pool found named: in jMeter - database

I am trying to do the Load testing on a new Database XpressMP. So I started using jMeter for that. I configured jMeter to make a Select call to our database. Below is configuration-
And below is the Snapshot for XMP Select DB
And if I start my test in the jMeter, I always get this exception-
Response message: java.sql.SQLException: No pool found named: 'ucirrus', ensure Variable Name matches Variable Name of JDBC Connection Configuration
What does this exception mean?
I am pretty much sure, this is the problem with my JDBC Request configuration in my previous image. As I am doing this for the first time.
Can anyone tell me how to fix this problem?

You problem is that you don't use the right variable name.
In JDBC Connection Configuration (within Variable Name bound to pool) set:
Variable Name : ucirrus

Related

Problem in JDBC Connection Configuration/JDBC Request - JMETER

I'm a problem in JDBC Connection Configuration.
When i execute my test (only JDBC Request - insert), doesn't appear any results in report (View Results Tree).
The connection is SQL Server.
See below the configuration:
database URL: jdbc:sqlserver://${myURL}
JDBC driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
Username: ${user}
Password: ${password}
Could someone help me?
Thanks!!!
Make sure to add Microsoft JDBC Driver for SQL Server to JMeter Classpath and restart JMeter to pick up the .jar
Check jmeter.log file for any suspicious entries
Be informed that JDBC Connection Configuration is a Configuration Element hence it's being executed before anything else so your variables like ${myURL}, ${user} and ${password} might not have their respective values yet
Check that your query returns results in mssql-cli
Set the validation query to select 1 if it's different:
You can check out The Real Secret to Building a Database Test Plan With JMeter article for more comprehensive steps if needed.

MSSQL connection String:

I'm trying to create scaledobject in keda and I'm referring the official keda documentation for this with MSSQL scaler.
While configuring connectionstring in this format "Server=example.database.windows.net;Port=1433;Database=AdventureWorks;Persist Security Info=False;User ID=user1;Password=Password#1;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" , Is the server to be configured is same as hostname?
Basically, whether the host parameter that we specify in connection parameters explicitly is the same as the Server parameter in ADO format: ?
Can someone please help me here? After deploying my scaled object in keda with MSSQL trigger(I'm considering server name is same as host instance and configured like that) , I'm getting ready and active status as unknown.. In logs I'm only seeing that it's trying to create a HPA and then nothing happens. I guess the operator is getting stuck here. Please guide me on how to proceed to establish connection with MSSQL
As per the docs you either have to specify the connection string OR host: keda.sh/docs/latest/scalers/mssql

Connecting Jmeter to an Oracle database with two hosts and service name

I am trying to connect Jmeter to a geo redundant database with two hosts and I am struggling with finding the right Database Url format.
This is how my connection string looks like:
jdbc:oracle:thin:#(DESCRIPTION=(ENABLE=BROKEN)(FAILOVER=on)(CONNECT_TIMEOUT=5sec)(TRANSPORT_CONNECT_TIMEOUT=3sec)(RETRY_COUNT=3)(LOAD_BALANCE=on)(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=HostName)(PORT=port)))(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=HostName2)(PORT=port)))(CONNECT_DATA=(SERVICE_NAME=ServiceName)))
Database Connection Configuration is as following:
JDBC Driver Class: oracle.jdbc.OracleDriver Username: username
Password: password
For the Database URL I tried different formats and I keep getting the error:
Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
Note that the ojdbc.jar file is in the /lib folder as per the Jmeter documentation. Also, the ports are the same for both hosts.
Any suggestion is welcome. :)
I don't think you will be able to establish the connection to Oracle RAC using JMeter's JDBC Connection Configuration as it doesn't allow full flexibility therefore you will not be able to properly instantiate the PoolDataSourceFactory
So I would recommend switching to JSR223 Test Elements and Groovy language where you will have the full freedom when it comes to setting up the connection, executing queries, accessing results, etc. The relevant code would be something like:
def prop = new Properties()
prop.put('oracle.jdbc.thinForceDNSLoadBalancing','true')
PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource()
pds.setConnectionProperties(prop)
pds.setConnectionFactoryClassName('oracle.jdbc.pool.OracleDataSource'); pds.setUser('johndoe')
pds.setPassword('secret')
String dbURL =
'jdbc:oracle:thin:#(DESCRIPTION=(ENABLE=BROKEN)(FAILOVER=on)(CONNECT_TIMEOUT=5sec)' +
'(TRANSPORT_CONNECT_TIMEOUT=3sec)(RETRY_COUNT=3)(LOAD_BALANCE=on)(ADDRESS_LIST=(LOAD_BALANCE=on)' +
'(ADDRESS=(PROTOCOL=TCP)(HOST=HostName)(PORT=port)))(ADDRESS_LIST=(LOAD_BALANCE=on)' +
'(ADDRESS=(PROTOCOL=TCP)(HOST=HostName2)(PORT=port)))(CONNECT_DATA=(SERVICE_NAME=ServiceName)))'
pds.setURL(dbURL)
More information: Configuring Fast Connection Failover for JDBC Clients
It appears to be working with a connection string containing only host 1.
The Database URL is in the form:
jdbc:oracle:thin:#<hostname>:<port>/<serviceName>
Additionally, I got the error because the .jar file's path was not added to the classpath (click on Test Plan, in the bottom select browse next to Add directory or jar to classpath and select your odbc jar).
Another thing that was wrong was the Validation query, it should be "select 1 from dual" and also the query should not contain any semicolon at the end.
I hope this help people with the same issue.

soapui- access tandem DB

I want to access tandem database, and for that i set
Driver : com.tandem.t4jdbc.SQLMXDriver
and test connection gives following error
com.eviware.soapui.support.SoapUIException: Failed to init connection for drvr [com.tandem.t4jdbc.SQLMXDriver], connectionString [jdbc:t4sqlmx://10.100.200.153:18650/catalog=QA_APPL;schema=APPLICATION;user=easyqa.appl;password=#QaAppl!]
IS Soupui supports this drives?
Thank you
Did you put the SQLMXDriver JDBC driver in the {your SoapUI installation}\bin\ext directory?
You should see it being loaded when SoapUI starts up.
You may also need to register it with a Groovy script:
com.eviware.soapui.support.GroovyUtils.registerJdbcDriver( "com.???.jdbc.Driver" )

How to solve "An attempt to attach an auto-named database for file..." SQL error?

I've got a local .mdf SQL database file that I am using for an integration testing project. Everything works fine on the initial machine I created the project, database, etc. on, but when I try to run the project on another machine I get the following:
System.Data.SqlClient.SqlException : A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
I figure while I am investigating this problem I would also ask the community here to see if someone has already overcome this.
The exception occurs when I instantiate the new data context. I am using LINQ-to-SQL.
m_TransLogDataContext = new TransLogDataContext ();
Let me know if any additional info is needed. Thanks.
I'm going to answer my own question as I have the solution.
I was relying on the automatic connection string which had an incorrect "AttachDbFilename" property set to a location that was fine on the original machine but which did not exist on the new machine.
I'm going to have to dynamically build the connection string since I want this to run straight out of source control with no manual tweaking necessary.
Easy enough.
That because your application have more than one setting to database, try to "Find All" on your solution by search your connection name
likes
I'm using "EnergyRetailSystemConnectionString" or you can search by your database name

Resources