Test the sqlnet. ora and password files of Oracle

Source: Internet
Author: User
Test the sqlnet. ora and password files of Oracle

Test the sqlnet. ora and password files of Oracle

Check whether sqlnet. ora is available.

[Oracle @ localhost ~] $ Cd $ ORACLE_HOME
[Oracle @ localhost dbhome_1] $ cd network
[Oracle @ localhost network] $ cd admin
[Oracle @ localhost admin] $ ls
Listener. ora samples shrept. lst
[Oracle @ localhost admin] $

Detailed illustration of the entire process of VMware + Linux + Oracle 10G RAC

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Steps for installing Oracle 11gR2 in vmwarevm

Manually create a sqlnet. ora File

[Oracle @ localhost admin] $ touch sqlnet. ora
[Oracle @ localhost admin] $ vim sqlnet. ora
[Oracle @ localhost admin] $ cat sqlnet. ora
SQLNET. AUTHENTICATION_SERVICES = (none );
[Oracle @ localhost admin] $


Test login status:

[Oracle @ localhost admin] $ sqlplus/as sysdba

SQL * Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:26:25 2014

Copyright (c) 1982,201 3, Oracle. All rights reserved.

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


Enter user-name:

*********************************

View the password file:

[Oracle @ localhost dbs] $ pwd
/U01/app/oracle/product/11.2.0/dbhome_1/dbs
[Oracle @ localhost dbs] $ ls
Hc_orcl.dat init. ora initorcl. ora lkORCL orapworcl spfileorcl. ora
[Oracle @ localhost dbs] $

Execute the following command to process the password file:

Changing the password with an old password file is not allowed:

[Oracle @ localhost dbs] $ orapwd file = orapworcl password = gaojian

OPW-00005: File with same name exists-please delete or renam

I had to make another new one:

[Oracle @ localhost dbs] $ orapwd file = orapwgaojian password = gaojian
[Oracle @ localhost dbs] $ ls
Hc_orcl.dat initorcl. ora orapwgaojian spfileorcl. ora
Init. ora lkORCL orapworcl
[Oracle @ localhost dbs] $

I still cannot use the password I just prepared (because it is inconsistent with the sys password in oracle, it is set at will, so no, which instance is actually logged in, which password file will be used -- orapw ):

[Oracle @ localhost admin] $ sqlplus/as sysdba

SQL * Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:32:23 2014

Copyright (c) 1982,201 3, Oracle. All rights reserved.

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


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


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


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL * Plus
[Oracle @ localhost admin] $

*******************************

Consider deleting orapworcl (this operation is actually risky ):

[Oracle @ localhost dbs] $ rm orapworcl
[Oracle @ localhost dbs] $

Similarly, login fails:

[Oracle @ localhost admin] $ sqlplus/as sysdba

SQL * Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:34:24 2014

Copyright (c) 1982,201 3, Oracle. All rights reserved.

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


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


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


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL * Plus
[Oracle @ localhost admin] $

*******************************

Comment out sqlnet. AUTHENTICATION_SERVICES = (none); In SQLNET. ora and try again:

[Oracle @ localhost admin] $ cat sqlnet. ora
# SQLNET. AUTHENTICATION_SERVICES = (none );
[Oracle @ localhost admin] $

[Oracle @ localhost dbs] $ strings orapwgaojian
] \ [Z
ORACLE Remote Password file
INTERNAL
FE406C76B620912C
861BAF16E111B672
[Oracle @ localhost dbs] $

Log on to the database to change the password:

[Oracle @ localhost admin] $ sqlplus/as sysdba

SQL * Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:44:08 2014

Copyright (c) 1982,201 3, Oracle. All rights reserved.


Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter user sys identified by oracle;

User altered.

SQL> exit

[Oracle @ localhost dbs] $ strings orapwgaojian
] \ [Z
ORACLE Remote Password file
INTERNAL
FE406C76B620912C
861BAF16E111B672
[Oracle @ localhost dbs] $

The password file does not seem to change.

Or login fails:

[Oracle @ localhost admin] $ sqlplus/as sysdba

SQL * Plus: Release 11.2.0.4.0 Production on Tue Apr 15 08:45:41 2014

Copyright (c) 1982,201 3, Oracle. All rights reserved.

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


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


Enter user-name:

*******************************

It seems that we still need to use orapw. .

[Oracle @ localhost dbs] $ orapwd file = orapworcl

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.