Home » RDBMS Server » Backup & Recovery » Complete Recovery through RMAN
Complete Recovery through RMAN [message #241655] Wed, 30 May 2007 05:43 Go to next message
atif_arl
Messages: 15
Registered: May 2007
Junior Member
No Message Body
Re: Complete Recovery through RMAN [message #241681 is a reply to message #241655] Wed, 30 May 2007 07:04 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
run { restore database; recover database; }

Regards
Michel
Re: Complete Recovery through RMAN [message #241711 is a reply to message #241681] Wed, 30 May 2007 08:19 Go to previous messageGo to next message
atif_arl
Messages: 15
Registered: May 2007
Junior Member
Thank You very much for response.
Basically i new user and want complete script for Taking Backup of whole database from RMAN and then restoring from RMAN Backup.


Regards,
Atif Mahmood
Re: Complete Recovery through RMAN [message #241725 is a reply to message #241711] Wed, 30 May 2007 08:46 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And the many examples in the documentation do not fit your requirements?

Regards
Michel
Re: Complete Recovery through RMAN [message #241761 is a reply to message #241725] Wed, 30 May 2007 10:15 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
full backup with all archivelogs.....us as refrence and for restore go with cadot command.
run
 {
  allocate channel ch1 type disk format '$ESPSVCS_ORABACKUP/%U.bck';
  allocate channel ch2 type disk format '$ESPSVCS_ORABACKUP/%U.bck';
  allocate channel ch3 type disk format '$ESPSVCS_ORABACKUP/%U.bck';
  allocate channel ch4 type disk format '$ESPSVCS_ORABACKUP/%U.bck';
  allocate channel ch5 type disk format '$ESPSVCS_ORABACKUP/%U.bck';
  allocate channel ch6 type disk format '$ESPSVCS_ORABACKUP/%U.bck';
  allocate channel ch7 type disk format '$ESPSVCS_ORABACKUP/%U.bck';
  allocate channel ch8 type disk format '$ESPSVCS_ORABACKUP/%U.bck';
  allocate channel ch9 type disk format '$ESPSVCS_ORABACKUP/%U.bck';
  set limit channel ch1 kbytes 2024800;
  set limit channel ch2 kbytes 2024800;
  set limit channel ch3 kbytes 2024800;
  set limit channel ch4 kbytes 2024800;
  set limit channel ch5 kbytes 2024800;
  set limit channel ch6 kbytes 2024800;
  set limit channel ch7 kbytes 2024800;
  set limit channel ch8 kbytes 2024800;
  set limit channel ch9 kbytes 2024800;
 
backup database;
  sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
  backup archivelog all format '$ESPSVCS_ORABACKUP/al_%U.bck';
  backup current controlfile
  tag = cf1
  format '$ESPSVCS_ORABACKUP/cf_%U.bck';
 }

[Updated on: Wed, 30 May 2007 10:16]

Report message to a moderator

Re: Complete Recovery through RMAN [message #241784 is a reply to message #241761] Wed, 30 May 2007 11:00 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Well, definitive script depends on archived log mode and on Oracle version and on backup policy.

Regards
Michel
Re: Complete Recovery through RMAN [message #241814 is a reply to message #241784] Wed, 30 May 2007 11:56 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
yes.
There is one other thing michel we can use RMAN only in archivelog mode.

Thanks.
Re: Complete Recovery through RMAN [message #241816 is a reply to message #241814] Wed, 30 May 2007 11:58 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
Quote:
There is one other thing michel we can use RMAN only in archivelog mode


Not true - you can only do on-line backups if the DB is in archlog mode.
Re: Complete Recovery through RMAN [message #241819 is a reply to message #241816] Wed, 30 May 2007 12:07 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Frank What do you means by that?
WE cant user rman In noarchivelog mode.That i meant.

[Updated on: Wed, 30 May 2007 12:09]

Report message to a moderator

Re: Complete Recovery through RMAN [message #241820 is a reply to message #241819] Wed, 30 May 2007 12:11 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
You can use RMAN to take offline backups if the DB is in noarchlog mode. Check the manual for details.
Re: Complete Recovery through RMAN [message #241822 is a reply to message #241820] Wed, 30 May 2007 12:13 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
i just check it may be i am wrong but correct me.

RMAN> backup database;

Starting backup at 05-30-2007 05:08:42
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=261 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/30/2007 17:08:45
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

[Updated on: Wed, 30 May 2007 12:13]

Report message to a moderator

Re: Complete Recovery through RMAN [message #241823 is a reply to message #241822] Wed, 30 May 2007 12:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You first have to close the database (startup it in mount state).

Regards
Michel
Re: Complete Recovery through RMAN [message #241826 is a reply to message #241822] Wed, 30 May 2007 12:19 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Quote:
For this reason, RMAN does not allow you to back up a database that has been running in NOARCHIVELOG mode and shut down abnormally because the backup is not usable for recovery.



http://www-css.fnal.gov/dsg/external/oracle_dcm/9iv2/server.920/a96519/backup.htm
Re: Complete Recovery through RMAN [message #241830 is a reply to message #241826] Wed, 30 May 2007 12:24 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
SQL> startup mount
ORACLE instance started.

Total System Global Area  461373440 bytes
Fixed Size                  2128920 bytes
Variable Size             423527400 bytes
Database Buffers           33554432 bytes
Redo Buffers                2162688 bytes
Database mounted.


RMAN> backup database;

Starting backup at 05-30-2007 05:23:21
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=543 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/30/2007 17:23:24
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/30/2007 17:23:25
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 05-30-2007 05:23:26
channel ORA_DISK_1: finished piece 1 at 05-30-2007 05:23:27
piece handle=/opt/oracle/10.2.0/dbs/09ij1l0d_1_1 tag=TAG20070530T172323 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/30/2007 17:23:25
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/30/2007 17:23:24
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode



Please correct me if i am wrong.Thanks

[Updated on: Wed, 30 May 2007 12:26]

Report message to a moderator

Re: Complete Recovery through RMAN [message #241835 is a reply to message #241830] Wed, 30 May 2007 12:48 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> select LOG_MODE from v$database;
LOG_MODE
------------
NOARCHIVELOG

1 row selected.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area  209715200 bytes
Fixed Size                  1289748 bytes
Variable Size             138412524 bytes
Database Buffers           67108864 bytes
Redo Buffers                2904064 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options

D:\Test>rman target /

Recovery Manager: Release 10.2.0.3.0 - Production on Mer. Mai 30 19:46:13 2007

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

connected to target database: MIKA (DBID=1492747861, not open)

RMAN> backup database;

Starting backup at 30/05/2007 19:46:26
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=D:\ORACLE\BASES\MIKA\SYSTEM01.DBF
input datafile fno=00002 name=D:\ORACLE\BASES\MIKA\UNDOTBS01.DBF
input datafile fno=00004 name=D:\ORACLE\BASES\MIKA\TS_D0101.DBF
input datafile fno=00003 name=D:\ORACLE\BASES\MIKA\SYSAUX01.DBF
input datafile fno=00008 name=D:\ORACLE\BASES\MIKA\TEST_8K.DBF
input datafile fno=00009 name=D:\ORACLE\BASES\MIKA\TEST_8K_ASSM.DBF
input datafile fno=00012 name=D:\ORACLE\BASES\MIKA\ORAFAQ.DBF
input datafile fno=00005 name=D:\ORACLE\BASES\MIKA\TS_I0101.DBF
input datafile fno=00011 name=D:\ORACLE\BASES\MIKA\TEST.DBF
channel ORA_DISK_1: starting piece 1 at 30/05/2007 19:46:29
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/30/2007 19:54:15
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 52428800 bytes disk space from 524288000 limit
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00006 name=D:\ORACLE\BASES\MIKA\TEST_2K.DBF
channel ORA_DISK_1: starting piece 1 at 30/05/2007 19:54:16
channel ORA_DISK_1: finished piece 1 at 30/05/2007 19:54:17
piece handle=D:\ORACLE\BASES\FLASH\MIKA\MIKA\BACKUPSET\2007_05_30\O1_MF_NNNDF_TAG20070530T194628_35VGL8DP_.BKP tag=TAG20
070530T194628 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00007 name=D:\ORACLE\BASES\MIKA\TEST_4K.DBF
channel ORA_DISK_1: starting piece 1 at 30/05/2007 19:54:17
channel ORA_DISK_1: finished piece 1 at 30/05/2007 19:54:20
piece handle=D:\ORACLE\BASES\FLASH\MIKA\MIKA\BACKUPSET\2007_05_30\O1_MF_NNNDF_TAG20070530T194628_35VGL9X9_.BKP tag=TAG20
070530T194628 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00010 name=D:\ORACLE\BASES\MIKA\TEST_16K.DBF
channel ORA_DISK_1: starting piece 1 at 30/05/2007 19:54:21
channel ORA_DISK_1: finished piece 1 at 30/05/2007 19:54:22
piece handle=D:\ORACLE\BASES\FLASH\MIKA\MIKA\BACKUPSET\2007_05_30\O1_MF_NNNDF_TAG20070530T194628_35VGLFC7_.BKP tag=TAG20
070530T194628 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 30/05/2007 19:54:25
channel ORA_DISK_1: finished piece 1 at 30/05/2007 19:54:28
piece handle=D:\ORACLE\BASES\FLASH\MIKA\MIKA\BACKUPSET\2007_05_30\O1_MF_NCSNF_TAG20070530T194628_35VGLKSD_.BKP tag=TAG20
070530T194628 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:06
...

Regards
Michel

[Updated on: Wed, 30 May 2007 12:55]

Report message to a moderator

Re: Complete Recovery through RMAN [message #241836 is a reply to message #241835] Wed, 30 May 2007 12:55 Go to previous message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Aww Thanks Michel.
I got it now.
Thanks.again;)
Previous Topic: Script for Cold Backup
Next Topic: recovery catalog
Goto Forum:
  


Current Time: Wed Dec 07 09:08:28 CST 2016

Total time taken to generate the page: 0.11106 seconds