腳本內容:
[oracle@tqzdb003 ~]$ cat dup-2.sh
# clone using RMAN script
$ORACLE_HOME/bin/rman target sys/root*123@TQZ auxiliary sys/rfvgy@TQZDB003 << EOF
run {
duplicate target database to TQZDB003 from active database nofilenamecheck
spfile
parameter_value_convert 'TQZ','tqzdb003'
set db_name='tqzdb003'
set db_unique_name='tqzdb003'
set control_files='/u01/app/oracle/oradata/tqzdb003/control01.ctl','/u01/app/oracle/oradata/tqzdb003/control02.ctl'
set log_file_name_convert='/u01/app/oraqz/oraqzdata/TQZ/redo*','/u01/app/oracle/oradata/tqzdb003/','/u01/oraqzdata/TQZ/arch/','/u01/oradata/tqzdb003/arch/'
set db_file_name_convert='/u01/app/oraqz/oraqzdata/TQZ/*.dbf','/u01/app/oracle/oradata/tqzdb003/', '/u01/app/oraqz/oraqzdata/TQZ/*.ctl','/u01/app/oracle/oradata/tqzdb003/'
set log_archive_dest_1='location="/u01/oradata/tqzdb003/arch/"'
set audit_file_dest='/u01/app/oracle/product/11.2.0/db_home/rdbms/audit'
set diagnostic_dest='/u01/app/oracle'
set sga_target '16G'
set sga_max_size '16G'
set pga_aggregate_target '2G'
set shared_pool_size '800M'
set local_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.100.6.167)(PORT=1521)))'
set remote_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.100.6.167)(PORT=1521)))'
set instance_name 'TQZDB003'
set service_names 'TQZDB003'
set cluster_database 'FALSE'
set utl_file_dir='/usr/tmp','/u01/tqzdb003/tqzdbtmp'
;
}
EOF
克隆 跑跑腳本報錯:
[oracle@tqzdb003 ~]$ sh dup-2.sh
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 11 10:54:27 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: TQZ (DBID=2609219291)
connected to auxiliary database: TQZDB003 (not mounted)
RMAN>
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24>
Starting Duplicate Db at 11-JUL-18
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oraqz/product/11.2.0/dbhome_1/dbs/spfileTQZ.ora' auxiliary format
'/u01/app/oracle/product/11.2.0/db_home/dbs/spfiletqzdb003.ora' ;
sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_home/dbs/spfiletqzdb003.ora''";
}
executing Memory Script
Starting backup at 11-JUL-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=16 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/11/2018 10:54:31
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/11/2018 10:54:31
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>
Recovery Manager complete.
百度了很久 也沒有找到解決的辦法,tnsnames.ora 目標端和源端配置確認沒有問題,請問各位是什么原因?
uj5u.com熱心網友回復:
ORA-17629: Cannot connect to the remote database serverORA-17627: ORA-01017: invalid username/password; logon denied
ORA-17629: Cannot connect to the remote database server
這報的確實是ora錯誤的,建議還是再確認這些
uj5u.com熱心網友回復:
應該還是哪里配置問題,建議去oracle社區看看。“https://community.oracle.com/thread/3940562”
uj5u.com熱心網友回復:
密碼錯誤。那個root*123中的*是密碼中確實的一位?如果是,用\轉義掉吧
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/63565.html
標籤:基礎和管理
上一篇:請教大神如何優化這段SQL,謝謝
