RMAN 无法登录故障解决RMAN-04005 ORA-01031

RMAN 无法登录故障解决RMAN-04005 ORA-01031 
 

一日登录到一经常备份的数据库,打算察看备份情况,发现无法登录,伴随权限ORA-01031错误
$./rman target /

Recovery Manager: Release 10.2.0.4.0 - Production on Mon Aug 31 17:32:51 2009

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

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01031: insufficient privileges

使用sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Aug 31 18:09:15 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

ERROR:
ORA-01031: insufficient privileges
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
也出现错误,估计是认证方式不对,察看sqlnet.ora文件内容

more sqlnet.ora
# sqlnet.ora Network Configuration File: /u01/app/oracle/product/102/db_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES)
发现采用NTS方式认证,本地认证,感觉这行有问题,注释掉,故障就OK了
sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Aug 31 18:15:56 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


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

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
nnjydb:/u01/app/oracle/product/102/db_1/network/admin$rman target /

Recovery Manager: Release 10.2.0.4.0 - Production on Mon Aug 31 18:16:04 2009

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

connected to target database: NNJY (DBID=1854735498)

RMAN>


原因分析,查了一下ORACLE的原文

SQLNET.AUTHENTICATION_SERVICES
Purpose

Use the parameter SQLNET.AUTHENTICATION_SERVICES to enable one or more authentication services. If authentication has been installed, it is recommended that this parameter be set to either none or to one of the authentication methods.
Default
None

Values
Authentication Methods Available with Oracle Net Services:

* none for no authentication methods. A valid username and password can be used to access the database.
* all for all authentication methods
* nts for Windows NT native authentication

Windows NT native authentication

An authentication method that enables a client single login access to a Windows NT server and a database running on the server.

原来这个认证方法是WINDOWS系列操作系统特有的,UNIX/LINUX不需要,或者根本不能设为NTS,仔细看ORACLE的配置手册,总结几点如下

1.在windows下,SQLNET.AUTHENTICATION_SERVICES必须设置为NTS或者ALL才能使用OS认证;
2.windows下不设置或者设置为其他任何值都不能使用OS认证。
3.在unix/linux下,在SQLNET.AUTHENTICATION_SERVICES的值设置为ALL,或者不设置的情况下,OS验证才能成功;
4.在unix/linux下设置为其他任何值都不能使用OS认证。

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页