Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2003
    Posts
    19

    Unanswered: Editing SQL PLUS glogin.sql

    i justed started using Oracle SQL PLUS and i'm trying to get sql plus to default to a specific directory when i load it. is it possible to do so through glogin.sql or login.sql

    also, does anyone have some useful commands that i could put in the glogin.sql?

    currently, i have:

    -- changes the prompt
    set sqlprompt 'dig1tal@oracle> '

    -- changes the default editor to wordpad
    define_editor = "C:\Program Files\Windows NT\Accessories\wordpad.exe"

    thanks in advance,

  2. #2
    Join Date
    Aug 2003
    Location
    MN
    Posts
    10

    Re: Editing SQL PLUS glogin.sql

    however you're opening sql plus, through start|programs|oracle...
    or
    from a shortcut on your desktop, modify the shortcut and change the "Start In" to the default path you'd like.


    I haven't put too much in the glogin, just set lines, pages and severoutput on;

  3. #3
    Join Date
    Oct 2003
    Posts
    19
    i ususaly just start it from START-->RUN-->sqlplusw

    thanks for the suggestion...i'll try the icon/desktop method.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,296

    Re: Editing SQL PLUS glogin.sql

    Originally posted by dig1tal

    -- changes the prompt
    set sqlprompt 'dig1tal@oracle> '
    use this for the prompt. That way no matter what environment you log into it shows the sid and username

    PHP Code:
    set termout off pause off arraysize 1 
    rem 
    rem Store username 
    rem 
    col user_id new_value user_id 
    col user_name new_value user_name 
    select user_id
    lower(usernameuser_name from user_users 
      where username 
    user
    rem 
    rem Store database name 
    rem 
    col db_name new_value db_name 
    select lower
    (substr(global_name,1,(instr(global_name,'.',1,1)-1))) 
    db_name from global_name
    set termout on
    set sqlprompt 
    "&db_name:&user_name> " 
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  5. #5
    Join Date
    Oct 2003
    Posts
    19
    Cool, a reply from the_infamous_Duck.

    thanks for your input.

  6. #6
    Join Date
    Dec 2003
    Posts
    30
    Hello.

    Your Code for setting the SQL prompt is very good. it is working when we run SQL plus. but i want to set its Prompt WHEN we issue the CONNECT command from SQL prompt. then it change its Prompt from which user i login.
    hope you will understand my Question
    Kashif

  7. #7
    Join Date
    Jul 2003
    Posts
    2,296
    you mean this problem?
    Code:
    09:24:46 kod:Platform> connect integration/integration@kod1
    Connected.
    09:25:00 kod:Platform> show user
    USER is "INTEGRATION"
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  8. #8
    Join Date
    Dec 2003
    Posts
    30
    Yes you are right.

    i want to change at this time.


    Thnks for the Reply
    Kashif

Posting Permissions

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