Does Jetbrains 0xDBe support logging in to SQL Server with Windows Authentication?
I'm using a Mac running OS X Mavericks and attempting to connect to our corporate staging database over a VPN. Lots to go wrong there...
Right now my URL looks like this:
jdbc:sqlserver://10.11.222.333:12345
I've tried setting integratedSecurity to true, and also tried specifying a domain in the URL:
jdbc:sqlserver://10.11.222.333:12345;domain=MyDomain
No matter what, when I test the connection it just times out with this error:
Connection to Staging failed
java.sql.SQLException: The TCP/IP connection to the host 10.11.222.333, port 12345 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:241)
at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2243)
at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:491)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1309)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
in RemoteDriverImpl.connect(RemoteDriverImpl.java:27)
in RemoteUtil.access$100(RemoteUtil.java:36)
in RemoteUtil$RemoteInvocationHandler.invoke(RemoteUtil.java:227)
at com.sun.proxy.$Proxy84.connect(Unknown Source)
in LocalDataSource.getConnection(LocalDataSource.java:240)
Any suggestions?
I was experiencing the same issues but finally found the fix by adding the domain to the jTds driver advanced settings in the 'Manage Data Sources' window.
Then using the following connection string:
jdbc:jtds:sqlserver://<SERVER>:<PORT>;integratedSecurity=true;authenticationScheme=JavaKerberos
or for connecting to a named instance:
jdbc:jtds:sqlserver://<SERVER>;instance=<NAMED_INSTANCE>;integratedSecurity=true;authenticationScheme=JavaKerberos
Related
I am trying to connect to a remote Oracle db from my mac using DBeaver.
Dbeaver version I am using is: 5.1.3
I installed the ojdbc6.jar file from the below link:
http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html
as instructed by the DBeaver tool. I added the above file in the driver manager window.
When I try to connect to the database I get the following error(dbeaver-debug.log):
Connection failed (oracle_thin-16161616-16161616)
2018-07-21 13:16:06.749 - org.jkiss.dbeaver.model.exec.DBCException: Connection has timed out
org.jkiss.dbeaver.model.exec.DBCException: Connection has timed out
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:157)
at org.jkiss.dbeaver.ext.oracle.model.OracleDataSource.openConnection(OracleDataSource.java:133)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:86)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance
If anyone has suggestions as to how I can debug this issue, would be highly appreciated.
Thank you.
Are you able to connect via other tools (like SQL Developer)? if no then please try that as well. There can be multiple reasons for connection timeout. It is also possible that port in remote system is not accessible.
Im trying to make a JDBC connection to my Oracle DB.
It works fine through TOAD but when im trying to establish the connection through JDBC it gives me the below error
"IO Error: The Network Adapter could not establish the connection"
The syntax of the url and details provided in the url is correctly picked up from TNS file.
when I ping the hostname it connects but with telnet it gives me error
"Could not open connection to the host,on port 1521:Connect failed"
Possible issues will be.
(a) Check if the database is up. Most of the times, database will not be up causing this issue.
(b) Check if you are able to connect using sqlplus
I am working with Microsoft Visual studio Test, I do not know how to deal with the following error
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: 26 – Error Locating Server/Instance Specified)
Make sure your database engine is configured to accept remote connections
Start > All Programs > SQL Server 2005 > Configuration Tools > SQL Server Surface Area Configuration
Click on Surface Area Configuration for Services and Connections
Select the instance that is having a problem > Database Engine > Remote Connections
Enable local and remote connections
Restart instance
Check the SQL Server service account
If you are not using a domain account as a service account (for example if you are using NETWORK SERVICE), you may want to switch this first before proceeding
If you are using a named SQL Server instance, make sure you are using that instance name in your connection strings in your ASweb P.NET application
Usually the format needed to specify the database server is machinename\instancename
Check your connection string as well
4.You may need to create an exception on the firewall for the SQL Server instance and port you are using
- Start > Run > Firewall.cpl
- Click on exceptions tab
- Add the sqlservr.exe (typically located in C:\Program Files (x86)\Microsoft SQL Server\MSSQL.x\MSSQL\Binn), and port (default is 1433)
- Check your connection string as well
If you are using a named SQL Server instance, make sure you are using that instance name in your connection strings
Check SQLBrowser; check that it is running. You may also need to create an exception in your firewall for SQLBrowser.
Check that you have connectivity to the SQL Server. Note what you are using to connect: machine name, domain name or IP address? Use this when checking connectivity. For example if you are using myserver
Start > Run > cmd
netstat -ano| findstr 1433
telnet myserver 1433
ping -a myserver
Check what ports are IP addresses are being returned.
Alternative:
If you still can’t get any connection, you may want to create a SQL account on the server, a corresponding SQL user on the database in question, and just use this username/password combo in your web application.
Credits for this answer goes to belle of sqlmusings.com
I have a Oracle server which can be accessed locally (i.e. from the computer where Oracle installed) using SQLPlus and default port 1521.
From a client computer, I can access shared folders on that server, but I cannot access the oracle database using SQLPlus or SQL Developer. "IO Error: The network Adapter could not establish the connection."
I am sure that there are problems on the Oracle server, because I can access other similar Oracle servers from the same client.
There is no problem with network connection as well.
Tnsnames.ora files are also OK. Three oracle services are started (same as other similar Oracle servers): listener, DBConsole and Service.
All are Windows systems.
How can I figure it out?
P.S.:
No firewall on server;
tnsping is OK.
I think the listener on the server or tnsnames.ora on client is the problem. When connecting from the server the sql*net protocol is bypassed.
On server run :
c:\lsnrctl status
and check if database is serviced by the listener and check if parameters are the same as in tnsnames.ora, use fully qualified host names.
EDIT
Check
c:\lsnrctl services
May be your firewall block your port. you can enable this by changing firewall setting.
This is windows 7 configuration to access port
Control panel->system and security->windows firewall->advanced setting->In bound rules-> new Rule(On right hand side)-> select port option with value as "1521" -> next next....
I have a web-application which is reciving the following while trying to connect to a database hosted on another server.
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)
Now, there problem here is that the connection strings, and the server paths area all perfect.
The site run correctly when run via cassini, on my local machine. (Connections strings are correct.)
Other sites hosted on the same server are able to access the databse. (Server paths ara all active.)
While the error says it's been unable to connect, Activity Monitor is aware of the query, and the Server Logs show no error. (Just odd.)
Google & Bing have massively failed with this, so I guess it's time to hit the Stack!
Open the Sql Server Conifguration Manager, expand Sql Server 2005 Network Configuration, click Protocols for <Yourserverinstance>, then check TCP/IP is enabled.