I am attempting to run an SQL script using the following command:

C:\Payroll Upload>dbisql -c "ServerName=sqlSCST629;DBN=micros;UID=DBA;PWD=***;LINKS=TCPIP(IP=10.1.29.50)" read "Payroll_Export" [Payroll_Export_629.csv]

The following error information is displayed a few seconds after I press ENTER:

Could not connect to the database. Database server not found SQLCODE=-100, ODBC 3 State="08001"

You are not connected to a database.

C:\Payroll Upload>

However, I can run dbping using the same connection string, and the ping is successful (returned message is "Ping server successful."). The version of SQL Anywhere that is running on the server is 11.0.1.2596.

UPDATE: I added the LogFile parameter to my connection string, following is the result. I can't seem to see anything useful in this file, but, perhaps someone better versed in connectivity issues will see something.

+++++++++++++++++++++++++++++Start of Log File++++++++++++++++++++++++++++++++++++++++++++++
Wed Nov 12 2014 15:07:46
15:07:46 Attempting to connect using:
UID=DBA;PWD=********;DBN=micros;ENG=sqlSCST629;CON=SQL_DBC_18f10ad0;LOG=c:\MyLog.txt;LINKS='TCPIP(IP=10.1.29.50)'

15:07:46 Attempting to connect to a running server...

15:07:46 Trying to start TCPIP link ...

15:07:46 TCP using Winsock version 2.2

15:07:46 My IP address is 192.168.85.126

15:07:46 My IP address is ::1

15:07:46 My IP address is 127.0.0.1

15:07:46     TCPIP link started successfully

15:07:46 Attempting TCPIP connection (no sasrv.ini cached address)

15:07:46 Looking for server with name sqlscst629

15:07:46 Trying to find server at address 10.1.29.50

15:07:51 TCP/IP link, function connect(), error code 0

15:07:51 Sending broadcast to find server

15:07:51 Using broadcast address of: 192.168.85.255:2638

15:07:51 Sending broadcast to find server

15:07:51 Using broadcast address of: 127.255.255.255:2638

15:07:51 Sending broadcast to find server

15:07:51 Using broadcast address of: (ff02::1):2638

15:07:52 Resending

15:07:53 Resending

15:07:54 Resending

15:07:55 Resending

15:07:56 Resending

15:07:57     Server not found (no reply received)

15:07:57 Failed to connect over TCPIP

15:07:57 Not attempting to autostart server

15:07:57 Cannot connect to server


Wed Nov 12 2014 15:08:01
15:08:01 Attempting to connect using:
UID=DBA;PWD=********;DBN=micros;ENG=sqlSCST629;CON=SQL_DBC_19540ad0;LOG=c:\MyLog.txt;LINKS='TCPIP(IP=10.1.29.50)'
15:08:01 Attempting to connect to a running server...
15:08:01 Trying to start TCPIP link ...
15:08:01 TCP using Winsock version 2.2
15:08:01 My IP address is 192.168.85.126
15:08:01 My IP address is ::1
15:08:01 My IP address is 127.0.0.1
15:08:01     TCPIP link started successfully
15:08:01 Attempting TCPIP connection (no sasrv.ini cached address)
15:08:01 Looking for server with name sqlscst629
15:08:01 Trying to find server at address 10.1.29.50
15:08:06 TCP/IP link, function connect(), error code 0
15:08:06 Sending broadcast to find server
15:08:06 Using broadcast address of: 192.168.85.255:2638
15:08:06 Sending broadcast to find server
15:08:06 Using broadcast address of: 127.255.255.255:2638
15:08:06 Sending broadcast to find server
15:08:06 Using broadcast address of: (ff02::1):2638
15:08:07 Resending
15:08:08 Resending
15:08:09 Resending
15:08:10 Resending
15:08:11 Resending
15:08:12     Server not found (no reply received)
15:08:12 Failed to connect over TCPIP
15:08:12 Not attempting to autostart server
15:08:12 Cannot connect to server

Wed Nov 12 2014 15:08:34
15:08:34 Attempting to connect using:
UID=DBA;PWD=********;DBN=micros;ENG=sqlSCST629;CON=SQL_DBC_16fc0ad0;LOG=c:\MyLog.txt;LINKS='TCPIP(IP=10.1.29.50)'
15:08:34 Attempting to connect to a running server...
15:08:34 Trying to start TCPIP link ...
15:08:34 TCP using Winsock version 2.2
15:08:34 My IP address is 192.168.85.126
15:08:34 My IP address is ::1
15:08:34 My IP address is 127.0.0.1
15:08:34     TCPIP link started successfully
15:08:34 Attempting TCPIP connection (no sasrv.ini cached address)
15:08:34 Looking for server with name sqlscst629
15:08:34 Trying to find server at address 10.1.29.50
15:08:40 TCP/IP link, function connect(), error code 0
15:08:40 Sending broadcast to find server
15:08:40 Using broadcast address of: 192.168.85.255:2638
15:08:40 Sending broadcast to find server
15:08:40 Using broadcast address of: 127.255.255.255:2638
15:08:40 Sending broadcast to find server
15:08:40 Using broadcast address of: (ff02::1):2638
15:08:41 Resending
15:08:42 Resending
15:08:43 Resending
15:08:44 Resending
15:08:45 Resending
15:08:46     Server not found (no reply received)
15:08:46 Failed to connect over TCPIP
15:08:46 Not attempting to autostart server
15:08:46 Cannot connect to server

