【DG】搭建DG時報錯:ORA-01017、ORA-17627、ORA-17629 invalid username/password
【DG】搭建DG時,報錯:ORA-01017: invalid username/password; logon denied
今天網友也碰到了adg中搭建,ORA-01017: invalid username/password; logon denied的報錯,小麥苗遠端處理了一下,總結:
- listener.ora 監聽配置
- tnsnames.ora 配置問題
- 引數service_names的配置問題
- 密碼問題
- 必須顯式地指定密碼
若有類似的問題,可以從這幾個方面去排查。
主庫為rac,備庫為rac,主備端版本為11.2.0.4.0:
[ZFLHRDBDB1:oracle]:/oracle/app/oracle/product/11.2.0/db/dbs> rman target sys/lhr@TNS_DGPRI auxiliary sys/lhr@TNS_DGPHY
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Feb 18 11:30:10 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTDG (DBID=2836886746)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password; logon denied
C:\Users\hdzyat>rman target sys/lhr@22.188.194.31/TESTDG auxiliary sys/lhr@22.188.194.64/TESTDG
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Feb 18 11:30:10 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTDG (DBID=2836886746)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password; logon denied
C:\Users\hdzyat>sqlplus sys/lhr@22.188.194.64/TESTDG as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 18 11:30:37 2016
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
C:\Users\hdzyat>rman target sys/lhr@22.188.194.64/TESTDG
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Feb 18 12:47:27 2016
Copyright (c) 1982, 2009, 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
【RMAN】使用RMAN的Duplicate功能建立物理DataGuard報錯(ORA-17627、ORA-17629)處理
這是一個“貌似簡單,實則不然”的報錯排查處理過程。不要被表面現象所矇蔽。
在使用RMAN的Active Database Duplicate建立物理DataGuard是丟擲ORA-17627和ORA-17629錯誤,RMAN環境下的詳細報錯資訊如下:
ORA-17627: ORA-01017: invalid username/password; logon denied
ORA-17629: Cannot connect to the remote database server
千萬不要以為是由於輸入了錯誤的使用者名稱和密碼導致的,而是因為“沒有輸入使用者名稱和密碼”。且看我的分解。
1.資料庫版本資訊
SYS@PROD> select * from v$version;
BANNER
----------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
2.再現問題現象
1)建立物理備庫的RMAN指令碼如下
注意此指令碼本身不存在任何問題。
duplicate target database
for standby
from active database
DORECOVER
spfile
set db_unique_name='SBDB'
set log_archive_dest_1='location=/u01/app/oracle/arch/SBDB'
set log_archive_dest_2='service=PROD async lgwr register valid_for=(online_logfile,primary_role) db_unique_name=PROD'
set standby_file_management='AUTO'
set fal_server='PROD'
set fal_client='SBDB'
set control_files='/u01/app/oracle/oradata/SBDB/control1.ctl','/u01/app/oracle/oradata/SBDB/control2.ctl'
set db_file_name_convert='PROD','SBDB'
set log_file_name_convert='PROD','SBDB'
set memory_target='0'
set sga_target='400M';
2)確認當前ORACLE_SID內容
PROD@secdb /home/oracle$ echo $ORACLE_SID
PROD
3)連線到AUXILIARY輔助例項建立物理備庫
PROD@secdb /home/oracle$ rman target / auxiliary sys/oracle@sbdb
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 25 20:36:53 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: PROD (DBID=193323522)
connected to auxiliary database: PROD (not mounted)
RMAN>
RMAN> duplicate target database
2> for standby
from active database
3> 4> DORECOVER
5> spfile
6> set db_unique_name='SBDB'
7> set log_archive_dest_1='location=/u01/app/oracle/arch/SBDB'
8> set log_archive_dest_2='service=PROD async lgwr register valid_for=(online_logfile ,primary_role) db_unique_name=PROD'
set standby_file_management='AUTO'
9> 10> set fal_server='PROD'
11> set fal_client='SBDB'
set control_files='/u01/app/oracle/oradata/SBDB/control1.ctl','/u01/app/oracle/oradat a/SBDB/control2.ctl'
12> 13> set db_file_name_convert='PROD','SBDB'
14> set log_file_name_convert='PROD','SBDB'
set memory_target='0'
15> 16> set sga_target='400M';
Starting Duplicate Db at 20120425 20:37:26
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=135 device type=DISK
contents of Memory Script.:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwPROD' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapwSBDB' targetfile
'/u01/app/oracle/product/11.2.0/db_1/dbs/spfilePROD.ora' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/spfileSBDB.ora' ;
sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfi leSBDB.ora''";
}
executing Memory Script
Starting backup at 20120425 20:37:27
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=196 device type=DISK
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 04/25/2012 20:37:28
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01017: invalid username/password; logon denied
ORA-17629: Cannot connect to the remote database server
continuing other job steps, job failed will not be re-run
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/25/2012 20:37:29
RMAN-03015: error occurred in stored script. Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 04/25/2012 20:37:29
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01017: invalid username/password; logon denied
ORA-17629: Cannot connect to the remote database server
RMAN> exit
Recovery Manager complete.
4)RMAN執行過程中報錯資訊內容
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 04/25/2012 20:37:28
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01017: invalid username/password; logon denied
ORA-17629: Cannot connect to the remote database server
continuing other job steps, job failed will not be re-run
3.問題原因
報錯資訊的確夠直白:“無效的使用者名稱/密碼,禁止登陸”。
這種報錯,直接定格到登陸的那一瞬間,命令如下:
PROD@secdb /home/oracle$ rman target / auxiliary sys/oracle@sbdb
正常理解的,這裡貌似沒有問題,前一部分“target /”表明使用作業系統認證的方式登入PROD資料庫例項,後一半部分“auxiliary sys/oracle@sbdb”表明使用密碼檔案方式進行驗證。並且,命令列提示資訊上顯示也已經成功登陸。因此這個報錯資訊很是詭異。
如果繼續對比這兩部分的登入方式,問題最有可能出現在前一部分,因為使用的是預設行為方式;另外後半部分是天衣無縫的。最終的原因的確出在這裡,在使用Oracle的Active Database Duplicate功能建立物理DataGuard的過程中,連線target資料庫必須“顯式地指定密碼”,即使是使用作業系統認證方式登入。
4.問題處理
原因找到後,處理本身就是水到渠成的事情。
正確的連線方式如下:
$ rman target sys/oracle@prod auxiliary sys/oracle@sbdb
OK,到此問題便完美的處理完畢了,直接執行後續的RMAN命令即可。
5.小結
這個問題處理過程告訴我們DBA一個道理,不要被表面現象所矇蔽,有些提示資訊是直白可信的,但是有些提示資訊需要我們冷靜的思考多種可能的原因,然後再一一嘗試排查,必將有柳暗花明之日。
About Me
...............................................................................................................................
● 本文作者:小麥苗,只專注於資料庫的技術,更注重技術的運用
● 本文在itpub(http://blog.itpub.net/26736162)、部落格園(http://www.cnblogs.com/lhrbest)和個人微信公眾號(xiaomaimiaolhr)上有同步更新
● 本文itpub地址:http://blog.itpub.net/26736162/abstract/1/
● 本文部落格園地址:http://www.cnblogs.com/lhrbest
● 本文pdf版及小麥苗雲盤地址:http://blog.itpub.net/26736162/viewspace-1624453/
● 資料庫筆試面試題庫及解答:http://blog.itpub.net/26736162/viewspace-2134706/
● QQ群:230161599 微信群:私聊
● 聯絡我請加QQ好友(646634621),註明新增緣由
● 於 2017-07-01 09:00 ~ 2017-07-31 22:00 在魔都完成
● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解
● 版權所有,歡迎分享本文,轉載請保留出處
...............................................................................................................................
拿起手機使用微信客戶端掃描下邊的左邊圖片來關注小麥苗的微信公眾號:xiaomaimiaolhr,掃描右邊的二維碼加入小麥苗的QQ群,學習最實用的資料庫技術。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2136553/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-01017:invalid username/password; logon deniedGo
- sqlplus / as sysdba報錯ORA-01017: invalid username/password; logon deniedSQLGo
- RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password;ErrorUXDatabase
- AD Administration error:ORA-01017: invalid username/password; logon deniedErrorGo
- 遠端登入sys使用者報錯:ORA-01017: invalid username/password; logon deniedGo
- SYS使用者遠端登入報錯:ORA-01017: invalid username/password; logon deniedGo
- DG搭建
- 【DG】搭建(一)
- EBS在測試時報 APP-FND-01516: Invalid application username,password,or database.APPDatabase
- 物理DG、邏輯DG和快照DG的搭建(視訊講解)
- DG搭建配置方案
- ora11_node_dg(1)DG搭建過程
- oracle dg報錯Oracle
- ORA-01017: invalid username/password; logon denied ORA-02063: preceding line from TESTGo
- Oracle RAC+DG搭建Oracle
- DG RAC - 單點搭建
- RMAN不停機搭建DG
- 【DG】Oracle 19c使用dbca來搭建物理DGOracle
- 【DG】備庫RMAN還原方式搭建DG(不使用duplicate命令)
- 【DG】Data Guard搭建(physical standby)
- dg搭建 單點-單點
- Oracle DG搭建1(duplicate方式)Oracle
- ORACLE DG 11G 搭建Oracle
- ORA-17629:rman建立 standby資料庫時報錯資料庫
- The password supplied with the username Domain\UserName was not correct. Verify that it was entered ...AI
- RMAN Duplicate FROM ACTIVE DATABASE 建物理DG還原檔案期間報錯ORA-17629處理Database
- oracle 19c dg搭建duplicate過程中報錯Oracle
- DG報錯的處理
- ConfigureGC.pl Reports - Invalid Username/Password. (文件 ID 602750.1)GC
- 【YashanDB資料庫】YAS-02143 invalid username/password, login denied資料庫
- 【DG】DG概念原理詳解
- 11G RAC+DG搭建
- 在dg庫上搭建ogg
- Oracle DG搭建2(冷備方式)Oracle
- 搭建RAC到單例項DG單例
- rman duplicate搭建第二個 dg
- FAILOVER後DG的重新搭建AI
- 【RMAN】使用RMAN的Duplicate功能建立物理DataGuard報錯(ORA-17627、ORA-17629)處理