Results 1 to 10 of 10

Thread: Sybase Newbie

  1. #1
    Join Date
    Jan 2006
    Posts
    17

    Unanswered: Sybase Newbie

    Hi everyone, im a Sybase newbie and really need some guidance.

    Im want to automate the running of pre-written sql scripts from a unix box, ive been using winsql on my windows machine but i prefer to do this from the unix server. Is there anything simlilair to sqlplus for Sybase IQ??, a text based client?.

  2. #2
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    If the OpenClient package is installed then you have a binary called isql (should be in $SYBASE7OCS-12_5/bin).

    There are also free clients, such as sqsh (www.sqsh.org)

    Michael

  3. #3
    Join Date
    Jan 2006
    Posts
    17
    Thank you very much i have this installed but i am getting some trouble, im trying to connect using the following command string

    $ isql -U DBA -P SQL -S olive_qa

    but instead of getting an isql prompt im getting numbered lines:
    1>
    2>
    3>

    is there something that i am doing wrong?

  4. #4
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    the numbered prompt is teh line numeber in a batch. You are already connected to the server.

    if you supply an input script then;

    $ isql -U DBA -P SQL -S olive_qa -i /tmp/myscript.sql -o/tmp/myscript.out

  5. #5
    Join Date
    Jan 2006
    Posts
    17
    thanks, i have figured out how to use it this way but can not get the isql prompt??, is there an option u can pass to get this prompt so i can run commands?

    Thanks?

  6. #6
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    The

    1>

    *is* the isql prompt.

    You type commands (i.e. SQL requests) at the prompt, and type "go" on a line by itself to execute the command.

    Michael

  7. #7
    Join Date
    Jan 2006
    Posts
    17
    how do i set columns widths, describe tables and other commands at this promt?

  8. #8
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    May I suggest reading the manual for isql?

    http://sybooks.sybase.com/onlinebook...ew/1185;hf=0#X

    Michael

  9. #9
    Join Date
    Jan 2006
    Posts
    17
    Thanks dude, exactly what i was looking for

  10. #10
    Join Date
    Jun 2002
    Posts
    10
    If your're going to be spending more than a few days working with this system on the command line (using isql), I highly recommend installing sqsh (as Michael previously mentioned). It's a very powerful replacement for isql, with such features as command line recall and other bash-like features.

    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •