Wednesday, November 11, 2015

ORA-39070: Unable to open the log file during expdp in RAC ASM


DB version: 11.2.0.4 RAC 2 node
Os version: RHEL 6

SQL> create directory EXP_DIR as '+FRADG/EXP';

Directory created.

SQL> grant read,write on directory EXP_DIR to sys;

Grant succeeded.

[oracle@oraclehost]$ expdp directory=EXP_DIR dumpfile=STDBY_FULL_metadata.dmp logfile=exp_STDBY_FULL_metadata.logfull=y content=metadata_only

Export: Release 11.2.0.4.0 - Production on Sat Oct 10 23:39:03 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Username: / as sysdba

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation


Solution:

You cannot put logfiles in asm directory so specify another directory for logfile file or use nologfile=y

Ex:
 logfile= EXP: exp_STDBY_FULL_metadata.log    à where ‘EXP’ is directory in my local
 (or)
 Nologfile=y     à This does not create any directory at all

Ref:
DataPump Export (EXPDP) To ASM Directory Fails With Errors ORA-6512 At SYS.UTL_FILE (Doc ID 1464897.1)


ORA-00245: control file backup operation failed during RMAN backup

DB: 11.2.0.4 2 node RAC
OS:  RHEL5

When I’m trying to take FULL Db backup my backup failed and I see the below error message in the logfile


[oracle@oracledev]~/CB> nohup ./bkup.ksh &

released channel: ch2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 08/21/2015 18:02:18

RMAN-03009: failure of backup command on ch2 channel at 08/21/2015 18:00:42
ORA-00245: control file backup operation failed

Recovery Manager complete.

This is the Error Specific to the RACdatabase, you don’t see this in NON-RAC database.
From 11.2.0.2, RMAN fails on RAC when doing controlfile autobackup which is set to DEFAULT (local server location)


Solution:


RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name TEST are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/DBhome1R2/dbs/snapcf_TEST.f'; # default

From the above output we see my snapshot control file  set to the default location, so we need to change to common directory for all the nodes, here I’m using ASM so I’ll set this location to ASM disk group
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/snapcf_TEST.f';

new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/snapcf_TEST.f';
new RMAN configuration parameters are successfully stored


Reference:

ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared location (Doc ID 1472171.1)