您好,登錄后才能下訂單哦!
小編給大家分享一下rman備份密碼報錯的示例分析,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!
同事備份遇到了一個報錯,提示用戶密碼拒絕。經過確認用戶和密碼都沒有問題,那可能是什么問題呢!
1、現象
<roidb01:orcl:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin>$ <roidb01:orcl:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin>$sh rman.sh Recovery Manager: Release 11.2.0.4.0 - Production on Tue Feb 13 22:12:56 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1483481154) RMAN> 2> 3> using target database control file instead of recovery catalog RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-12001: could not open channel t1 RMAN-10008: could not create channel context RMAN-10003: unable to connect to target database ORA-01017: invalid username/password; logon denied RMAN>
2、部分腳本內容
<roidb01:orcl:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin>$vi rman.sh $ORACLE_HOME/bin/rman target / <<EOF run{ allocate channel t1 device type disk connect 'sys/xxxx$2017_sys@orcl'; #發現這個密碼里有特殊符號$ } exit EOF
3、解決方法
<roidb01:orcl:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin>$ <roidb01:orcl:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin>$cat rman.sh $ORACLE_HOME/bin/rman target / <<EOF run{ allocate channel t1 device type disk connect 'sys/xxxx\$2017_sys@orcl'; } exit EOF
shell 腳本中特殊符號需要使用\轉義處理一下。
再次執行
<roidb01:orcl:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin>$sh rman.sh Recovery Manager: Release 11.2.0.4.0 - Production on Tue Feb 13 22:13:20 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1483481154) RMAN> 2> 3> using target database control file instead of recovery catalog allocated channel: t1 channel t1: SID=46 device type=DISK released channel: t1 RMAN>
當我們在shell腳本里執行相關命令,一定要關注特殊符號的轉義問題。
以上是“rman備份密碼報錯的示例分析”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。