Home » Server Options » Data Guard » Error during Real Time apply (10.2.0.3)
Error during Real Time apply [message #504443] Mon, 25 April 2011 06:17 Go to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
Database version:10.2.0.3
OS: Windows

Primary database: PRMDB
Physical Standby database: STANDDB

I am getting this error when applying Redo data on physical standby database.


alter database recover managed standby database using current logfile
Mon Apr 25 15:19:28 2011
Managed Standby Recovery starting Real Time Apply
Mon Apr 25 15:19:28 2011
Errors in file e:\oracle\product\10.2.0\admin\standbydb\bdump\standdb_dbw0_2860.trc:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSTEM01.DBF'
ORA-27086: unable to lock file - already in use
OSD-00002: additional error information
O/S-Error: (OS 32) The process cannot access the file because it is being used by another process.
ORA-27086: unable to lock file - already in use
OSD-00002: additional error information
O/S-Error: (OS 32) The process cannot access the file because it is being used by another process.

Please help me on this issue.
Re: Error during Real Time apply [message #504448 is a reply to message #504443] Mon, 25 April 2011 07:07 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

this mean datafile already using other instance
Re: Error during Real Time apply [message #504450 is a reply to message #504448] Mon, 25 April 2011 07:14 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
please tell me why standby database during Redo apply using datafiles from primary database location.

ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSTEM01.DBF'

Both primary database and standby database are located on same window machine and both have different location.
Re: Error during Real Time apply [message #504454 is a reply to message #504450] Mon, 25 April 2011 08:02 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

>>Both primary database and standby database are located on same window machine and both have different location

Are you sure? If yes. Execute the below command both database & let us know
select name,open_mode from v$database;

select file_name from dba_Data_files;

select name from v$controlfile;

select member from v$logfile;

Re: Error during Real Time apply [message #504480 is a reply to message #504454] Tue, 26 April 2011 00:04 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
on Primary database:
PRMDB> select name,open_mode from v$database;

NAME OPEN_MODE
--------- ----------
PRMDB READ WRITE

PRMDB> select file_name from dba_Data_files;

FILE_NAME
--------------------------------------------------------------------------------

E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\USERS01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSAUX01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\UNDOTBS01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSTEM01.DBF

PRMDB>
PRMDB> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------

E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\CONTROL01.CTL
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\CONTROL02.CTL
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\CONTROL03.CTL

PRMDB>
PRMDB> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------

E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO03A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO03B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO02A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO02B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO01A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO01B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD04A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD04B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD05A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD05B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD06A.LOG

MEMBER
--------------------------------------------------------------------------------

E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD06B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD07A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD07B.LOG

14 rows selected.



On standby database:


STANDDB> select name,open_mode from v$database;

NAME OPEN_MODE
--------- ----------
PRMDB MOUNTED

STANDDB>
STANDDB> select file_name from dba_Data_files;
select file_name from dba_Data_files
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views onl

STANDDB> select name from v$datafile;

NAME
------------------------------------------------------------

E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSTEM01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\UNDOTBS01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSAUX01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\USERS01.DBF

STANDDB>
STANDDB> select name from v$controlfile;

NAME
-----------------------------------------------------------------------

E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\STAND01.CTL

STANDDB>
STANDDB> select member from v$logfile;

MEMBER
-----------------------------------------------------------------------

E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO03A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO03B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO02A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO02B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO01A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\REDO01B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD04A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD04B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD05A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD05B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD06A.LOG

MEMBER
-----------------------------------------------------------------------

E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD06B.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD07A.LOG
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\STD07B.LOG

14 rows selected.

[Updated on: Tue, 26 April 2011 00:10]

Report message to a moderator

Re: Error during Real Time apply [message #504483 is a reply to message #504480] Tue, 26 April 2011 00:34 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

on Primary database:
PRMDB> select name,open_mode from v$database;

NAME OPEN_MODE
--------- ----------
PRMDB READ WRITE

PRMDB> select file_name from dba_Data_files;

FILE_NAME
--------------------------------------------------------------------------------

[b]E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\USERS01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSAUX01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\UNDOTBS01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSTEM01.DBF
[/b]

On standby database:


STANDDB> select name,open_mode from v$database;

NAME OPEN_MODE
--------- ----------
PRMDB MOUNTED

STANDDB>
STANDDB> select file_name from dba_Data_files;
select file_name from dba_Data_files
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views onl

STANDDB> select name from v$datafile;

NAME
------------------------------------------------------------

[b]E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSTEM01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\UNDOTBS01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSAUX01.DBF
E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\USERS01.DBF

[/b]
>>>>Both primary database and standby database are located on same window machine and both have different location

As per your statement both database have different location but we can see both database use same datafile. Don't you realize ?


Re: Error during Real Time apply [message #504486 is a reply to message #504483] Tue, 26 April 2011 00:56 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
yes I know but i don't know why. Will you want me to check some parameter in database.
Re: Error during Real Time apply [message #504491 is a reply to message #504486] Tue, 26 April 2011 02:03 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

While creating controlfile in standby database. change the file destination
Re: Error during Real Time apply [message #504494 is a reply to message #504491] Tue, 26 April 2011 02:22 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
According to Oracle document for physical standby database creation we have to execute this command to create standby controlfile.

ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/boston.ctl';

this above command create binary file and we can not modify this file.

Re: Error during Real Time apply [message #504541 is a reply to message #504494] Tue, 26 April 2011 06:53 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
You say this
Quote:
ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/boston.ctl';

which is a quote from chapter 3 of the 10g Data Guard Concepts and Admin manual? It is much easier if you follow appendix F, and create your standby with RMAN. It gives full details of how to create a standby on the same machine as the primary.

But it looks to me as though your database is only a training system, so why not use 11.2 instead of 10g? Data Guard is much more sophisticated in the current release.
Re: Error during Real Time apply [message #504671 is a reply to message #504541] Wed, 27 April 2011 04:10 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
John as you told me to create Standby database using RMAN.

I tried but getting error at this step.

RMAN> run {
2> set until scn 861981;
3> recover
4> standby
5> clone database
6> delete archivelog
7> ;
8> }

executing command: SET until clause

Starting recover at 27-APR-11
using channel ORA_AUX_DISK_1

starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/27/2011 14:25:38
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database reco
ver if needed
standby start until change 861981
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSTEM01.DBF
'
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRIMARYDB\SYSTEM01.DBF
'

Re: Error during Real Time apply [message #504678 is a reply to message #504671] Wed, 27 April 2011 05:29 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I have no idea what you did, but clearly you did not follow the instructions in appendix F to rename the datafiles.
Re: Error during Real Time apply [message #504682 is a reply to message #504678] Wed, 27 April 2011 05:59 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
For naming the standby database file i have given this two parameter in primary database.

Is this two parameter ok?

*.db_file_name_convert='E:\oracle\product\10.2.0\oradata\primarydb','E:\oracle\product\10.2.0\oradata\standbydb'
*.log_file_name_convert='E:\oracle\product\10.2.0\oradata\primarydb','E:\oracle\product\10.2.0\oradata\standbydb'
Re: Error during Real Time apply [message #504684 is a reply to message #504682] Wed, 27 April 2011 06:17 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Until you
A) read that appendix
B) tell us what you did
C) use the SET NEWNAME command
I'm not replying again.

[update:
I forgot
D) format your posts correctly
]

[Updated on: Wed, 27 April 2011 06:18]

Report message to a moderator

Re: Error during Real Time apply [message #504730 is a reply to message #504684] Wed, 27 April 2011 08:40 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

Quote:
Is this two parameter ok?

*.db_file_name_convert='E:\oracle\product\10.2.0\oradata\primarydb','E:\oracle\product\10.2.0\oradata\standbydb'
*.log_file_name_convert='E:\oracle\product\10.2.0\oradata\primarydb','E:\oracle\product\10.2.0\oradata\standbydb'


Yes both parameter looks good but are you using RMAN DUPLICATION STANDBY DATABASE? If not both parameter useless

Babu

[Updated on: Wed, 27 April 2011 08:41]

Report message to a moderator

Re: Error during Real Time apply [message #505307 is a reply to message #504730] Mon, 02 May 2011 04:21 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
Hi John,

I performed this step to create standby database.

1- My Primary database is already in archive mode.So i skipped archive mode configuration part.
2- Add parameter that is specific to primary database. Such as.

*.fal_client='PRMDB'
*.fal_server='STANDDB'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(PRMDB,STANDDB)'
*.db_file_name_convert=('E:\oracle\product\10.2.0\oradata\PRMDB','E:\oracle\product\10.2.0\oradata\standbydb')
*.log_file_name_convert=('E:\oracle\product\10.2.0\archive\primarydb','E:\oracle\product\10.2.0\archive\standbydb')
*.log_archive_dest_1='LOCATION=E:\oracle\product\10.2.0\archive\primarydb VALID_FOR=(all_logfiles,all_roles) DB_UNIQUE_NAME=PRMDB'
*.log_archive_dest_2='service=" (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=SNSL-137)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=STANDDB)(INSTANCE_NAME=STAN DDB)(SERVER=dedicated))) "',' LGWR ASYNC NOAFFIRM delay=0 OPTIONAL max_failure=0 max_connections=1 reopen=300 db_unique_name="STANDDB" register net_timeout=180 valid_for=(online_logfile,primary_role)'
*.log_archive_dest_3='LOCATION=E:\oracle\product\10.2.0\archive2\primarydb VALID_FOR=(all_logfiles,all_roles) DB_UNIQUE_NAME=PRMDB'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_dest_state_3='ENABLE'
*.log_archive_max_processes=5
*.log_archive_min_succeed_dest=1
*.log_archive_format='ARC%S_%R.%T'
*.STANDBY_FILE_MANAGEMENT='AUTO'

3- Shut it down the primary database and started with new edited Pfile so that change and added parameter reflect.
4- Created spfile from pfile and again started Primary database with spfile.
5- Created directory structure for standby database.
6- Created standby parameter file from primary database pfile with changed directory structures and standby database specific parameters.

*.fal_client='STANDDB'
*.fal_server='PRMDB'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(PRMDB,STANDDB)'
*.log_archive_dest_1='LOCATION=E:\oracle\product\10.2.0\archive\standbydb VALID_FOR=(all_logfiles,all_roles) DB_UNIQUE_NAME=STANDDB'
*.log_archive_dest_2='service=" (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=SNSL-137)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PRMDB)(INSTANCE_NAME=PRMDB) (SERVER=dedicated))) "',' LGWR ASYNC NOAFFIRM delay=0 OPTIONAL max_failure=0 max_connections=1 reopen=300 db_unique_name="PRMDB" register net_timeout=180 valid_for=(online_logfile,primary_role)'
*.log_archive_dest_3='LOCATION=E:\oracle\product\10.2.0\archive2\standbydb VALID_FOR=(all_logfiles,all_roles) DB_UNIQUE_NAME=STANDDB'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_dest_state_3='ENABLE'
*.log_archive_format='ARC%S_%R.%T'
*.log_archive_max_processes=5
*.log_archive_min_succeed_dest=1
*.log_file_name_convert='E:\oracle\product\10.2.0\archive\standbydb','E:\oracle\product\10.2.0\archive\primarydb'
*.db_file_name_convert='E:\oracle\product\10.2.0\oradata\standbydb','E:\oracle\product\10.2.0\oradata\PRMDB'

7- Create password file for standby database with ORAPWD.
8- Created windows service for stanby database with oradim.
9- Started standby database in nomount state.
10- Connected to target database with recovery catalog.

rman target / catalog=rmanadmin/rmanadmin@TESTDB

and taken backup

run {
allocate channel c1 type disk;
backup format 'E:\oracle\product\10.2.0\backup\PRMDB\DataFile_t%t_s%s_p%p' database;
backup current controlfile for standby format 'E:\oracle\product\10.2.0\backup\PRMDB\sby_t%t_s%s_p%p';
sql 'alter system archive log current';
backup format 'E:\oracle\product\10.2.0\backup\PRMDB\ArhAll_t%t_s%s_p%p' archivelog all;
release channel c1;
}

11- Tried to Duplicate primary database but getting error.

rman target / catalog=rmanadmin/rmanadmin@auxiliary=sys/ski4now@STANDDB

Recovery Manager: Release 10.2.0.3.0 - Production on Mon May 2 12:40:56 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: PRMDB (DBID=339707781)
connected to recovery catalog database
connected to auxiliary database: PRMDB (not mounted)

RMAN> RUN {
2> allocate channel C1 device type disk;
3> allocate auxiliary channel C2 device type disk;
4> duplicate target database for standby nofilenamecheck dorecover;
5> }

allocated channel: C1
channel C1: sid=294 devtype=DISK

allocated channel: C2
channel C2: sid=211 devtype=DISK

Starting Duplicate Db at 02-MAY-11

contents of Memory Script:
{
set until scn 586058;
restore clone standby controlfile;
sql clone 'alter database mount standby database';
}
executing Memory Script

executing command: SET until clause

Starting restore at 02-MAY-11

channel C2: starting datafile backupset restore
channel C2: restoring control file
channel C2: reading from backup piece E:\ORACLE\PRODUCT\10.2.0\BACKUP\PRMDB\SBY_
T750081902_S4_P1
channel C2: restored backup piece 1
piece handle=E:\ORACLE\PRODUCT\10.2.0\BACKUP\PRMDB\SBY_T750081902_S4_P1 tag=TAG2
0110502T120502
channel C2: restore complete, elapsed time: 00:00:05
output filename=E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\CONTROL01.CTL
output filename=E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\CONTROL02.CTL
output filename=E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\CONTROL03.CTL
Finished restore at 02-MAY-11

sql statement: alter database mount standby database

contents of Memory Script:
{
set until scn 586058;
set newname for tempfile 1 to
"E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\TEMP01.DBF";
switch clone tempfile all;
set newname for datafile 1 to
"E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\SYSTEM01.DBF";
set newname for datafile 2 to
"E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\UNDOTBS01.DBF";
set newname for datafile 3 to
"E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\SYSAUX01.DBF";
set newname for datafile 4 to
"E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\USERS01.DBF";
restore
check readonly
clone database
;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

renamed temporary file 1 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\TEMP01.DBF in
control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 02-MAY-11

channel C2: starting datafile backupset restore
channel C2: specifying datafile(s) to restore from backup set
restoring datafile 00001 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\SYSTEM01.DBF
restoring datafile 00002 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\UNDOTBS01.DBF

restoring datafile 00003 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\SYSAUX01.DBF
restoring datafile 00004 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\USERS01.DBF
channel C2: reading from backup piece E:\ORACLE\PRODUCT\10.2.0\BACKUP\PRMDB\DATA
FILE_T750081849_S2_P1
ORA-19870: error reading backup piece E:\ORACLE\PRODUCT\10.2.0\BACKUP\PRMDB\DATA
FILE_T750081849_S2_P1
ORA-19504: failed to create file "E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\SYSTEM0
1.DBF"
ORA-27086: unable to lock file - already in use
OSD-00002: additional error information
O/S-Error: (OS 32) The process cannot access the file because it is being used b
y another process.
failover to previous backup

released channel: C1
released channel: C2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 05/02/2011 12:42:45
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN> exit


Recovery Manager complete.

12- After this error i manually executed each step to duplicate database because in SET NEWNAME it is taking Primary database location.

RMAN> run {
2> set until scn 586058;
3> restore clone standby controlfile;
4> sql clone 'alter database mount standby database';
5> }

executing command: SET until clause

Starting restore at 02-MAY-11
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=211 devtype=DISK

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece E:\ORACLE\PRODUCT\10.2.0\BACKU
P\PRMDB\SBY_T750081902_S4_P1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=E:\ORACLE\PRODUCT\10.2.0\BACKUP\PRMDB\SBY_T750081902_S4_P1 tag=TAG2
0110502T120502
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04
output filename=E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\CONTROL01.CTL
output filename=E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\CONTROL02.CTL
output filename=E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\CONTROL03.CTL
Finished restore at 02-MAY-11

sql statement: alter database mount standby database

RMAN> run {
2> set until scn 586058;
3> set newname for tempfile 1 to
4> "E:\ORACLE\PRODUCT\10.2.0\ORADATA\standbydb\TEMP01.DBF";
5> switch clone tempfile all;
6> set newname for datafile 1 to
7> "E:\ORACLE\PRODUCT\10.2.0\ORADATA\standbydb\SYSTEM01.DBF";
8> set newname for datafile 2 to
9> "E:\ORACLE\PRODUCT\10.2.0\ORADATA\standbydb\UNDOTBS01.DBF";
10> set newname for datafile 3 to
11> "E:\ORACLE\PRODUCT\10.2.0\ORADATA\standbydb\SYSAUX01.DBF";
12> set newname for datafile 4 to
13> "E:\ORACLE\PRODUCT\10.2.0\ORADATA\standbydb\USERS01.DBF";
14> restore
15> check readonly
16> clone database
17> ;
18> }

executing command: SET until clause

executing command: SET NEWNAME

released channel: ORA_AUX_DISK_1
renamed temporary file 1 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\standbydb\TEMP01.DB
F in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 02-MAY-11
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=213 devtype=DISK

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\SYSTEM01.
DBF
restoring datafile 00002 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\UNDOTBS01
.DBF
restoring datafile 00003 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\SYSAUX01.
DBF
restoring datafile 00004 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBYDB\USERS01.D
BF
channel ORA_AUX_DISK_1: reading from backup piece E:\ORACLE\PRODUCT\10.2.0\BACKU
P\PRMDB\DATAFILE_T750081849_S2_P1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=E:\ORACLE\PRODUCT\10.2.0\BACKUP\PRMDB\DATAFILE_T750081849_S2_P1 tag
=TAG20110502T120409
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 02-MAY-11

RMAN> run {
2> switch clone datafile all;
3> }


RMAN> run {
2> set until scn 586058;
3> recover
4> standby
5> clone database
6> delete archivelog
7> ;
8> }

executing command: SET until clause

Starting recover at 02-MAY-11
using channel ORA_AUX_DISK_1

starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/02/2011 12:50:59
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database reco
ver if needed
standby start until change 586058
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\SYSTEM01.DBF'
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\SYSTEM01.DBF'


But getting same error.

John I mentioned every step that i have done. Please check it and tell me if i missed anything or i have done anything wrong.

Thanks.

[Updated on: Mon, 02 May 2011 04:25]

Report message to a moderator

Re: Error during Real Time apply [message #505316 is a reply to message #505307] Mon, 02 May 2011 06:37 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I asked you to format your posts correctly, and you have refused to do it. Goodbye.
Re: Error during Real Time apply [message #505317 is a reply to message #505316] Mon, 02 May 2011 06:41 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
Thanks for your help.
Re: Error during Real Time apply [message #505457 is a reply to message #505317] Tue, 03 May 2011 04:08 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
I am to resolve issue after changing parameter DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT.

Now getting new issue when i passed below command on Primary database to verify data guard setup.

alter system archive log current

Error:

PRMDB> alter system archive log current;
alter system archive log current
*
ERROR at line 1:
ORA-00314: log of thread , expected sequence# doesn't match


After that my Primary database is down and giving error When i am trying to start the Primary database:

Error:
PRMDB> startup
ORACLE instance started.

Total System Global Area 612368384 bytes
Fixed Size 1292036 bytes
Variable Size 192940284 bytes
Database Buffers 411041792 bytes
Redo Buffers 7094272 bytes
Database mounted.
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1:
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01B.LOG'
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1:
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01A.L
OG'

Alert log message reagrding this error:

Database mounted in Exclusive Mode
Completed: ALTER DATABASE MOUNT
Tue May 03 14:12:15 2011
ALTER DATABASE OPEN
Tue May 03 14:12:15 2011
Beginning crash recovery of 1 threads
parallel recovery started with 2 processes
Tue May 03 14:12:16 2011
Started redo scan
Tue May 03 14:12:16 2011
Errors in file e:\oracle\product\10.2.0\admin\prmdb\udump\prmdb_ora_1720.trc:
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01B.LOG'
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01A.LOG'

Tue May 03 14:12:16 2011
Aborting crash recovery due to error 314
Tue May 03 14:12:16 2011
Errors in file e:\oracle\product\10.2.0\admin\prmdb\udump\prmdb_ora_1720.trc:
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01B.LOG'
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01A.LOG'

ORA-314 signalled during: ALTER DATABASE OPEN...
Tue May 03 14:27:13 2011
db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Tue May 03 14:31:33 2011
alter database open
Tue May 03 14:31:33 2011
Beginning crash recovery of 1 threads
parallel recovery started with 2 processes
Tue May 03 14:31:34 2011
Started redo scan
Tue May 03 14:31:34 2011
Errors in file e:\oracle\product\10.2.0\admin\prmdb\udump\prmdb_ora_1720.trc:
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01B.LOG'
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01A.LOG'

Tue May 03 14:31:34 2011
Aborting crash recovery due to error 314
Tue May 03 14:31:34 2011
Errors in file e:\oracle\product\10.2.0\admin\prmdb\udump\prmdb_ora_1720.trc:
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01B.LOG'
ORA-00314: log 1 of thread 1, expected sequence# 14 doesn't match 0
ORA-00312: online log 1 thread 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\PRMDB\REDO01A.LOG'

ORA-314 signalled during: alter database open..
.



Re: Error during Real Time apply [message #513335 is a reply to message #505457] Sun, 26 June 2011 21:42 Go to previous message
luluxiu
Messages: 1
Registered: June 2011
Location: New York
Junior Member
It is easy, in accordance with Appendix F, and if you create your RMAN backup. It shows how to create one in the same computer as the primary backup all the details. But it seems I like your database is just a training system, so why not use 11.2 instead of 10g?
  • Attachment: undecided.gif
    (Size: 1.38KB, Downloaded 1324 times)
Previous Topic: Adding Control file after switching Standby role
Next Topic: Mode in Data Guard (split from hijacked thread)
Goto Forum:
  


Current Time: Thu Mar 28 13:57:54 CDT 2024