Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dbisql as a command-line tool

81 views
Skip to first unread message

George_Brink

unread,
Jan 8, 2001, 5:19:16 PM1/8/01
to
My platform is Win98 and I use ASA6.
Problem is, when I run command like:
dbisql -c "DSN=MyConnection" -q ListOfCommands.sql
all works fine if ListOfCommands contains only "good" commands. But if
something is wrong (for example I try to insert row with duplicate primary
key, or problem in foreign key, or ...) in this case dbisql show a message
box on the screen. I want to send all messages about problems to text file
and view at them later. How to do it?
I didn't found any "redirect output" switches in documentation. Perhaps I
need to use another tool, but where to get it?

Jason Hinsperger

unread,
Jan 8, 2001, 6:31:15 PM1/8/01
to
Set the DBISQL option ON_ERROR to 'Continue' and set the ISQL_LOG option to
the name of the log file you want to create.

Jason Hinsperger
International and Sustaining Engineering
Adaptive Server Anywhere

Venkat

unread,
Jan 10, 2001, 6:42:35 PM1/10/01
to
Try with option
-nogui ( Run in command-prompt mode. )

At my work, we used MKS tool kit (ver5.1) on Windows. this tool kit allows
to run all unix commands at MS-DOS prompt.

Hope this helps.

George_Brink

unread,
Jan 11, 2001, 1:18:27 PM1/11/01
to
Thanks, it works. But I have another question: dbisql writes in my log ALL
commands. But I don't need all of them. I want to have in log only commands
with errors and description of this errors. How to do this?

Jason Hinsperger

unread,
Jan 12, 2001, 9:43:57 AM1/12/01
to
There is currently no way to do this in DBISQL.

--


Jason Hinsperger
International and Sustaining Engineering
Adaptive Server Anywhere

George_Brink

unread,
Jan 16, 2001, 9:40:04 AM1/16/01
to
Can you suggest any other tool?

Kris Vorwerk

unread,
Jun 1, 2001, 2:41:16 PM6/1/01
to
> Somebody, please explain me how does the dbisql work as a command-line
> tool.
> I have a database server, but to access it, first i have to telnet a router
> and then from the router i can telnet the server.
> I want to know if i can access the dbisql in command line through the
> telnet session. Why does it ask for a X11 Server?

Yes.

dbisql == java (X-Windows GUI)
dbisqlc == ncurses (console)

Hence, dbisqlc will allow you to run SQL statements through the console.

BACH

unread,
Jun 1, 2001, 1:16:35 PM6/1/01
to
Hi,

Somebody, please explain me how does the dbisql work as a command-line
tool.
I have a database server, but to access it, first i have to telnet a router
and then from the router i can telnet the server.
I want to know if i can access the dbisql in command line through the
telnet session. Why does it ask for a X11 Server?

I have tried the following, but with no success:

# dbisql -c "uid=dba;pwd=sql" -host localhost -nogui
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as
the
value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at <Unloaded Method>
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName0(Compiled Code)
at java.lang.Class.forName(Compiled Code)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
ronment.java:63)
at <Unloaded Method>
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName0(Compiled Code)
at java.lang.Class.forName(Compiled Code)
at java.awt.Toolkit$2.run(Toolkit.java:499)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:492)
at sybase.isql.h.a(Compiled Code)
at sybase.isql.h.c(ISQLImages.java)
at <Unloaded Method>
The Java2 runtime was initialized, but there was a problem loading the main
clas
s. The application could not be started.

Regards,

B.Alvarado.

0 new messages