How do I redirect output with ISQL? 
Author Message
 How do I redirect output with ISQL?

Can someone provide an answer:

I use ISQL to access Sybase and would like to sometimes redirect the output to
a file that I can later print.  I do not have any documentation on this feature
but have been told that it is -o   but this does not work.

why doesn't this work:

isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt

dbstat.sql
----------
sp_helpdb DOCS

        {for example}

Rob Kowalski



Sat, 01 Feb 1997 06:12:43 GMT
 How do I redirect output with ISQL?

|>
|> Can someone provide an answer:
|>
|> I use ISQL to access Sybase and would like to sometimes redirect the output to
|> a file that I can later print.  I do not have any documentation on this feature
|> but have been told that it is -o   but this does not work.
|>
|>

Try doing syman isql.  syman is Sybase's on-line help and will give you
platform-specific help on isql, bcp, etc.  

If you are on a UNIX box then:

        isql -U username -i inputfile -o outputfile

If you are on a VAX/VMS box then:

        isql /user=username /input=inputfilename /output=outputfilename

The file names have to be valid filenames for the platform.  Whitespace
between the parameters (-o etc.) and the value aren't significant on my
unix box (a Sun) -- I'm not sure if  it's significant in VMS.

And the last thing is don't forget "GO" in your SQL script.  I always do
and the result is an empty file.

                                Good luck,
                                Teresa Larson

+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| Teresa A. Larson - Hughes STX Corporation                            |
| NASA/GSFC Code 933.0                        voice:  (301) 286-7867   |
| Greenbelt, Maryland  20771                  fax:    (301) 286-1777   |

+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+



Sat, 01 Feb 1997 22:40:25 GMT
 How do I redirect output with ISQL?
: why doesn't this work:
:
: isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt
:
:
: dbstat.sql
: ----------
: sp_helpdb DOCS
:
:       {for example}

Try adding a 'go' to the end of your dbstat.sql file.  You can also use
redirection in lieu of the -o and -i parameters.

--

Bill Mallary, Sybase/UNIX/Powerbuilder consultant / Houston, TX

The opinions expressed are my own, and yes, they are for sale.



Sun, 02 Feb 1997 03:07:56 GMT
 How do I redirect output with ISQL?

Quote:

> : why doesn't this work:
> :
> : isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt
> :
> :
> : dbstat.sql
> : ----------
> : sp_helpdb DOCS
> :
> :          {for example}

> Try adding a 'go' to the end of your dbstat.sql file.  You can also use
> redirection in lieu of the -o and -i parameters.

Ohh, yea - I meant to add go to the end there of course... I havn't tried, but
I will tomorrow.  I believe the error message was always something to the
effect of being an invalid statement "-o" --- so I will try redirecting also.

Rob Kowalski



Sun, 02 Feb 1997 04:33:51 GMT
 How do I redirect output with ISQL?

|> I use ISQL to access Sybase and would like to sometimes redirect the output to
|> a file that I can later print.  I do not have any documentation on this feature
|> but have been told that it is -o   but this does not work.

Do 'isql -Uxx -Pxx < input_file > output_file'

Ausode/Tschuess/UnAbrazo/DoSvedaniya/Howdy

Thomas Stump
Senior Technical Support Engineer

Sybase (Schweiz) AG / CH - Switzerland

*********************************************************************
***  SYBASE (Schweiz) AG        *****    Tel.  +41-37-26.86.78    ***
***  Customer Service & Support *****    Fax.  +41-37-26.86.76    ***
***  Rte du Mont Carmel 2       *****                             ***

*********************************************************************



Tue, 04 Feb 1997 18:33:41 GMT
 How do I redirect output with ISQL?

: why doesn't this work:

: isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt

: dbstat.sql
: ----------
: sp_helpdb DOCS

:       {for example}

You need to have a "go" on the next line, otherwise isql doesn't send the
command to the server.

+---------------------------+----------------------------+
| Sheila Stewart            | Valmet Automation (Canada) |
| Technical Specialist      | 10333 Southport Road, S.W. |

| Tel: (403) 253-8848       | CANADA                     |
| Fax: (403) 259-2926       | T2W 3X6                    |
+---------------------------+----------------------------+



Mon, 03 Feb 1997 00:17:48 GMT
 How do I redirect output with ISQL?

|> |>
|> |> Can someone provide an answer:
|> |>
|> |> I use ISQL to access Sybase and would like to sometimes redirect the output to
|> |> a file that I can later print.  I do not have any documentation on this feature
|> |> but have been told that it is -o   but this does not work.
|> |>
|> |>
|> |> why doesn't this work:
|> |>
|> |> isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt
|> |>
|> |>
|> |> dbstat.sql
|> |> ----------
|> |> sp_helpdb DOCS
|> |>
|> |>     {for example}
|> |>
|> |>
|> |> Rob Kowalski

|>
|> The only way I've gotten it to work is with unix redirection of '>' and '<'.
|> I.e., isql -Usa -Ppassword <query.sql >query.out. This does, of course, assume that you are doing this under unix.
|>
|> Lenny Gerstle

Just another idea I had. Make sure that your input file contains a 'go'
on a line by itself, after your sql stmts. Also make sure that there is a blank line after the go
stmt (ie below the go stmt)



Mon, 03 Feb 1997 01:00:41 GMT
 How do I redirect output with ISQL?
