Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Posts
    156

    Unanswered: instance/session info

    is there an sql*plus command to view session info like the instance i am logged onto...

    sql> show user

    gives the info i am after, but

    sql> show instance
    sql> instance is "local"

    is there a way that on connection, i can chage the prompt to a user defined name if i cant get the instance info?
    rgs,

    Ghostman

  2. #2
    Join Date
    Jan 2004
    Posts
    99
    you can also select from v$instance, which gives you more information such as host name, instance_name, version,startup time.

    thanks

  3. #3
    Join Date
    Sep 2003
    Posts
    156
    Originally posted by zaki_mtk
    you can also select from v$instance, which gives you more information such as host name, instance_name, version,startup time.

    thanks
    perfect!
    rgs,

    Ghostman

  4. #4
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    create you a login script that is run as sqlplus logs on

    column v_db_name format a15 new_value v_name format a15 noprint
    select substr(name,1,15)||'> ' v_db_name from v$database;
    set sqlprompt '&v_name'

    this sets the sql prompt to the database that I'm attached to .

    HTH
    Gregg

  5. #5
    Join Date
    Sep 2003
    Posts
    156
    Originally posted by gbrabham
    create you a login script that is run as sqlplus logs on

    column v_db_name format a15 new_value v_name format a15 noprint
    select substr(name,1,15)||'> ' v_db_name from v$database;
    set sqlprompt '&v_name'

    this sets the sql prompt to the database that I'm attached to .

    HTH
    Gregg
    excellent, thanks a million... works a treat!
    rgs,

    Ghostman

Posting Permissions

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