JDBC Connection Pool failed for SQLServer - sql-server

I was making a connection from JDBC Connection Pool to SQL Server but an error has occurred:
Ping Connection Pool failed for SQLServer. Class name is wrong or classpath is not set for : com.ddtek.jdbcx.sqlserver.SQLServerDataSource Please check the server.log for more details.

Download JDBC driver for SQL Server
Copy the JDBC driver for database connectivity (JAR) to as-install/domains/domain_name/lib/ext

Related

UWP cannot connect to local SQL Server

I'm creating a simple UWP application working together with my local DB server I set up with SQL Server Management Studio.
I can successfully set up a connection in the server explorer and run queries in the DB:
However when I run the application I get an error when the connection is being established:
System.Data.SqlClient.SqlException HResult=0x80131904 Message=A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid) Source=Core .Net SqlClient Data Provider
I'm not sure if it's a problem with the connection string or what else it could be. I checked the firewall settings and everything seems to be fine. The SQL server settings also allow for remote connection.
Which SQL Server version is running?
Have you tried with the following connection string format?
Data Source=.\\MSSQLServer;Initial Catalog=PapaDario;Trusted_Connection=yes;
Before you connect to your database, some aspect of the SQL Server configuration needs to be changed. First, ensure that you've enabled TCP/IP for SQL Server. You can do that in the Computer Management console. Then make sure that your SQL Server Browser service is running.

Unable to connect to sql server database from another network

I have an application server (Written in Python [Django]) running on one network and the sql server database on another network (due to security) and I am trying to get the values from that database to my application server. The error I am getting is:
OperationalError: ('08001', 'u'[08001] [Microsoft] [ODBC Driver 13 for SQL
Server] SQL Server Network Interfaces: Error Locating Server/ Instance
Specified [xFFFFFFFF]. (-1) (SQLDriverConnect); [08001] [Microsoft] [ODBC
Driver 13 for SQL Server] Login Timeout Expired (0); [08001] [Microsoft]
[ODBC Driver 13 for SQL Server] Invalid connection string attrbute (0);
[08001] [Microsoft] [ODBC Driver 13 for SQL Server] A network-related or
instance-specific error has occurred while establishing a connection to SQL
Server. Server is not found or not accessible. Check if instance name is
correct and if SQL Server is configured to allow remote connections. For more
information see SQL Server Books Online. (-1)')
Things I have already checked:
I am able to ping from the network where sql server database is to the application server network.
Remote connections is enabled on the sql server database.
Verified Windows firewall is not blocking the connection.
Verified there is a rule in firewall which allows all traffic from the sql server database to application server.
I have checked that the application works fine if I have the database server on the same network as the application server which means there is no error in the logic of the code.
Verified the connection string by logging into the database from the SSMS(On database network).
Verified that the IP allowall had tcp 1433.
After all this steps when I ran network monitor I saw the traffic going from my application server to the database server but there was no response from the database to my application server. Please let me know if I am missing something here. Thanks in Advance.
The link here helped me solve my problem.

How to connect JDBC to Microsoft SQL Server in JMeter?

How to connect JDBC to Microsoft SQL Server so that I can test my SQL Server database in JMeter.
I am using Apache Jmeter 2.13. I have put the sqljdbc4.jar file in JMeter/lib folder. I also created a very simple database in Microsoft SQL Server Management Studio where my server name is localhost and I have used windows authentication to connect to my server. Then in JMeter I have used the following properties in JDBC Connection Configuration :
Database URL:jdbc:sqlserver://localhost:1433;DatabaseName=JmeterTestDatabase.
JDBC Driver Class:com.microsoft.sqlserver.jdbc.SQLServerDriver.
Username:ABC-PC\ABC.
Password: Somepassword.
When I run the test I get the following error:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user
'ABC-PC\ABC'. ClientConnectionId:7c9e308b-1bdc-4513-8386-5bc51f249029
What is going wrong here?
Log in failed is a clear message we are seeing , please check it once again.
TRY this as well, I have given below by assuming username as "ABC-PC\ABC" and password as "Somepassword" change accordingly.
Database URL:jdbc:sqlserver://ABC-PC\ABC/Somepassword#localhost:1433;DatabaseName=JmeterTestDatabase.
JDBC Driver Class:com.microsoft.sqlserver.jdbc.SQLServerDriver.

provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

In my project I do have DB in sql server 2005 and its working in local. but when I try to connect remote sql server 2008 R2 by using the credentials I got the following error.
System.Data.SqlClient.SqlException was unhandled by user code
Message="A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=20
LineNumber=0
Number=53
Server=""
State=0
And I enabled the following in remote server
1) Started SQL server, sql browser service using sql server configuration manager.
2) added the sql server, browser exe in to firewall allowed program list.
3) restarted sql server and browser.
4) enabled TCP/IP, Shared memory, Named pipes in SQL server configuration manager
5) I enabled the remote connection for this DB in database property
6) and the connection string in following manner
SqlConn = new SqlConnection(#"Data Source=IP address;Initial Catalog=DbName;
User ID=ID;Password=pwd ");
also while taking the properties of Db using the view current connection property in remote it shows service is unavailable for entries like DBname, authentication mode, network protocol etc...
if any one have this issue before please help.
thanks & regards,
Tharadas.
along with the options enabled in the question I solved the issue by doing the following changes.
1) in Sql connection string added the sql port number(1533 or 1433).
2) add exception for port number in firewall.
Thanks & regards
Tharadas k.p

SQL Server: error when connecting

The application I'm using tries to connect SQL Server named instance running on a dedicated database server. Here's the error I'm getting:
The TCP/IP connection to the host <instance_name>, port 1433 has failed. Error: Connection refused: connect.
Is the firewall blocking my access or what? Should I dedicate a different port for this application?
The error refused connect implies that your connection does not have permissions to connect to this instance of SQL Server.
Are you using Windows Authentication or a SQL Server Login?
For troubleshooting guidelines see: Troubleshooting Server and Database Connection Problems

Resources