Wed Nov 12 2014 15:09:04
15:09:04 Attempting to connect using:
UID=DBA;PWD=********;DBN=micros;ENG=sqlSCST629;CON=SQL_DBC_16f70ad0;LOG=c:\MyLog.txt;LINKS='TCPIP(IP=10.1.29.50)'
15:09:04 Attempting to connect to a running server...
15:09:04 Trying to start TCPIP link ...
15:09:04 TCP using Winsock version 2.2
15:09:04 My IP address is 192.168.85.126
15:09:04 My IP address is ::1
15:09:04 My IP address is 127.0.0.1
15:09:04     TCPIP link started successfully
15:09:04 Attempting TCPIP connection (no sasrv.ini cached address)
15:09:04 Looking for server with name sqlscst629
15:09:04 Trying to find server at address 10.1.29.50
15:09:09 TCP/IP link, function connect(), error code 0
15:09:09 Sending broadcast to find server
15:09:09 Using broadcast address of: 192.168.85.255:2638
15:09:09 Sending broadcast to find server
15:09:09 Using broadcast address of: 127.255.255.255:2638
15:09:09 Sending broadcast to find server
15:09:09 Using broadcast address of: (ff02::1):2638
15:09:10 Resending
15:09:11 Resending
15:09:12 Resending
15:09:13 Resending
15:09:14 Resending
15:09:15     Server not found (no reply received)
15:09:15 Failed to connect over TCPIP
15:09:15 Not attempting to autostart server
15:09:15 Cannot connect to server

Wed Nov 12 2014 15:09:15
15:09:15 Attempting to connect using:
UID=DBA;PWD=********;DBN=micros;ENG=sqlSCST629;CON=SQL_DBC_16f70ad0;LOG=c:\MyLog.txt;LINKS='TCPIP(IP=10.1.29.50)'
15:09:15 Attempting to connect to a running server...
15:09:15 Trying to start TCPIP link ...
15:09:15 TCP using Winsock version 2.2
15:09:15 My IP address is 192.168.85.126
15:09:15 My IP address is ::1
15:09:15 My IP address is 127.0.0.1
15:09:15     TCPIP link started successfully
15:09:15 Attempting TCPIP connection (no sasrv.ini cached address)
15:09:15 Looking for server with name sqlscst629
15:09:15 Trying to find server at address 10.1.29.50
15:09:20 TCP/IP link, function connect(), error code 0
15:09:20 Sending broadcast to find server
15:09:20 Using broadcast address of: 192.168.85.255:2638
15:09:20 Sending broadcast to find server
15:09:20 Using broadcast address of: 127.255.255.255:2638
15:09:20 Sending broadcast to find server
15:09:20 Using broadcast address of: (ff02::1):2638
15:09:21 Resending
15:09:22 Resending
15:09:23 Resending
15:09:24 Resending
15:09:25 Resending
15:09:26     Server not found (no reply received)
15:09:26 Failed to connect over TCPIP
15:09:26 Not attempting to autostart server
15:09:26 Cannot connect to server

Wed Nov 12 2014 15:09:26
15:09:26 Attempting to connect using:
UID=DBA;PWD=********;DBN=micros;ENG=sqlSCST629;CON=SQL_DBC_17520ad0;LOG=c:\MyLog.txt;LINKS='TCPIP(IP=10.1.29.50)'
15:09:26 Attempting to connect to a running server...
15:09:26 Trying to start TCPIP link ...
15:09:26 TCP using Winsock version 2.2
15:09:26 My IP address is 192.168.85.126
15:09:26 My IP address is ::1
15:09:26 My IP address is 127.0.0.1
15:09:26     TCPIP link started successfully
15:09:26 Attempting TCPIP connection (no sasrv.ini cached address)
15:09:26 Looking for server with name sqlscst629
15:09:26 Trying to find server at address 10.1.29.50
15:09:31 TCP/IP link, function connect(), error code 0
15:09:31 Sending broadcast to find server
15:09:31 Using broadcast address of: 192.168.85.255:2638
15:09:31 Sending broadcast to find server
15:09:31 Using broadcast address of: 127.255.255.255:2638
15:09:31 Sending broadcast to find server
15:09:31 Using broadcast address of: (ff02::1):2638
15:09:32 Resending
15:09:33 Resending
15:09:34 Resending
15:09:35 Resending
15:09:36 Resending
15:09:37     Server not found (no reply received)
15:09:37 Failed to connect over TCPIP
15:09:37 Not attempting to autostart server
15:09:37 Cannot connect to server
+++++++++++++++++++++++++++++++End of Log File++++++++++++++++++++++++++++++++++++++++++++++

