Cannot load drivers for SQL Server on WSO2 Data Services Server - sql-server

I am attempting to create a new Data Service in WSO2 Data Services Server to connect with SQL Server 2005. However, every time I test the connection I receive the error message "Driver class com.microsoft.jdbc.sqlserver.SQLServerDriver can not be loaded".
Data Source Type: RDBMS, Non-XA-DataSource
Database Engine: Microsoft SQL Server
Driver: com.microsoft.jdbc.sqlserver.SQLServerDriver
...
I don't believe my connection string or credentials are a problem as it fails on loading the driver.
What is the step that I'm missing in this process?

You have to put the Microsoft SQL driver jar inside repository/components/lib of DSS distribution in order to load the driver class.

The folder structure has changed for Enterprise Integrator v6 you will need to drop off the file into your [EI_HOME]/lib folder. Default folder is "C:\Program Files\WSO2\Enterprise Integrator\6.6.0\lib".
Depending on what version of Java you are using, you may download the corresponding version from here.
Extract the file and you drop the jar:
mssql-jdbc-7.2.2.jre8.jar - for java 1.8 class version 52
Check out this link for class versions.

Related

What Sql Drivers are in Azure Devops Build Agents?

I have a Node app that I need to run in Azure Devops Pipelines - it needs to connect to SQL Server (on a VM, also in Azure). It uses 'msnodesqlv8' to talk to SQL Server.
The connection string looks like:
Server=dns.name.here,1433;Database=mydb;Driver={SQL Server Native Client 11.0};Trusted_Connection=Yes;APP=Extraction in DevOps;
Everything runs fine locally (obviously!) but the app fails when built and run in Pipelines with the following error:
Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
The VM image is 'windows-latest' which I would have thought would include the necessary bits to talk to a SQL Server.
Would appreciate any pointers.
Thanks,
Jeff
You can check this with a simple powershell Get-OdbcDriver.
Just run this as a step in ADO pipeline or release.
ODBC Driver 17 for SQL Server (32-bit & 64-bit) is available on windows-latest agents (as of writing, windows-2019 is the latest)

ORA-28040: After Upgrade Database to 12c from 11g

Problem Statement:
We are doing a migration activity in which we have migrated DATABASE from ORACLE 11g to ORACLE 12c.
After upgrade one of our application which is using jdk 6 with ojdbc6.jar (JDBC Driver) is not able to connect the 12c database.
Below error we are getting :
java.sql.SQLException: ORA-28040:
No matching authentication protocol
after Upgrade Database to 12c
Configuration
JDK Version : 1.6
JDBC Driver : ojdbc6.jar
Database Version : Oracle 12c
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 11
SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 11
Workaround tried:
1) We tried to run a simple jdbc application with jdk1.6 and ojdbc6.jar it was successful. Also it is as per Oracle Compatibility matrix.
2) We asked to update the parameter SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8 but security team cannot do it as it does not comply on security standards.
Please suggest how we should proceed forward to fix this issue.
The problem was then weblogic.jar and from the classpath of weblogic.jar, ojdbc14.jar was being referred. We checked in WL_HOME\server\lib library and found that ojdbc14.jar was there. We just let keep it there but copied ojdbc6.jar in some external directory and loaded same in CLASSPATH before all jars. Below is from oracle docs-
This driver is installed in the WL_HOME\server\lib folder (where WL_HOME is the folder where WebLogic Server is installed) with weblogic.jar. The manifest in weblogic.jar lists this file so that it is loaded when weblogic.jar is loaded (when the server starts). Therefore, you do not need to add this JDBC driver to your CLASSPATH. If you plan to use a third-party JDBC driver that is not installed with WebLogic Server, you must install the drivers, which includes updating your CLASSPATH with the path to the driver files, and may include updating your PATH with the path to database client files. See "Supported Database Configurations" on the Oracle Fusion Middleware Supported System Configurations page at http://www.oracle.com/technology/software/products/ias/files/fusion_certification.htmlOpens a new window.
If you plan to use a different version of any of the drivers installed with WebLogic Server, you can replace the driver file in WL_HOME\server\lib with an updated version of the file or add the new file to the front of your CLASSPATH.
So if you are facing the same issue I would like to suggest-
1) Check for the Oracle driver (ojdbc) - as the most post on StackOverflow suggest same.
You can check ojdbc driver compatibity here
2) If you cannot change driver immediately the change below in sqlnet.ora
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8
(SQLNET.ALLOWED_LOGON_VERSION is depreciated in 12c. Also, please be noted that In 12c, the default value for the SQLNET.ALLOWED_LOGON_VERSION_SERVER parameter has been updated to “11”. This means that database clients using pre-11g JDBC thin drivers cannot authenticate to 12.1 database servers unless the parameter is set to the old default of “8”)
For your reference, please check-
https://docs.oracle.com/database/121/UPGRD/deprecated.htm#UPGRD60010
https://docs.oracle.com/database/121/UPGRD/afterup.htm#UPGRD60157
Thanks.

