Oracle RMAN連接target報ora-01017的解決方法


在RAC的一個節點上使用rman通過tns(SCAN)連接時報錯:


[oracle@rac1 ~]$ rman target system/system@orarac

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Mar 23 13:35:40 2015

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  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-01017: invalid username/password; logon denied


而下面的連接沒有問題:


[oracle@rac1 ~]$ rman target system/system

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Mar 23 13:39:07 2015

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORARAC (DBID=377624869)

RMAN>

使用sys用戶通過tns則可以連接:


[oracle@rac1 ~]$ rman target sys/system@orarac

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Mar 23 13:41:11 2015

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORARAC (DBID=377624869)

RMAN>

我們給system用戶授予sysdba權限測試一下:


[oracle@rac1 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.1.0.1.0 Production on Mon Mar 23 13:42:27 2015

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> grant sysdba to system;

Grant succeeded.


再次在rman中使用system用戶通過tns連接target:


[oracle@rac1 ~]$ rman target system/system@orarac

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Mar 23 13:43:22 2015

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORARAC (DBID=377624869)

RMAN> 


OK了(其實上面的測試也適用於遠程使用rman連接target數據庫),在這次測試中可以有下面的結論:


1、rman中(在遠程機器或服務器上)使用tnsname連接target數據庫時,需要用戶具有SYSDBA權限;

2、rman中(在服務器上)不通過tnsname連接target數據庫時,可以不需要SYSDBA權限;




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM