I'm trying to connect to a database and run a script using dbisql. I've checked the docs and tried many combinations but I guess I'm missing something.
For example:
dbisql -nogui -c "uid=dba;pwd=sql"
results in:
((not connected)
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 dbisql -nogui -c "uid=dba;pwd=sql" myscript.sql but I'm stuck on the first step.
Notes:
-nogui -c "uid=dba;pwd=sql" line works with SA9 dbisql command.Update:
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'). dbping -d -c "UID=DBA;PWD=sql" succeeds with the same connection string stating it connected to the database. The target database is started with -x none switch.
Is there anything else I'm missing?
Screenshots:
Dbsrv12:
Dbping & Dbisql:
Dbisql window (works ok):
Request clarification before answering.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.