Databases

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Exiting ISQL with / w/o exit & quit

    5 answers - 481 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Which is Suitable 1) or 2):
    1)
    isql -Usa -Ppassword -Sserver_name << EF
    go
    select * from table
    go
    EF
    2)
    isql -Usa -Ppassword -Sserver_name << EF
    go
    select * from table
    go
    quit
    EF
    Here in case 1) ,we r not exiting ISQL using exit or quit command.
    In this case , will the session be remained open/ resource might not be
    free properly.
    it is perfectly fine i.e. 2) does not give any advantage.
  • No.1 | | 117 bytes | |

    There is no difference - in both cases the connection will get closed
    correctly.
    Michael
  • No.2 | | 1051 bytes | |


    michael.peppler@gmail.com wrote:
    There is no difference - in both cases the connection will get closed
    correctly.

    Michael

    I'll add one thing, sort of unrelated, but since I work closely with
    database security, I always cringe when I see people putting the -P
    option on the isql command line, especially when it's the sa password.

    A better option is to put the password as the very first line of your
    input, i.e.:

    isql -Sserver -Usa << EF
    password
    select column from table
    go
    EF

    This prevents the sa password from showing up clear-text when someone
    does a 'ps' on your box while the script is running. For tiny,
    millisecond-duration sql statements, is there a high risk? No. Is
    this anal retentive? Maybe. Is it easy to implement? Yes. Does it
    provide better security? Yes. It's all the admin's choice in the end
    I suppose but being in a government shop, I have no choice but to be
    anal about this stuff.
    -Mike

  • No.3 | | 1135 bytes | |

    Tue, 20 Dec 2005 07:57:29 -0800, pokerdragon wrote:

    michael.peppler@gmail.com wrote:
    >There is no difference - in both cases the connection will get closed
    >correctly.
    >>

    >Michael
    >

    I'll add one thing, sort of unrelated, but since I work closely with
    database security, I always cringe when I see people putting the -P option
    on the isql command line, especially when it's the sa password.
    --
    A better option is to put the password as the very first line of your
    input, i.e.:

    isql -Sserver -Usa << EF
    password
    select column from table
    go
    EF

    This prevents the sa password from showing up clear-text when someone does
    a 'ps' on your box while the script is running. For tiny,
    millisecond-duration sql statements, is there a high risk? No. Is this
    anal retentive? Maybe. Is it easy to implement? Yes. Does it provide
    better security? Yes.

    most recent versions of isql the -P option gets hidden automatically.

    But I agree in general.

    Michael
  • No.4 | | 384 bytes | |

    Hi Michael,

    When you say recent versions of isql are you referring to the
    sybase-released versions of ISQL? We are using ASE 12.5.3 ESD1, and
    the isql binary we are using is $SYBASE/CS-12_5/bin/isql, dated Mar 9
    2004.

    Where does this updated isql come from, and what are some of the
    additional features it provides?

    Thanks,
    -Mike

  • No.5 | | 862 bytes | |

    Fri, 30 Dec 2005 12:41:40 -0800, pokerdragon wrote:

    Hi Michael,

    When you say recent versions of isql are you referring to the
    sybase-released versions of ISQL? We are using ASE 12.5.3 ESD1, and the
    isql binary we are using is $SYBASE/CS-12_5/bin/isql, dated Mar 9 2004.

    Where does this updated isql come from, and what are some of the
    additional features it provides?

    I forget exactly which EBF includes this change - but you can get it if
    you install a recent EBF for the SDK (this can be installed on top of your
    ASE installation with no problem).

    In that release an explicit -P parameter gets converted to something
    else via a fairly simple technique (essentially changing the command line
    and re-executing isql).

    I'm currently implementing a similar technique for sqsh, btw.

    Michael

Re: Exiting ISQL with / w/o exit & quit


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Databases"

EMSDN.COM