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 12.0.1.3554. asked 26 Jul '16, 17:44 scott97007 Breck Carter |
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!) answered 29 Jul '16, 12:18 scott97007 > 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
|
According to the docs, SQL Anywhere 12.0.1 is officially supported on Windows 8.1 starting with EBF 12.0.1.3994 (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 12.0.1.4403).
What Windows version have you used before?
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.
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.
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.
With the -nogui option I get no log output.
With no -nogui option I get this (with secure info splatted out):
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 ...
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 ...
The stack trace from isqlError-2.err.xml is ...
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.
dbping and dbbackup both work with the DBN parameter.