I'm trying to connect to a database and run a script using
dbisql -nogui -c "uid=dba;pwd=sql"
whereas if I write:
dbisql -c "uid=dba;pwd=sql"
an Interactive SQL window opens as connected.
What I'd really like to is call
According to the docs, the following command should work against the default database although Links property is missing:
dbisql -c "UID=DBA;PWD=sql" -onerror exit mycom.sql
However, I get the message "You are not connected to a database". On the other hand, I can connect to the same database smoothly via Interactive SQL window (choosing 'connect to a running database on this computer').
Is there anything else I'm missing?
Dbping & Dbisql:
Dbisql window (works ok):
-c Should be a complete connections string. Probably you should add links=shmem to.
In my batch files i don't use the -nogui paramater. And I'm not getting a normal window when I run the batchfile
answered 24 Sep '12, 05:53
This is a long shot, but from your screen snap it looks as though you may have endashes (long dashes) on the command line instead of ASCII dashes. I can see how you could get the non-ASCII dash if you cut-and-paste the command line from the docs on Windows. You might want to try typing it in with regular dashes and see if you still have a problem?
You will see this behaviour when running dbisql.exe from a Windows command prompt. For .bat file you should run with dbisql.com which is created for that purpose.
. . . "For Windows, there are two executables:"
"2.The dbisql.exe executable is linked as a windowed application and does not block the command shell from which it was started. If dbisql.exe is run from a batch file, you won't see any output sent to the standard output or standard error files. "