Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

I'm baffled about a connection problem when running dbisql after upgrading to Windows 10.

Before Win10 I ran commands like these from batch files or directly from the command prompt:

dbisql -nogui -c "uid=dba;pwd=***;dbn=fred;" START DATABASE 'c:\fred\source.db' AS "sourcedb" WITH TRUNCATE AT CHECKPOINT AUTOSTOP OFF;
dbisql -nogui -c "uid=dba;pwd=***;dbn=fred;" read ENCODING CP1252 'C:\SVN\fred\trunk\Common\dbinit.sql'
dbisql -nogui -c "uid=dba;pwd=***;dbn=fred;" select * from sys.systable

After upgrading to Win 10 I get no connection. From the command prompt I get "You are not connected to a database".

I tried using the both architectures of the full path to run dbisql.exe.

I can start ISQL if I run dbisql.exe with the connection string and then run individual commands that way, but that doesn't work with my batch files.

If I run:

dbisql -nogui -c "uid=dba;pwd=***;dbn=fred;"

I get a command prompt but any command I run just gives a "(Not Connected)" message.

I tried opening the command prompt in Administrator mode. No joy.

For now I'm using an ODBC connection in my parameters, and that lets me get my work done.

The dbisql with the "dbn" parameter and cmd.exe are not playing well together.

I am using SA

asked 26 Jul '16, 17:44

scott97007's gravatar image

accept rate: 0%

edited 27 Jul '16, 04:07

Breck%20Carter's gravatar image

Breck Carter

