Discussion:
isql information
(too old to reply)
Praveen
2010-01-27 13:54:51 UTC
Permalink
Hi All,

Is there any way that I can get connected to isql & get prompt as
below:

bash-3.00$ isql -Usa -Sserver_name -ddb_name-s"|" -w5000
Password:
server_name.db_name>

instead of

bash-3.00$ isql -Usa -Sserver_name -ddb_name-s"|" -w5000
Password:
1>

I am not sure how to get this. However, I have seen few production
systems having above facility when logged to that server instance.
Could you please suggest.
Luc Van der Veurst
2010-01-27 14:12:00 UTC
Permalink
sqsh has that functionality. It has many usefull options, my favorites are
:
- inline editing
- history list
- ';' at the end of the line instead of 'go'
- built-in bcp

It's no longer available at http://www.sqsh.org, but that page contains
the necessary pointers.

Luc.
Post by Praveen
Hi All,
Is there any way that I can get connected to isql & get prompt as
bash-3.00$ isql -Usa -Sserver_name -ddb_name-s"|" -w5000
server_name.db_name>
instead of
bash-3.00$ isql -Usa -Sserver_name -ddb_name-s"|" -w5000
1>
I am not sure how to get this. However, I have seen few production
systems having above facility when logged to that server instance.
Could you please suggest.
Bret Halford
2010-01-27 16:49:15 UTC
Permalink
As Luc suggests, I think you were probably seeing sqsh in use.
(perhaps even aliased as "isql", just to make things confusing).

There is an open Sybase isql feature request for this, CR 408759,
which maps to ISUG feature request #2803 (old#: e01_194)

-bret
Neal Stack [Sybase]
2010-01-27 14:53:55 UTC
Permalink
Hello,

This is easy to do with isql:

% isql --help
usage: isql [option1] [option2] ... where [options] are ...
-b Disables the display of the table headers output.
-e Echoes input.
-F Enables the FIPS flagger.
-p Prints performance statistics.
-n Removes numbering and prompt symbol when used
with -e.

% isql -Usa -P -n
select @@servername
go

------------------------------
nstack_1502
Mark A. Parsons
2010-01-27 16:11:37 UTC
Permalink
I think the OP is looking to replace the numeric prompt with his dataserver.database name pair, eg:


isql -Usa -P -Snstack_1502 -Dmaster
nstack_1502.master> use tempdb
nstack_1502.master> go
nstack_1502.tempdb>


The OP could look into sqsh (re: Luc's post), fsql, or perhaps contact the folks who manage his production system to
find out what tool they're using.
Post by Neal Stack [Sybase]
Hello,
% isql --help
usage: isql [option1] [option2] ... where [options] are ...
-b Disables the display of the table headers output.
-e Echoes input.
-F Enables the FIPS flagger.
-p Prints performance statistics.
-n Removes numbering and prompt symbol when used
with -e.
% isql -Usa -P -n
go
------------------------------
nstack_1502
Sherlock, Kevin [TeamSybase]
2010-01-27 20:29:29 UTC
Permalink
Others have suggested "sqsh", which I also highly recommend. If your
platform is HP-UX, you might also want to look into "ied" utility (
http://docs.hp.com/en/B3921-90010/ied.1.html )

In my HP days, I relied heavily on that very handy utility (until sqsh came
along).
Post by Praveen
Hi All,
Is there any way that I can get connected to isql & get prompt as
bash-3.00$ isql -Usa -Sserver_name -ddb_name-s"|" -w5000
server_name.db_name>
instead of
bash-3.00$ isql -Usa -Sserver_name -ddb_name-s"|" -w5000
1>
I am not sure how to get this. However, I have seen few production
systems having above facility when logged to that server instance.
Could you please suggest.
Praveen
2010-01-28 13:39:34 UTC
Permalink
Hi All,

Thanks for info. Looks like the production application is using sqsh
aliased to isql.

Loading...