My requirement is simple: I have an appserver - WAS 6.1 connecting to Microsoft SQL Server 2008 R2.
I have configured data source for the SQL server using the installation scripts in linux.
When I deployed EAR and try to hit application url, I get the below error while connecting to SQL Server.
com.ibm.websphere.ce.cm.StaleConnectionException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: SQL Server did not return a response. The connection has been closed..CWWRA0010E: SQL State = 08S01, Error Code = 0
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
The setup is working for another server configuration.
After a long wait, the issue got resolved. There is nothing to do with the EAR. The SSL encryption was enabled in SQL server settings. Just disable the settings did let me establish connection from application to the SQL server.
Related
I have a Windows 10 VM with SQL Server installed on it. I made sure, that in the Sql Server Configuration Manager the SQL Server Browser is running and the TCP/IP protocol is enabled.
I'm trying to connect to the server with Entity Framework (although I'm not sure if it's relevant) and I'm getting this error:
Cannot connect to SQL Server Browser. Ensure SQL Server Browser has been started.
That's the connection string that I'm using:
Integrated Security=SSPI; Persist Security Info=False; Initial Catalog=<database name>; Data Source=<server name>
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.
While connecting to SQL Server 2012, I am getting the following error.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2012, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (Provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
Here is what I did:
I installed SQL Server Management Studio normally but I can't get the server running. How do I set SQL Server correctly the first time?
I want to be able to install this server in my desktop locally and connect to it using Microsoft SQL Server. Any help would be appreciated. Thank you.
Screenshot of my server status as of now
SQLServer start - Log on as LocalSystem
You can try to replace the system databases with you system databases from somewhere else. If not, you can control the firewall.
If you are connecting from the remote server, you check this are.
From the section SQL Server Network Configuration;
TCP/IP Port : 1433 , Named Pipes : Enabled and restart SQLServer
I'm trying to connect from a local SQL Server Management Studio to a SQL Server hosted in a VM on Azure.
I followed all the instructions from
http://www.windowsazure.com/en-us/manage/windows/common-tasks/install-sql-server/ and created the necessary endpoints:
Somehow, I can't connect to the SQL Server, getting this error
Cannot connect to xxx.cloudapp.net.
ADDITIONAL INFORMATION:
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)
(Microsoft SQL Server, Error: 53)
The network path was not found
I already tried to temporary disable the windows firewall on the vm - without success. Any suggestions?
I had the same problem, this troubleshot helped me getting close to the solution:
Use SQL Server Management Studio to connect remotely to an SQL Server Express instance hosted on an Azure Virtual Machine
Summing up, what i did, i don't know if all these steps are necessary, so you should test after each one:
1) In SQL Server configuration manager enable Named Pipes in protocols
2) In the VM add a windows firewall inbound rule for sql server port (in my case the default 1433, in yours it seems to be 1435, make sure it's 1435 in sql server configuration)
3) Make Sure you are using a sql server authentication login (not a windows authentication) if you don't have one create it locally in the VM>MSSMS
4) Make Sure the SQL server is configured for mixed authentication (http://www.katieandemil.com/microsoft-sql-server-error-18456-login-failed-for-user)
5) Make sure sql server browser is running
Hope this helps :)
I am trying to set up a development testing server, Windows 2008 Server with IIS and SQL Server 2008 Express. The IIS and classic ASP (yeah, supporting antique projects) works fine, including connecting to remote SQL Server 2008 servers, via SQLOLEDB.
However, I fail to connect to the local SQL Server 2008 Express instance. It is installed as an instance (ie, PC-NAME\SQLEXPRESS), and user/pwd authorisation is enabled. I can successfully set up an ODBC entry, so the server works fine. The problem lies in getting the IIS-ASP-SQLOLEDB see the server and connect to it.
Simple connection string, which works on any remote SQL Server 2008 servers, fails at my local express server:
Provider=SQLOLEDB;Data Source=.\SQLEXPRESS;User ID=userName;Password=_pwd_;Database=DbName
The error I get is
SQL Server does not exist or access denied.
The server error log does not contain any trace of unsuccessful login attempt, so I assume there is some problem resolving the data source (because of the instance name?), or the server is somehow inaccessible (protocol, security settings?) from the IIS process.
In SQL Server 2008 express edition it runs on dynamic ports. The solution is just go to properties of the TCP/IP and in the TCP Port just give whatever port you want your SQL Server to listen on.
strConn = "Provider=SQLOLEDB; Network Library=DBMSSOCN; Data Source=.\SQLEXPRESS; Connection Timeout=15;Packet Size=4096; Initial Catalog=DbName; User ID=userName; Password=_pwd_;"
Can you post how you access the connection object via ASP?