According to the docs, SQL Anywhere 12.0.1 is officially supported on Windows 8.1 starting with EBF (there's no particular EBF stated for Windows 10), so given you use a way older build, I'd suggest to try with a current one (such as

What Windows version have you used before?

(27 Jul '16, 02:59) Volker Barth

Please show us the commands that DO work, so we can try debugging-by-manual-inspection, rather than debugging-by-finding-and-installing-old-build-on-Windows-10... but I will do that if necessary :)

FWIW commands similar to yours seem to work OK using SQL Anywhere 16 on Windows 10.

(27 Jul '16, 04:52) Breck Carter

Logging the details of connection attempt can often be helpful in these situations. Try adding something like log=c:\temp\conlog.txt or whatever path is appropriate to your -c parameter.

(27 Jul '16, 06:05) Justin Willey

I am not able to reproduce this. Perhaps you can add more detail?

I believe that dbisql -nogui should report more info than just (Not Connected) but if it does not, please add LOG=<filespec> to get client side connection debug logging as recommended by Justin. Can you also outline the start options used by the engine and whether the engine is a network or personal server.

(27 Jul '16, 09:24) Chris Keating

With the -nogui option I get no log output.

With no -nogui option I get this (with secure info splatted out):

Wed Jul 27 2016 08:23:50
08:23:50 Attempting to connect using:
08:23:50 Attempting to connect to a running server...
08:23:50 Trying to start SharedMemory link ...
08:23:50     SharedMemory link started successfully
08:23:50 Attempting SharedMemory connection (no sasrv.ini cached address)
08:23:50 Connected to server over SharedMemory
08:23:50 Connected to SQL Anywhere Server version
08:23:50 Connected to the default SharedMemory server
08:23:50 Application information:
08:23:50 IP=;HOST=***;OSUSER=***;OS='Unrecognized Windows version Build 9200 ';EXE='C:\Program Files\SQL Anywhere 12\bin64\dbisql.exe';PID=0x1abc;THREAD=0xa40;VERSION=;API=iAnywhereJDBC;TIMEZONEADJUSTMENT=-420
08:23:50 Connected to the server, attempting to connect to a running database...
08:23:50 [   51] Connected to database successfully
08:23:50 [   51] The number of prefetch rows has been reduced to 16 due to the prefetch buffer
08:23:50 [   51] limit. Increasing the PrefetchBuffer connection parameter may improve performance.

More info:

All of the other systems at my company with the same software and configuration and everything works just fine. We have field installations of our software--which includes this SA EBF of course--and they are all running fine. There is something on my system in particular that isn't allowing -nogui when run from cmd.exe; that includes commands run from xp_cmdshell().

Our application (Delphi, using Devexpress) connects just fine on my system. It uses a commercial DB connection package.

My previous Windows version was Windows 7. I don't know which subversion.

What startup settings? Let's make things simple and do this ...

C:\WINDOWS\system32>"%SQLANY12%\BIN32\dbinit" "c:\temp\fred.db"
C:\WINDOWS\system32>"%SQLANY12%\BIN32\dbsrv12" "c:\temp\fred.db"
C:\WINDOWS\system32>"%SQLANY12%\BIN32\dbisql" -nogui -c "uid=dba;pwd=sql;dbn=fred" select * from sys.systable
You are not connected to a database.

If I don't create an ODBC connection and I use the dsn parameter I get the "You are not connected to a database." message.

I don't know if this is related, but I created an ODBC connection for "fred" and used the dsn parameter and I got ...

table_id   file_id count                first_page last_page   primary_root creator    first_ext_page last_ext_page table_page_count ext_page_count object_id            table_name                                                                                                                       table_type    *** OutOfMemoryError ***
Request type=3
Request =[ExecuteRequest:sql=select * from 
Error! This program has encountered an internal error.
Details have been logged to C:\ProgramData\SQL Anywhere 12\diagnostics\isqlError-2.err.xml
Exception is:
Database worker thread request failed because of a runtime error.
Request=[ExecuteRequest:sql=select * from sys.systable,containsODBCEscapeSequence=false,cachingHint=2,warning=null,error=null,errorMessage=null,resultsProcessor=sybase.isql.Console]
(27 Jul '16, 13:56) scott97007

The stack trace from isqlError-2.err.xml is ...

stack_trace="java.lang.Error: Database worker thread request failed because of a runtime error.
Request=[ExecuteRequest:sql=select * from sys.systable,containsODBCEscapeSequence=false,cachingHint=2,warning=null,error=null,errorMessage=null,resultsProcessor=sybase.isql.Console]
    at sybase.isql.ISQLConnectionImpl.enqueueRequest(
    at sybase.isql.ISQLConnectionImpl.execute(
    at sybase.isql.ASAParser.executeSQL(
    at sybase.isql.ASAParser.sqlStatement(
    at sybase.isql.ASAParser.isqlStatement(
    at sybase.isql.ASAParser.isqlStatementList_2(
    at sybase.isql.ASAParser.isqlStatementList(
    at sybase.isql.ASAParser.parse(
    at sybase.isql.isql.execute(
    at sybase.isql.isql.main(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at sybase.isql.ISQLLoader.callISQLMethod(
    at sybase.isql.ISQLLoader.main(
Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(
    at java.lang.AbstractStringBuilder.expandCapacity(
    at java.lang.AbstractStringBuilder.append(
    at java.lang.StringBuilder.append(
    at sybase.isql.Console.padString(
    at sybase.isql.Console.printResultSet(
    at sybase.isql.Console.processResultSet(
    at sybase.isql.ISQLConnectionImpl.callCustomResultsProcessor(
    at sybase.isql.ISQLConnectionImpl.handleExecute(

(27 Jul '16, 13:58) scott97007

I looked at the query with Windows Process Monitor: Once with the DBN parameter and once with the DSN parameter. I was hoping to find something like a file access failure in case there was something like a file permission setting that is causing the problem. Nothing stood out.

I'm stumped on how to go about debugging this.

(28 Jul '16, 12:45) scott97007

dbping and dbbackup both work with the DBN parameter.

(29 Jul '16, 11:31) scott97007
More comments hidden
showing 5 of 8 show all flat view

I did an uninstall, reboot and reinstall of SA.

Good new: That fixed the problem in my test "fred" database. It now queries from the command prompt with DBN and DSN. (woo hoo!)

Bad news: The reinstall hosed my real application, but that is a different problem. (crap! crap! crap!)

permanent link

answered 29 Jul '16, 12:18

scott97007's gravatar image

accept rate: 0%

> a different problem. (crap! crap! crap!)

Go ahead and post a new question, if you think it might help.

(29 Jul '16, 13:36) Breck Carter
Replies hidden

It's OK. We got it. It was application specific. Thanks though.

(29 Jul '16, 16:27) scott97007
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 26 Jul '16, 17:44

question was seen: 3,017 times

last updated: 29 Jul '16, 16:27