As I mentioned in another post, Oracle doesn’t support data file and archive logs on CIFS filesystem. But with Oracle 19c on Oracle Linux 7, I’ve noticed the things are different than before I had with Oracle 12c on Oracle Linux 6 — Oracle 19c actually can write archive logs to a CIFS share which it would fail with Oracle 12c.
I am not sure if it is because the OS version is higher which has brought the better support or because the new Oracle database version has started to support it secretly. Anyway I was happy with it until I started to build an ODG envrionment using RMAN duplicate.
Duplicate failed at the last stage:
archived log thread=1 sequence=19 dbms_backup_restore.restoreCancel() failed RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of Duplicate Db command at 01/04/2021 23:04:31 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-19662: archived log thread 1 sequence 19 could not be verified ORA-19849: error while reading backup piece from service APROD1 ORA-19510: failed to set size of 51 blocks for file "/dbbackup/19c_backup/PROD2/archivelog/2021_01_04/o1_mf_1_19_hz7wtyqj_.arc" (block size=512) ORA-27044: unable to write the header block of file Linux-x86_64 Error: 13: Permission denied Additional information: 7
I checked the permission on the directory “/dbbackup/19c_backup/PROD2/archivelog/“, nothing seems to be wrong. I am able to read/write with the user “oracle”. The only thing is that it is a CIFS filesystem.
Here is my duplicate command:
DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE DORECOVER SPFILE SET db_unique_name='PROD2' COMMENT 'Is standby' NOFILENAMECHECK;
From the alert log of PROD2, I saw archive log files created and deleted.
2021-01-04T23:04:31.744586-06:00 Deleted Oracle managed file /dbbackup/19c_backup/PROD2/archivelog/2021_01_04/o1_mf_1_19_hz7wtyqj_.arc 2021-01-05T07:43:22.445249-06:00 Deleted Oracle managed file /dbbackup/19c_backup/PROD2/archivelog/2021_01_04/o1_mf_1_201672_hz7wtyoz_.arc 2021-01-05T07:43:22.478432-06:00 Deleted Oracle managed file /dbbackup/19c_backup/PROD2/archivelog/2021_01_04/o1_mf_1_18_hz7wtyp3_.arc
After I created a symbolic link to a non-CIFS filesystem for archivelog, the duplicate succeeded.
Another thing to note is because I have defined DB_RECOVERY_FILE_DEST in my primary, OMF is used for the duplicate when creating online redo logs and standby redo logs. To use a different location than the one specified in DB_RECOVERY_FILE_DEST for online redo logs and standby redo logs, DB_CREATE_ONLINE_LOG_DEST_n needs to be used. In the below example, redo logs are duplexed with DB_CREATE_ONLINE_LOG_DEST_1 and DB_CREATE_ONLINE_LOG_DEST_2.
DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE DORECOVER SPFILE set db_create_online_log_dest_1='/dbase/redoa/PROD' set db_create_online_log_dest_2='/dbase/redob/PROD' SET db_unique_name='PROD2' COMMENT 'Is standby' NOFILENAMECHECK;