asked 12 Nov '14, 14:50

topeters's gravatar image

topeters
16113
accept rate: 0%

edited 13 Nov '14, 07:45

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050

I see that every time I do regression testing with earlier builds of 11.0.1. Try applying a recent EBF, or just use a copy of dbisql from SQL Anywhere 12 or 16.

(12 Nov '14, 16:40) Breck Carter

Do you have the port number available for this server as well? Do you see a different result if you use LINKS=(IP=...;PORT=...;DOBROADCAST=NONE) ?

(12 Nov '14, 20:44) Tyson Lewis

Breck,

Per your suggestion, I tried using dbisql from SQL Anywhere 12, but the result was the same as with 11. Thanks all the same.

Tyson,

Per your suggestion, I added the PORT=2638 and DOBROADCAST=NONE parameters to the LINKS= parameter, but the result was the same. Thanks all the same.

(13 Nov '14, 07:28) topeters
2

Do you have a firewall that might be silently blocking port 2638?

Please show us the output from dbping with -d...

dbping -c "ServerName=sqlSCST629;DBN=micros;UID=DBA;PWD=***;LINKS=TCPIP(IP=10.1.29.50)" -d -o dbping_output.txt

If that works (connects to the server AND the database) then try dbisql without the READ...

dbisql -c "ServerName=sqlSCST629;DBN=micros;UID=DBA;PWD=***;LINKS=TCPIP(IP=10.1.29.50)"  
(13 Nov '14, 07:51) Breck Carter
Replies hidden
1

It is usually best to get both sides of the picture for the network connection attempt logged. Your Log[File]= setting is correct usage for the client size. Adding -z -o <console_log_filename> to the server will help you pick up the server side of this. {Of course that does need to be dbsrv11 and not dbeng11.} Maybe with that information the picture will be clearer. Do share.

Going by just the client logfile output, you would appear to have no server at the IP address [plus default port=2638] . . . Looking for server with name sqlscst629 . . . Trying to find server at address 10.1.29.50 . . . TCP/IP link, function connect(), error code 0 and no recent history about that servername cached . . . Attempting TCPIP connection (no sasrv.ini cached address) so it resorts to broadcasting. And broadcast are UDP broadcasts and those can be blocked by almost any routing point. {In addition to firewalls, many routers today block ICMP, multicasts, broadcasts and UDP traffic and you are going through a routing point (if only logically) since your client a server are located on different subnets; ie. 192.168.. and 10...* }

If you are absolutely certain the dbsrv11 process is located on a machine with an IPV4 address of 10.1.29.50 then it is most likely it is just not listening on port 2638 ... and without server discovery we won't guess the port. You can try adding something like this PORT=2638,49152-49159 tcpip network parameter to your [Comm]Links=parameter but let's find out the situation at the server.

HTH

(13 Nov '14, 09:48) Nick Elson S...

Breck, The ping worked (I had mentioned in my original posting that it worked). The dbisql without the read failed.

The output from the dbping follows:

SQL Anywhere Server Ping Utility Version 11.0.1.2596 Connected to SQL Anywhere 11.0.1.2596 server "sqlSCST629" and database "micros" at address 10.1.29.50. Ping database successful.

We have 6 different machines running SQL Anywhere, and they all use the default port. Therefore, I don't think that port 2638 is being blocked.

(13 Nov '14, 13:26) topeters

Could you also post the result of dbping with the additional -z option to produce debug output?

Can you connect when using dbisqlc instead of dbisql?

(14 Nov '14, 03:21) Volker Barth

Saying something worked in English, and showing the actual command plus the resulting output, are two entirely different things... hence the "repetitive" request.

Apologies in advance for wasting your time again, but please show us the exact and complete command lines for the dbping command that worked, and the dbisql command without READ that failed. Please use full paths for the dbping and dbisql executables rather than relying on the PATH.

The fact that dbping works and dbisql does not is very unusual, and points to some kind of setup issue.

(14 Nov '14, 08:19) Breck Carter
showing 5 of 8 show all flat view
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×105

question asked: 12 Nov '14, 14:50

question was seen: 4,206 times

last updated: 14 Nov '14, 08:19