Monday, September 18, 2017

ORA-19505: failed to identify file "+DATA/dev1tst/spfiledev1tstp.ora"

I am trying to duplicate database for active dataguard but getting the error below:

Starting backup at 12-SEP-17
released channel: ch1
released channel: ch2
released channel: ch3
released channel: ch4
released channel: ch5
released channel: stby1
released channel: stby2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/12/2017 11:30:19
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ch2 channel at 09/12/2017 11:30:19
ORA-19505: failed to identify file "+DATA/dev1tst/spfiledev1tstp.ora"
ORA-15173: entry 'dev1tst' does not exist in directory '/'

RMAN>


Look at the line in red and blue it holds the answer.

I had a look under $ORACLE_HOME/dbs and tried to find initdev1tstp1.ora file to see the contents and those were +DATA/dev1tst/spfiledev1tstp.ora . When I had a look at the database on primary side its db_unique_name is dev1tstp and that is the directory on ASM as well.

Let me try to explain the message a little bit
ORA-19505: failed to identify file "+DATA/dev1tst/spfiledev1tstp.ora"
ORA-15173: entry 'dev1tst' does not exist in directory '/'

What oracle is trying to inform is that for entry 'dev1tst' there is no such directory under "+DATA", please note that '/' is little misleading here and you could end up looking on file system but actually it was on ASM in my case.

After fixing the init file to the one below, that error disappeared.

[oracle@tser01n01 (dev1tstp1) dbs]$ cat initdev1tstp1.ora
SPFILE='+DATA/dev1tstp/spfiledev1tstp.ora'
[oracle@tser01n01 (dev1tstp1) dbs]$





Friday, August 4, 2017

RMAN-06034: at least 1 channel must be allocated to execute this command

Sometimes we are in hurry and overlook at things or copy paste the scripts and get into all sorts of troubles.

I was trying to speed up the creation of dataguard instance for our huge database and my script was erroring

RMAN-06034: at least 1 channel must be allocated to execute this command

Now what is this I did the things alright but why I am getting the error.

My script was :

RMAN> run {
2> allocate auxiliary channel ch1 type disk;
3> allocate auxiliary channel ch2 type disk;
4> allocate auxiliary channel ch3 type disk;
5> allocate auxiliary channel ch4 type disk;
6> allocate auxiliary channel stby1 type disk;
7> allocate auxiliary channel stby2 type disk;
8> allocate auxiliary channel stby3 type disk;
9> allocate auxiliary channel stby4 type disk;
10> duplicate target database for standby from active database
11> spfile
12> set audit_file_dest='/u01/app/oracle/admin/dev1tstd/adump'
13> set db_unique_name='dev1tstd'
14> set fal_server='dev1tstp1','dev1tstp2'
15> set instance_number='1'
16> NOFILENAMECHECK;
17> }


and error was

Starting backup at 03-AUG-17
released channel: ch1
released channel: ch2
released channel: ch3
released channel: ch4
released channel: stby1
released channel: stby2
released channel: stby3
released channel: stby4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/03/2017 11:41:11
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06034: at least 1 channel must be allocated to execute this command

After having a closer look what I have found the issue. I was only allocating the auxiliary channels and that is what the error was saying as well. So it was fixed by 

run {
allocate channel ch1 type disk;
allocate channel ch2 type disk;
allocate channel ch3 type disk;
allocate channel ch4 type disk;
allocate auxiliary channel stby1 type disk;
allocate auxiliary channel stby2 type disk;
allocate auxiliary channel stby3 type disk;
allocate auxiliary channel stby4 type disk;
duplicate target database for standby from active database
spfile
set audit_file_dest='/u01/app/oracle/admin/dev1tstd/adump'
set db_unique_name='dev1tstd'
set fal_server='dev1tstp1','dev1tstp2'
set instance_number='1'
NOFILENAMECHECK;
}


Allocating more channels definitely helped my creating the dataguard instance much quicker but I still have to test how helpful were those multiple auxiliary channels.