Oracle

XỬ LÝ LỖI ORA-27086: unable to lock file – already in use khi DUPLICATE Oracle Database

XỬ LÝ LỖI ORA-27086: unable to lock file – already in use khi DUPLICATE Oracle Database

 

Một bạn nhờ tôi hỗ trợ vì gặp lỗi trong quá trình thực hiện Duplicate database Oracle 19c sử dụng RMAN

1. Thông tin thực hiện như sau

  • Database nguồn: TALENTCDB (sử dụng kiến trúc Multitenant)
  • Database đích: DEV
  • Mục tiêu: Muốn nhân bản Database nguồn sang Database đích

2. Câu lệnh duplicate đang sử dụng

run {
DUPLICATE DATABASE TO dev PLUGGABLE DATABASE pdbketoan from active database
spfile
parameter_value_convert ‘talentcdb’, ‘dev’
SET DB_name=’dev’
SET DB_UNIQUE_NAME=’dev’
set db_create_file_dest=’/data’
set SGA_TARGET ‘1G’;
}

  • Thông tin lỗi

Oracle instance shut down
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 05/12/2021 11:31:27
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
ORA-19660: some files in the backup set could not be verified
ORA-19661: datafile 0 could not be verified
ORA-19849: error while reading backup piece from service talentcdb
ORA-19504: failed to create file “/data/TALENTCDB/controlfile/o1_mf_j2wl7d68_.ctl”
ORA-27086: unable to lock file – already in use
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 8
Additional information: 2120

3. Phương án xử lý

Thêm option chỉ định rõ đường dẫn Control file trong lệnh Duplicate

run {
DUPLICATE DATABASE TO dev PLUGGABLE DATABASE pdbketoan from active database
spfile
parameter_value_convert ‘talentcdb’, ‘dev’
SET DB_name=’dev’
SET DB_UNIQUE_NAME=’dev’
set control_files=’/data/control01.ct’
set db_create_file_dest=’/2> 3> 4> 5> 6> 7> 8> data/dup’
set SGA_TARGET ‘1G’;
}

Leave a Reply

avatar
  Subscribe  
Notify of