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

来源:互联网 发布:seo技术web678.cn 编辑:程序博客网 时间:2024/05/17 06:20
RMAN 无法登录故障解决RMAN-04005 ORA-01031  

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

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Aug 31 18:10:25 2012

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.1.0 - Production on Mon Aug 31 18:20:25 2012

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.1.0 - Production on Mon Aug 31 18:23:25 2012

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.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.1.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.1.0 - Production on Mon Aug 31 18:30:25 2012

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

connected to target database: NNJY (DBID=1654736388)

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认证。

原创粉丝点击