Home » RDBMS Server » Backup & Recovery » One backup command but RMAN does backup twice?
One backup command but RMAN does backup twice? [message #311463] Fri, 04 April 2008 10:07 Go to next message
Catscratch
Messages: 10
Registered: March 2008
Junior Member
Hi community,

I've got a short question about oracle backup with RMAN.

I'm using a rman-config-file for full database backup.
run {
 allocate channel t1 type disk;
 backup incremental level 0 database 
  format 'c:\temp\dbbackup\4_4_2008_14_6_203.bak' ( database );
 release channel t1;
}


The backup looks fine, but I get the following rman output:
Recovery Manager: Release 11.1.0.6.0 - Production on Fr Apr 4 16:57:34 2008

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

Mit Ziel-Datenbank verbunden: TEST (DBID=1947751245)
Kontrolldatei der Zieldatenbank wird anstelle des Recovery-Katalogs verwendet

RMAN> run { allocate channel t1 type disk; backup incremental level 0 database format 'c:\temp\dbbackup\4_4_2008_14_57_423.bak' ( database ); release channel t1; }
2>
Zugewiesener Kanal: t1
Kanal t1: SID=132 Device-Typ=DISK

Starten backup um 04.04.08
Kanal t1: Backup Set von Datendatei auf inkrementeller Ebene 0 wird begonnen
Kanal t1: Datendateien in Backup Set werden angegeben
Dateinummer der Eingabedatendatei=00001 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\SYSTEM01.DBF
Dateinummer der Eingabedatendatei=00002 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\SYSAUX01.DBF
Dateinummer der Eingabedatendatei=00003 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\UNDOTBS01.DBF
Dateinummer der Eingabedatendatei=00005 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\TESTFILE
Dateinummer der Eingabedatendatei=00004 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\USERS01.DBF
Kanal t1: Piece 1 wird auf 04.04.08 begonnen
Kanal t1: Piece 1 auf 04.04.08 beendet
Piece Handle=C:\TEMP\DBBACKUP\4_4_2008_14_57_423.BAK Tag=TAG20080404T165742 Kommentar=NONE
Kanal t1: Backup Set vollstõndig, abgelaufene Zeit: 00:01:35

Kanal t1: Backup Set von Datendatei auf inkrementeller Ebene 0 wird begonnen
Kanal t1: Datendateien in Backup Set werden angegeben
Dateinummer der Eingabedatendatei=00001 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\SYSTEM01.DBF
Dateinummer der Eingabedatendatei=00002 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\SYSAUX01.DBF
Dateinummer der Eingabedatendatei=00003 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\UNDOTBS01.DBF
Dateinummer der Eingabedatendatei=00005 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\TESTFILE
Dateinummer der Eingabedatendatei=00004 Name=C:\PROGRAMME\ORACLE\ORADATA\TEST\USERS01.DBF
Kanal t1: Piece 1 wird auf 04.04.08 begonnen
Kanal t1: Piece 1 auf 04.04.08 beendet
Piece Handle=C:\PROGRAMME\ORACLE\FLASH_RECOVERY_AREA\TEST\BACKUPSET\2008_04_04\O1_MF_NNND0_TAG20080404T165742_3ZDJL78R_.BKP Tag=TAG20080404T165742 Kommentar=NON
E
Kanal t1: Backup Set vollstõndig, abgelaufene Zeit: 00:02:26
Kanal t1: Backup Set von Datendatei auf inkrementeller Ebene 0 wird begonnen
Kanal t1: Datendateien in Backup Set werden angegeben
Aktuelle Kontrolldatei wird in Backup Set aufgenommen
Aktuelle SPFILE wird in Backup Set aufgenommen
Kanal t1: Piece 1 wird auf 04.04.08 begonnen
Freigegebener Kanal: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: Fehler bei backup Befehl in t1 Kanal auf 04/04/2008 17:01:48
ORA-19504: Datei "C:\TEMP\DBBACKUP\4_4_2008_14_57_423.BAK" kann nicht erzeugt werden
ORA-27038: Erstellt Datei bereits vorhanden
OSD-04010: <create> Option angegeben, Datei ist schon vorhanden

Recovery Manager abgeschlossen.


It looks like oracle is doing the backup twice. On time for the handle (Handle=C:\TEMP\DBBACKUP\4_4_2008_14_57_423.BAK) and one time for (Handle=C:\PROGRAMME\ORACLE\FLASH_RECOVERY_AREA\TEST\BACKUPSET\2008_04_04\O1_MF_NNND0_TAG20080404T165742_3ZDJL78R_.BKP). And at the and rman tells a problem:
Quote:

ORA-19504: Datei "C:\TEMP\DBBACKUP\4_4_2008_14_57_423.BAK" kann nicht erzeugt werden



...means rman couldn't create this file...ok, I think because it's already there. May someone explain me, what rman is doing?

Thanks for help.
Best regards,
Ronny
Re: One backup command but RMAN does backup twice? [message #311471 is a reply to message #311463] Fri, 04 April 2008 10:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It does what you ask it to do:
Quote:
backup incremental level 0 database
format 'c:\temp\dbbackup\4_4_2008_14_6_203.bak' ( database );

Twice database.

Regards
Michel
Re: One backup command but RMAN does backup twice? [message #311839 is a reply to message #311463] Mon, 07 April 2008 02:14 Go to previous messageGo to next message
Catscratch
Messages: 10
Registered: March 2008
Junior Member
Ok thanks.

I was wondering because I've got 2 databases. "Oracle" and "Test" and in the example above rman backups the files .../oradata/test twice. And I thought it should backup .../oradata/oracle on time and .../oradata/test the other time.

But there is still one think I don't understand. Rman creates the specific backupfile after the first backup process and than after the second, it shows the message, that the files already was created. So the second backup process of the second database got lost, right?

Thank you.
Best regards,
Ronny
Re: One backup command but RMAN does backup twice? [message #311847 is a reply to message #311839] Mon, 07 April 2008 02:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I don't know and I don't want to think about it just don't do that and the question vanishes.

Regards
Michel
Re: One backup command but RMAN does backup twice? [message #311849 is a reply to message #311463] Mon, 07 April 2008 02:40 Go to previous messageGo to next message
Catscratch
Messages: 10
Registered: March 2008
Junior Member
Ok, so maybe I've got the wrong understanding of these process. Smile

I will test it a litte bit more. Thanks for your help.

Ronny
Re: One backup command but RMAN does backup twice? [message #311936 is a reply to message #311463] Mon, 07 April 2008 08:10 Go to previous messageGo to next message
Catscratch
Messages: 10
Registered: March 2008
Junior Member
Ok. I got a new problem.

I did a rman backup of a specific tablespace. In my case it is named "test". After this was done, I removed the tablespace "test" and also removed the datafile. Now I created a new tablespace "test" and also chose a new datafile.

Than I startet rman restore/recover for this tablespace with the created backupfile. At this point rman told me, that the datafile (lets call it testdata.dbf) is already there and that I should remove it manually.
Ok, so I removed it and startet restore/recover again. Now rman creates the datafile and than shows the message, that it couldn't restore data, because "all files are write protected, offline or already restored". After this rman started recover and completed it successfully.

But if I connect to this "restored" tablespace, it is still empty.

My aim was to simulate a database crash to test the backupfile. Does somebody have a hint for me please? I actually don't know how to simulate a crash. I can't remove data manually from a tablespace, because oracle logs this in the recovery catalog and don't only use the backupfile. Can I cleanup the recovery catalog, so that oracle don't have more information than the backupfile itself?

Let me ask one other question please: Is it possible to tell rman only to use the "time-point" for recovery which is defined in the backup file?
I mean somethink like: "Dear oracle. Please restore this backupfile (test.bak). But I've no archive logs, so please use the 'time-point' of the backupfile. So only restore the backupfile and make it accessable as database."

Thanks a lot.
Ronny

[Updated on: Mon, 07 April 2008 08:34]

Report message to a moderator

Re: One backup command but RMAN does backup twice? [message #312931 is a reply to message #311463] Thu, 10 April 2008 02:51 Go to previous message
alanm
Messages: 284
Registered: March 2005
Senior Member

hi,

Quote:
In my case it is named "test". After this was done, I removed the tablespace "test" and also removed the datafile. Now I created a new tablespace "test" and also chose a new datafile.



You do not need to carry out this part, the RMAN backup will restore the tablespace. When you do a tablespace restore, do something like

RMAN> run {
sql 'alter tablespace TEST offline immediate';
restore tablespace TEST;
recover tablespace TEST;
sql 'alter tablespace TEST online';
}

hth

Alan
Previous Topic: backup failing giving error, ORA-19502, ORA-27063, Outer dbms_backup_restore.restoreCancel()
Next Topic: restore and recover a RAC, ASM, Cluster 10g Database backup to a filesystem box?
Goto Forum:
  


Current Time: Sat May 11 07:03:55 CDT 2024