Hi Community, I am trying to connect to Sybase SQL Anywhere 17 using any jdbc driver like jconn4.jar or sajdbc4.jar but still unlucky to accomplish it. I am also using Dbeaver tool which eventually gets connected to any database. Can anyone help me here |
What exactly are you encountering? Do you have any messages/errors being reported?
While connecting using Dbeaver tool, I am using the jconn4.jar or sajdbc4.jar but getting connection refused message. Can you help me in connecting to the Sybase Anywhere db
You would not get the same error message from jConnect and from the SQL Anywhere driver. Please provide the specific error message for each.
The connection refused error, IIRC, is likely jConnect. jConnect requires that SQL Anywhere be using TCPIP and requires a correct port. Only the network server (dbsrv17) would start with TCPIP network enabled and a default port of 2638 (but that port can change if that port is already in use). The personal server will require the use of the -x tcpip option to enable TCPIP.
I have SQL anywhere personal server, upon creation of database, there is only 4 parameter 1. server same as database name 2. userid/pwd. Using Sybase jconnect driver on port 5000 or 2638 getting this error: JZ006:Connection error: Caught IO exception: java.net.connectexception: Connection refused:connect
I am not sure about port and hostname as the Sybase Anywhere server is present locally only. Please help. I am stuck here.
How Should I start the database and shoukd I do it from command line? what would be the options around it?
The way to resolve the jConnect connection refused is to start the server with TCPIP. For the personal server,
dbeng17 -n SrvName -x tpcip(port=12345) database.db -n DbName
The network server would be running TCPIP with the port 2638 by default (except if the port is already in use).
You would then provide the host and port to the jConnect connection.
I would certainly recommend using the SQL Anywhere JDBC driver where possible. Without knowing the error that you seeing with that driver, I cannot provide any suggestions on correcting the issues with its configuration. It will not be the same cause as that occurring with jConnect.