How to connect dataminder to other databases then provided by default sql connection?

How do you connect to other databases then the default provided by dataminder?
Do you need to implement your own connection plugin?
Since the default DataMinder connection uses standard JDBC url:s it can connect to any database that supports JDBC e.g. Oracle or IBM DB2.
But you need to install the correct JDBC driver as a JAVA JAR file in the plugin directory for "DM Data Plugins" located
in
DataMinder/Server/Internal/DMPlugins/DMPluginData/lib
You need to restart the application to reload the new JAR files.

Testing multiple connections to SQL Server

We're migrating SQL2005 Enterprise to SQL2012 Enterprise (on a new server too, from WIn2003 to Win2012).
Is there a way to test multiple connections to the database to prove it can take the same load as the previous server?
The application is a website, .Net3.5 with Min and Max pool size set in the connection string.
You can do it via Apache JMeter and next few steps:
Download jTDS JDBC Driver and drop it to /lib folder of your JMeter installation
Restart JMeter
Add Thread Group to Test Plan and configure virtual users and iterations count
Add JDBC Connection Configuration and provide JDBC url, driver class name and credentials
Database URL: jdbc:jtds:<server_type>://<server>[:<port>][/<database>][;<property>=<value>[;...]]
JDBC Driver class name: net.sourceforge.jtds.jdbc.Driver
Add JDBC Request sampler and put your query there
Repeat step 5 for all query types
Add a listener, i.e. Aggregare Report
See The Real Secret to Building a Database Test Plan With JMeter guide for more detailed explanation of database load testing domain.

Jmeter - No suitable driver found for jdbc:microsoft:sqlserver://x.x.x.x:1433

I'm using Jmeter 2.9 and trying to connect to SQL Server 2008.
Within JDBC Connection Configuration and have the following in my connection properties:
Database URL = jdbc:microsoft:sqlserver://x.x.x.x:1433
JDBC Driver Class = com.microsoft.sqlserver.jdbc.SQLServerDriver
I've downloaded the latest Microsoft SQL Server JDBC Drivers and placed the following jars under jmeter/lib directory: sqljdbc.jar, sqljdbc4.jar.
I'm getting the following error:
java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver://x.x.x.x:1433
Can you please suggest what I'm missing?
your solution does not work for me, here is my solution:
​Adding jdbc connection Library into Jmeter lib folder:
Download the lastest jdbc driver from Microsoft
http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx
Unzip the file and find which driver you need:
http://msdn.microsoft.com/en-us/library/ms378422.aspx
Copy the required JAR file into jmeter/lib folder. (you need to restart the jmeter if you are running it.)
in my JDBC Configuration:
DatabaseURL: jdbc:sqlserver://localhost:port;DatabaseName=mydb;
JDBC Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
User Name: (SQL server access user name)
Password: (user's password)
Give a Variable name for the config: e.g. JDBC_Connection
When you create a JDBC request, use this name in "Variable Name Bound to Pool" field.
The only thing I can add to Vin.X's answer is that you can specify the location of your sqljdbc4.jar as a property of your test plan, by browsing for it where it says Add directory or jar to classpath
This is useful if you want to keep libs like this separate from your jMeter distribution folder, to make it easier to update jMeter for example.
First download JDBC jar files from below link i have shared:
http://tinyurl.com/o5hgpmt
Extract all *.jar files to: C:\apache-jmeter-2.11\lib
then start JMeter
and in your JDBC Connection Configuration element write below connections as per your database:
Database URL: jdbc:jtds:sqlserver://x.x.x.x:1433;DatabaseName=yourdatabase;
JDBC Driver class: net.sourceforge.jtds.jdbc.Driver
Username: give username of the sql server database
Password: give password of the sql server database
My connection is successful..
Hope this helps every body..

Resources