cancel
Showing results for 
Search instead for 
Did you mean: 

identify port

Former Member
0 Kudos
4,350

How do I find out what port I should connect with to a SQL Anywhere 17 database running on Linux 64 bit?

Assuming I have access to the database server and I can query any view?

Former Member
0 Kudos

Hi

thanks for your reply. I started using SQL Anywhere for the first time this week having used Oracle for over 5 years. Setting up the listener and the port are two separate tasks in Oracle.

I eventually figured out where to create a listener in SQL Central for an existing database.

View Entire Topic
VolkerBarth
Contributor

Hm, I do not understand your question - if you are already successfully connected to the database, why would you need to know the port to connect (except you are connected locally via Shared Memory and want to know how different machines can connect via TCP/IP)?

The following tells the server's used TCP/IP addresses and ports:

select property('TcpIpAddresses');

For current connections, you can use the builtin sa_conn_info() procedure to check the "ServerPort" column (by default 2638) for connections with ColmmLink = 'TCPIP':

call sa_conn_info();

The following might also help to get address and port for the current connection:

select PropName, PropDescription, Value
from sa_conn_properties(-1)
where PropName in ('ServerNodeAddress', 'ServerPort');