Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

dbisql/isql

2 posts in General Discussion Last posting was on 2011-10-18 06:36:14.0Z
tartampion Posted on 2011-10-17 20:03:05.0Z
Sender: 5ab5.4e9c8097.1804289383@sybase.com
From: tartampion
Newsgroups: sybase.public.iq
Subject: dbisql/isql
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4e9c89f9.5d8c.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 17 Oct 2011 13:03:05 -0700
X-Trace: forums-1-dub 1318881785 10.22.241.41 (17 Oct 2011 13:03:05 -0700)
X-Original-Trace: 17 Oct 2011 13:03:05 -0700, 10.22.241.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4414
Article PK: 246554

Getting more and more involved IQ, and have recently used
dbisql to load a client file into iq, such a load which
uses client file does not function with isql.
I have the following question about dbiqsl:
In isql one could do the following:
isql -U xx -S aa -D bb -o my file <<EOF
passowrd
select @@version
go
select name from sysobjects
go
EOF

Such a manipulation is not possible under dbisql(at least I
have not be able to make it work and have not found any
thing in teh litrature), so I have to put my sql commands in
a file and then run the following:
dbisql -datasource ODBC_source -nogui sql_instructions_file
How can one go from this to a more or less isql type of
treatments?
Any help or suggestion is great fully appreciated.


Rob V Posted on 2011-10-18 06:36:14.0Z
From: Rob V <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.iq
Subject: Re: dbisql/isql
References: <4e9c89f9.5d8c.1681692777@sybase.com>
In-Reply-To: <4e9c89f9.5d8c.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e9d1e5e$1@forums-1-dub>
Date: 17 Oct 2011 23:36:14 -0700
X-Trace: forums-1-dub 1318919774 10.22.241.152 (17 Oct 2011 23:36:14 -0700)
X-Original-Trace: 17 Oct 2011 23:36:14 -0700, vip152.sybase.com
Lines: 52
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4415
Article PK: 246555


On 17-Oct-2011 22:03, tartampion wrote:
> Getting more and more involved IQ, and have recently used
> dbisql to load a client file into iq, such a load which
> uses client file does not function with isql.
> I have the following question about dbiqsl:
> In isql one could do the following:
> isql -U xx -S aa -D bb -o my file<<EOF
> passowrd
> select @@version
> go
> select name from sysobjects
> go
> EOF
>
> Such a manipulation is not possible under dbisql(at least I
> have not be able to make it work and have not found any
> thing in teh litrature), so I have to put my sql commands in
> a file and then run the following:
> dbisql -datasource ODBC_source -nogui sql_instructions_file
> How can one go from this to a more or less isql type of
> treatments?
> Any help or suggestion is great fully appreciated.

As you remarked, dbisql doesn't support the "file here" shell feature
(<<EOF).
So you need to make it a two-step thing:

cat <<EOF >/tmp/sql
...sql commands...
EOF

dbisql -host... -port ... -c "uid=...;pwd=..." /tmp/sql

--
HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks& Recipes for Sybase ASE" (ASE 15 edition)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------