|>
|> Can someone provide an answer:
|>
|> I use ISQL to access Sybase and would like to sometimes redirect the output to
|> a file that I can later print.  I do not have any documentation on this feature
|> but have been told that it is -o   but this does not work.
|>
|>
|> why doesn't this work:
|>
|> isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt
|>
|>
|> dbstat.sql
|> ----------
|> sp_helpdb DOCS
|>
|>   {for example}
|>
|>
|> Rob Kowalski

The only way I've gotten it to work is with unix redirection of '>' and '<'.
I.e., isql -Usa -Ppassword <query.sql >query.out. This does, of course, assume that you are doing this under unix.

Lenny Gerstle



Sun, 02 Feb 1997 22:28:22 GMT
 How do I redirect output with ISQL?

|> |>
|> |> Can someone provide an answer:
|> |>
|> |> I use ISQL to access Sybase and would like to sometimes redirect the output to
|> |> a file that I can later print.  I do not have any documentation on this feature
|> |> but have been told that it is -o   but this does not work.
|> |>
|> |>
|> |> why doesn't this work:
|> |>
|> |> isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt
|> |>
|> |>
|> |> dbstat.sql
|> |> ----------
|> |> sp_helpdb DOCS
|> |>
|> |>     {for example}
|> |>
|> |>
|> |> Rob Kowalski

|>
|> The only way I've gotten it to work is with unix redirection of '>' and '<'.
|> I.e., isql -Usa -Ppassword <query.sql >query.out. This does, of course, assume that you are doing this under unix.
|>
|> Lenny Gerstle

I vahe used the -o feature on my isql many times. It works!!

--Olu E.



Mon, 03 Feb 1997 00:57:16 GMT
 How do I redirect output with ISQL?

Quote:


>Subject: How do I redirect output with ISQL?
>Date: Mon, 15 Aug 94 22:12:43 PDT
>Can someone provide an answer:
>I use ISQL to access Sybase and would like to sometimes redirect the output to
>a file that I can later print.  I do not have any documentation on this feature
>but have been told that it is -o   but this does not work.
>why doesn't this work:
>isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt
>dbstat.sql
>----------
>sp_helpdb DOCS
>        {for example}
>Rob Kowalski


isql behaves slightly differently on different operating system platforms.
I woudl assume from the syntax "isql -Usa -P..." that you are operating
under Unix.  In that case, use the Unix input and output redirection
as follows:

isql -Usa -P <mysql.txt >mysql.out

on VMS:

isql /u="sa" /p="" /input=mysql.txt /output=mysql.out

Hope this helps.



Mon, 03 Feb 1997 03:52:12 GMT
 How do I redirect output with ISQL?

Quote:

>Can someone provide an answer:

>I use ISQL to access Sybase and would like to sometimes redirect the output to
>a file that I can later print.  I do not have any documentation on this feature
>but have been told that it is -o   but this does not work.

>why doesn't this work:

>isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt

>dbstat.sql
>----------
>sp_helpdb DOCS

>    {for example}

>Rob Kowalski


What happens? If you are getting no output back, i.e. not even an error
message of any kind, make sure your file has a 'go' at the end of
each batch. Any place you would use a 'go' if you were in interactive
mode, you need 'go' in the file.

Kalen Delaney



Sat, 08 Feb 1997 07:38:56 GMT
 How do I redirect output with ISQL?


Quote:

> Path:

sybase!halon!psinntp!psinntp!psinntp!rutgers!newsserver.jvnc.net!howland.reston
ans.net!agate!tcsi.tcs.com!uunet!news1.digex.net!usenet

Quote:

> Newsgroups: comp.databases.sybase
> Subject: How do I redirect output with ISQL?
> Date: Mon, 15 Aug 94 22:12:43 PDT
> Organization: Express Access Online Communications, USA
> Lines: 22

> NNTP-Posting-Host: futureworld.digex.net
> Mime-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage

> Can someone provide an answer:

> I use ISQL to access Sybase and would like to sometimes redirect the output
to

> a file that I can later print.  I do not have any documentation on this
feature

> but have been told that it is -o   but this does not work.

> why doesn't this work:

> isql -Usa -Ppassword -ivol1:dbstat.sql -ovol1:output.txt

> dbstat.sql
> ----------
> sp_helpdb DOCS

>    {for example}

> Rob Kowalski


On some platforms, like the pc, you have to use a pipe symbols '>'.

e.g., isql -Usa -Ppassword < vol1:dabstat.sql > vol1:dbstat.out

When you use the pipe symbols you have to include the password on the command
line.

Also, Check the System Documentation in prior releases 4.2 to 4.9.2 the
Utilities were documented as a setion the Command Reference Manual.  System 10
has a Utilities manual.

Hope this helps,

David C. Martin
Sybase Professional Services



Mon, 10 Feb 1997 04:46:55 GMT
 
 [ 12 post ] 

 Relevant Pages 

1. isql output redirect

2. iSQL redirect output

3. Redirecting isql output to file

4. Redirect dump output to table

5. redirect output

6. Redirect Output of a Stored Procedure

7. Sql - redirect results output to a printer

8. Redirecting Output of Stored Proc

9. Redirecting READTEXT output to txt file

10. Redirect output from sql script

11. redirect DBCC output to a file

12. Can I redirect DBCC Output to a file?


 
Powered by phpBB® Forum Software