Haiyanliang’s Weblog

login Oracle db without expose password

  1. H:\>sqlplus oemdba/qwerty@cdoc

    SQL*Plus: Release 11.1.0.6.0 – Production on Thu Oct 23 16:19:51 2008

    Copyright (c) 1982, 2007, Oracle.  All rights reserved.

    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.5.0 – Production
    With the Partitioning option
    JServer Release 9.2.0.5.0 – Production

    SQL> quit

  2. cd C:\app\hliang\product\11.1.0\db_1\BIN
  3. C:\app\hliang\product\11.1.0\db_1\BIN>mkstore -wrl C:\app\hliang\product\11.1.0 -create
    Enter password:

    Enter password again:

  4. C:\app\hliang\product\11.1.0\db_1\BIN>mkstore -wrl C:\app\hliang\product\11.1.0 -createCredential CDOC oemdba qwerty
    Enter wallet password:

    Create credential oracle.security.client.connect_string1

  5. C:\app\hliang\product\11.1.0\db_1\BIN>sqlplus /@cdoc

    SQL*Plus: Release 11.1.0.6.0 – Production on Thu Oct 23 16:33:44 2008

    Copyright (c) 1982, 2007, Oracle.  All rights reserved.

    ERROR:
    ORA-01017: invalid username/password; logon denied

    Enter user-name:
    ERROR:
    ORA-01017: invalid username/password; logon denied

    Enter user-name:
    ERROR:
    ORA-01017: invalid username/password; logon denied

    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

    C:\app\hliang\product\11.1.0\db_1\BIN>

  6. Add following lines into SQLNET.ora
    SQLNET.WALLET_OVERRIDE = TRUE
    WALLET_LOCATION =  (SOURCE =
    (METHOD = FILE)
    (METHOD_DATA =(DIRECTORY = C:\app\hliang\product\11.1.0))
    )
  7. C:\app\hliang\product\11.1.0\db_1\BIN>sqlplus /@cdoc

    SQL*Plus: Release 11.1.0.6.0 – Production on Thu Oct 23 16:35:37 2008

    Copyright (c) 1982, 2007, Oracle.  All rights reserved.

    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.5.0 – Production
    With the Partitioning option
    JServer Release 9.2.0.5.0 – Production

    SQL> quit
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 – Production
    With the Partitioning option
    JServer Release 9.2.0.5.0 – Production

    C:\app\hliang\product\11.1.0\db_1\BIN>

Leave a comment