Tags: client, database, hp-unix, informix, installed, mysql, oracle, query, run, setup, software, sql, successfully, system, unix-shell

Run SQL Query on Informix database from Unix-Shell

On Database » Informix

982 words with 2 Comments; publish: Wed, 12 Dec 2007 10:24:00 GMT; (25078.13, « »)


I've an Client System ( HP-Unix ) and I've Informix Client Software installed on that.

The Informix Client is successfully setup with Informix Database Server.

I'm looking for a way to run an SQL Query on the Database server from the Client system.

Actually I want it in Unix Shell Script or something like that ... that make me able to run it from somewhere else ...

How it is possible ?


All Comments

Leave a comment...

    • You can

      - write a esql/c program... but i never do that...

      - Use a dbaccess (in a shell program)

      some examples:

      echo "select * from table_X" | dbaccess myDB ;

      dbaccess myDB Myselect.sql ;

      dbaccess myDB <<EOF

      select * from table_X


      Read the dbaccess manual...


      #1; Tue, 11 Dec 2007 19:18:00 GMT
    • I wrote from korn shell the following:

      echo "database mydb; select * from mytable" | isql -qr -

      #2; Tue, 11 Dec 2007 19:19:00 GMT