DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: oracle 9.2.0.6 platform aix 5.2 cannot get a sql prompt after sqlplus /nologin

  1. #1
    Join Date
    Jan 2005
    Posts
    12

    oracle 9.2.0.6 platform aix 5.2 cannot get a sql prompt after sqlplus /nologin

    After applying 9.2.0.6 ---
    can no longer get in with sqlplus /nolog
    must provide sqlplus user/pw
    etc.

    Problem does'nt appear with Linux.

    [aix5t]racle:test92:/m01/home/dba/oracle
    $ sqlplus /nolog

    SQL*Plus: Release 9.2.0.6.0 - Production on Sat Jan 29 16:36:16 2005

    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

    SP2-0640: Not connected
    SP2-0640: Not connected
    Enter value for db_name:
    Last edited by zronis; 01-29-2005 at 05:50 PM.

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    scrap original post, whats in you login.sql / glogin.sql

    bet it contains a select statement with &db_name in it
    Last edited by davey23uk; 01-29-2005 at 06:54 PM.

  3. #3
    Join Date
    Jan 2005
    Posts
    12
    that it does

    thanks

  4. #4
    Join Date
    Feb 2001
    Location
    Bombay,India
    Posts
    530
    fact: SQL*Plus
    symptom: Running SQL*Plus script fails
    symptom: SP2-0640: Not connected
    change: The following statements were added to the glogin.sql file:

    column global_name new_value gname
    Select Lower(User)||'@'|| Decode(Global_Name, 'SO817F1','sof1','HO817F1','hof1',
    Global_Name) Global_Name
    From Global_Name;
    set sqlprompt '&gname> '
    cause: The script contains the "/NoLog" parameter while calling
    SQL*Plus. This means that no initial connection is established to the database.

    Since glogin.sql gets executed when starting the SQL*Plus executable, the above
    error gets generated if glogin.sql contains a select statement. The select
    statement requires that a connection to the database has been established.



    fix:

    Do not use the "/nolog" parameter when calling SQL*Plus if glogin.sql
    contains a select statement.
    Thanks and Regards
    Rohit S Nirkhe
    rohitsnirkhe@rediffmail.com

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by davey23uk
    scrap original post, whats in you login.sql / glogin.sql

    bet it contains a select statement with &db_name in it
    You don't need any SELECT to obtain the database identifier in SQL*Plus since 9.2. You have additional system-defined variable available, called &_CONNECT_IDENTIFIER that automaticaly obtains the value of your instance's SID. So in SQL*Plus you can simply define your sqlprompt without any selects by using:

    SET SQLPROMPT '&_CONNECT_IDENTIFIER>'
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

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


Click Here to Expand Forum to Full Width