Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    16

    Unanswered: Why should sqlplus "/ as sysdba" works?

    This is on Oracle 9i:

    $ sqlplus "/ as sysdba"

    SQL*Plus: Release 9.2.0.1.0 - Production on Tue Mar 9 07:31:21 2004

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


    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning option
    JServer Release 9.2.0.1.0 - Production

    SQL> show user;
    USER is "SYS"
    SQL>

    Can any one tell why this is so?
    rgds.
    infydime

  2. #2
    Join Date
    Jan 2004
    Posts
    16
    A short search later i get this:

    $ sqlplus /nolog

    SQL*Plus: Release 9.2.0.1.0 - Production on Tue Mar 9 07:52:57 2004

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

    SQL> show user;
    USER is ""
    SQL>

    I need to goahead and connect as a specific user again.
    infydime

  3. #3
    Join Date
    Jan 2004
    Posts
    16

    Strange...

    Apparently, both these are available for use to anyone OS level user who is part of the DBA group created for oracle installation and looks like they are by design.

    Is there any other explanation?
    infydime

  4. #4
    Join Date
    Jan 2004
    Posts
    16

    Figured it out....

    Hi All,
    After a little bit of enquiry, i have figured it out...
    Basically, Oracle allows any OS level DBA group user to log into SQLplus tool with out any other specific form of authentication.
    So this will work:
    $ sqlplus /NOLOG
    SQL*Plus: Release 9.2.0.1.0 - Production on Tue Mar 9 08:26:52 2004
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    The option /NOLOG signifies:
    Establishes no initial connection to Oracle. Before issuing any SQL commands, you must issue a CONNECT command to establish a valid logon. Use /NOLOG when you want to have a SQL*Plus command file prompt for the username, password, or database specification. The first line of this command file is not assumed to contain a logon.
    So,
    SQL> show user
    USER is ""
    SQL>
    That is, no user is connected.
    Now if i say,
    SQL> connect / as sysdba
    Connected.
    SQL>
    iam connected as sysdba.
    On the other hand, when i say,
    $ sqlplus "/ as sysdba"
    SQL*Plus: Release 9.2.0.1.0 - Production on Tue Mar 9 08:40:54 2004
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning option
    JServer Release 9.2.0.1.0 - Production
    By enclosing the statement in double quotes iam directly connecting as sysdba to oracle. and hence
    SQL> show user
    USER is "SYS"
    SQL>
    infydime

  5. #5
    Join Date
    Jan 2004
    Posts
    99
    wot are you going on about?

Posting Permissions

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