Testing Rman Backup
Im testing my Rman backup.
We do our backup with the following command:
BACKUP AS COPY DATABASE TAG = 'Full Copy 2007/03/11 19:15:02';
On another machine, im testing the recovery like the following:
rman TARGET / NOCATALOG
startup nomount;
SET DBID my_bd_id;
RESTORE CONTROLFILE FROM '/mnt/jukprod_rman/rman_backup/20070311/c-3976015942-20070311-00';
alter database mount;
RESTORE DATABASE UNTIL TIME "TO_DATE('20070311 21:35:00','YYYYMMDD HH24:MI:SS')" PREVIEW;
Problem:
Rman wants 2 months of archive logs!!
no backup of log thread 1 seq 80017 lowscn 10641963078 found to restore
To
no backup of log thread 1 seq 85592 lowscn 13248466314 found to restore
That is 5575 archive logs that Rman needs. 100 Megs in size.
so Rman needs 557 gig of archive!
Whats wrong here?
How come Rman needs all those archive?
Why would rman need archive older that the backup since we did a backup as copy?
We want full backup with not need older archive logs.
Hi,
I don't think that BACKUP AS COPY is a real backup for future RESTORE command. May be you could use this statement for next commands:
BACKUP DATAFILECOPY
SWITCH DATAFILE TO
For good backup strategy you have to use statement like
BACKUP DATABASE INCREMENTAL LEVEL=0 PLUS ARCHIVELOG DELETE INPUT;
or simply
BACKUP DATABASE.
Than you have many old backups and you would like to restore in point of past
you have to use SET command.
If you use COPY of datafiles you have to do next:
restore spfile;
startup nomount
run{
set newname for_all_datafile_to_copy;
RESTORE CONTROLFILE FROM '/mnt/jukprod_rman/rman_backup/20070311/c-3976015942-20070311-00';
alter database mount;
switch all;
recover database;
open resetlogs;
Sergey
Similar Messages
-
Hi,
We are running 24X7 systems and we take backup through RMAN.
I want to test my backups are working or not.
How can I do that.
Regards
MMUrestore validate database would be handy in your case.
When the above is issued, RMAN doesn't touch the live datafiles, it uses the previous valid backupsets to validate whether they are good enough for restore and recovery.
However, restoring on another host, will helpful to guage the restore and recovery timing.
Jaffar -
Hello Guys
I was testing rman backup on oracle 11g rel2 , logging time for backup using rman as in 2 ways 1) full database backup
2)full database backup /parallel feature say "section size 200M" in script
i was expecting due to new 11g feature option 2 should complete faster ,but its reverse without using this feature
its running more fast (completing by 4-5 minutes less time)
I also tried taking backup of 1 datafile or 1 tablespace using both the option and also placing backupsets
on different folders/mountpoints ,but result is same
if you had worked on this feature ,please give details what is benefit of using this feature,i can see disadvantage here
Thanks804719 wrote:
so without section size this operation is not actually parallelYes, it's not parallel for datafile, but it parallel for the entire job.
You can analyze the backup log. It should contains the records about opening several channels simultaneously, for instance:
Starting backup at 26/04/12 23:14:19
channel tape1: starting full datafile backup set
channel tape1: specifying datafile(s) in backup set
input datafile file number=00049 name=/home/oracle/oradata/...
channel tape1: starting piece 1 at 26/04/12 23:14:21
channel tape2: starting full datafile backup set
channel tape2: specifying datafile(s) in backup set
input datafile file number=00050 name=/home/oracle/oradata/...
channel tape2: starting piece 1 at 26/04/12 23:14:22
channel tape3: starting full datafile backup set
channel tape3: specifying datafile(s) in backup set
All within 3 seconds, and working in parallel... -
AIX R 2
Oracle: 10.2.0.4
I have been testing rman backup strategies on a db in noarchivelog (development) using the following command:
(*) note: if db is in noarchivelog then you must do a cold backup - have the db mounted but not opened.
rman> backup database format '/a010/d01/bck/%U'
I have found that rman will backup to disk about 2GB per minute. Now I want to test this to tape to compare metrics.
Question: What configurations does RMAN need to write directly to tape?
What are the backup steps to write to tape? Do I need to specify both the tape channel and also where the format output gets written?
Thanks all.OK
You need to install the Oracle driver for Tivoli (optionally sold with Tivoli) and install that in your Oracle software tree.
Then you can configure your channels to write to tape (this is documented).
For the rest there is no difference, although there are no directory names.
Sybrand Bakker
Senior Oracle DBA -
ORA-01858 error in RMAN during backup backupset format '/test/rman/%U'
Hello!
I am trying to perform bacup using command
RMAN> backup backupset completed after 'sysdate-1' format '/tmp/test/%U';
as described in:
asmcmd scripts
All backupsets are copied to /tmp/test/.
Everything is going fine except the last message from RMAN:
input backupset count=5342 stamp=660348635 creation_time=17-JUL-08
channel ORA_DISK_1: starting piece 1 at 18-JUL-08
piece handle=/tmp/test/6ujlo7mr_1_2 comment=NONE
channel ORA_DISK_1: finished piece 1 at 18-JUL-08
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
input backupset count=5343 stamp=660348722 creation_time=17-JUL-08
channel ORA_DISK_1: starting piece 1 at 18-JUL-08
piece handle=/tmp/test/6vjlo7pi_1_2 comment=NONE
channel ORA_DISK_1: finished piece 1 at 18-JUL-08
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
input backupset count=5344 stamp=660348810 creation_time=17-JUL-08
channel ORA_DISK_1: starting piece 1 at 18-JUL-08
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/18/2008 10:59:48
ORA-01858: a non-numeric character was found where a numeric was expected
I suspect that rman is performing, at the end of backup, some internal work (store something in control file based catalog or so) and catches ORA-01858.
The destination catalog is local catalog (not nfs mounted remote dir).
RMAN is spawned from the same node the Oracle Database is running on.
I tested it on two servers.
Error occurs on both of them:
version 10g (ia-32) - flash recovery area on filesystem
and version 11g (Aix) - flash on ASM
RMAN-oracle10> show all ;
using target database controlfile instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
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 ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/10gSE/dbs/snap_dbname.dbf'; # default
RMAN-oracle11> show all ;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name O2DB are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
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 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.1.0/dbname_1/dbs/snapcf_dbname.f';
How to diagnose the problem?
How check what RMAN is exactly doing when error occurs?
Or maybe there is better way to achieve this:
I want to move backupset from asm realm to remote server without storing them on local, non asm disk.
Any suggestions kindly welcome!
Thanx!Solution:
NLS_DATE_FORMAT mus be set mannualy;
export NLS_DATE_FORMAT='YYYY_MM_DD'
solved the problem..
https://metalink.oracle.com/metalink/plsql/f?p=130:15:12788270042070262572::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,6198368,1,1,1,helvetica
Metalinking before posting is the rule of thumb : ) -
RMAN backup testing using networker and NMO
I want to do some RMAN backup testing using networker 7.5 and NMO 5.0. I am doing these testing on VMware. I am not sure whether I need to buy some tape drive for my home PC to do backup testing or I can mimic hard drive as tape drive in VMWARE.
Do you have any idea? any suggestion please?
Thanks..I think this is not a RMAN/Oracle issue, as soon as you configure networker MML it's up to networker to define the real backup destination behind. Maybe networker has also a 'fake' tape destination,but I don't know this. There's a networker forum:
http://www.tek-tips.com/threadminder.cfm?pid=480
Werner -
Test RMAN consistent "as copy" backup outside of ASM (RAC)
Hi!
We have create RMAN consistent backup in our RAC (ASM with FRA) environement.
Backup steps looks like:
alter system set cluster_database=false scope=spfile sid='HAC4';
srvctl stop database -d HACThen we start RMAN backup script like (database is shut downed before):
run {
startup mount;
allocate channel t1 type disk format '/u01/rman_backup/HAC/cold_backup/HAC_%U';
allocate channel t2 type disk format '/u01/rman_backup/HAC/cold_backup/HAC_%U';
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/rman_backup/HAC/cold_backup/HAC_%F_ctl';
backup as copy database include current controlfile;
}After backup we perform:
alter system set cluster_database=true scope=spfile sid='HAC4';
shutdown immediate;and later
srvctl start database -d HACBackup files from this backup are placed on local disk area accessed by node4, where HAC4 SID is on.
We transfer those backup files to tape on some schedule basis...
Now we want to test this backup.
Scenario:
Because we have consistent backup we think that we can perform restore from it (from that disk files) and from it ONLY!
Our problem is that all the time restore is using ASM files, so we are not sure is our backup valid.
So, how to prevent RMAN restore/recover process from using any ASM file - just to use our consistent backup data?
Please some script example for that....
Our config:
Oracle 10gR2.0.4 PS3 (CRS, ASM, database)
Linux Rhel 5.3 IA64 on "raw devices" (not raw disks)
THX
DamirWe'll...look this restore for our "as copy" consitent backup. Assume that ${BKUP_DEST} is env variable in bash script which points to same place where backup was done. Here is restore part:
run {
startup force nomount;
RESTORE CONTROLFILE from '${BKUP_DEST}/HAC_20090916T152408_u5kpd8le_1_1_post_ctl';
alter database mount;
sql "alter session set NLS_DATE_LANGUAGE=American";
allocate channel t1 type disk format '${BKUP_DEST}/HAC_%U';
allocate channel t2 type disk format '${BKUP_DEST}/HAC_%U';
restore database FROM TAG='TAG20090916T152532' ;
release channel t1;
release channel t2;
}where
TAG='TAG20090916T152532'is tag that was done in backup. This is done from "ac copy" backup. But when we run:
run {
allocate channel t1 type disk format '${BKUP_DEST}/HAC_%U';
allocate channel t2 type disk format '${BKUP_DEST}/HAC_%U';
recover database FROM TAG='TAG20090916T152532' ;
release channel t1;
release channel t2;
}RMAN is using archive logs from ASM....and we want to use only files from "as copy" backup-remember we test "as copy" consistent backup.
If we do not run "recover" part then we cannot open database!?
(i.e. alter database open resetlogs).
Hope now is all more clear..
Regards,
Damir
P.S.
Either our backup script is not OK or restore/recover script is bad....
Unfortunatelly we do not know what? -
Can not recover table from rman backup
For testing I want to recover deleted table from rman backup.
I have make vm of oracle 11g. the following step i have applied but could not recover the table.
rman> backup database ;
On sqlplus create login as scott/tiger
create table scott.emp1(col1 varchar2(10));
insert into emp1(col1) value('Yasir ') ;
commit ;
select * from emp1 ;
it shows me one row successfully.
Now i have login the sys as sysdba
sqlplus> alter system switch logfile ;
after this i have drop the table .
Now to recover the table i have restored database on same vm.
rman>restore database ;
rman> recover database ;
rman> alter database open ;
on sqlplus i have issued
sqlplus> select * from scott.emp1 ;
table or view does not exist.
any help how to recover the deleted table from rman backupHi,
Check this test case
SQL> create table TEST2 as select * from emp;
Table created.
SQL> select count(*) from TEST2;
COUNT(*)
15
SQL> select TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS') from dual;
TO_CHAR(SYSDATE,'DD-
10-SEP-2013 10:57:05
SQL> alter system switch logfile;
System altered.
SQL> drop table TEST2 purge;
Table dropped.
SQL> shu immediate
[oracle@vnode MYSHELL]$ rman target /
Recovery Manager: Release 11.2.0.2.0 - Production on Tue Sep 10 10:58:39 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: DDTEST (DBID=1667776968, not open)
RMAN> run{
set until time "to_date('2013 Sep 10 10:57','yyyy mon dd hh24:mi')";
restore database;
recover database;
alter database open resetlogs;
}2> 3> 4> 5> 6>
media recovery complete, elapsed time: 00:00:02
Finished recover at 10-SEP-13
database opened
RMAN> exit
SQL> set lin 200 pages 100
SQL> select count(*) from test2;
COUNT(*)
15
HTH -
NEW 9I RMAN: BACKUP OPTIMIZATION AND RETENTION POLICIES
제품 : RMAN
작성날짜 : 2004-05-20
NEW 9I RMAN: BACKUP OPTIMIZATION AND RETENTION POLICIES
=======================================================
오라클 9i RMAN 에서는 백업을 보다 효율적으로 할 수 있는 기능을 보강 했다.
지금 소개할 "Retention Policies" 기능을 통해서 보다 효율적인 RMAN 백업
전략을 세울 수 있다.
1. 백업 화일 최적화 방법 (Backup File Optimization)
백업 화일 최적화란 백업에 소요되는 공간을 최소화 하는 전략이다. RMAN
백업시에 같은 정보 (dbid, checkpoint, and resetlogs data 등등) 를 가지고 있는
화일이 이미 존재하는 백업 셋 내부에 있는지 체크하게 된다. 만일 같은 화일이
이미 백업 되어 있다면 BACK UP 명령은 해당 화일에 대해서는 백업을 하지 않게
된다.
이때 같은 화일이라고 판단하는 기준은 다음과 같다.
* Datafile: 같은 DBID, checkpoint SCN, resetlogs SCN 과 time. 데이타 화일은
반드시정상적으로 offline 되었거나, read-only 이거나, 또는 정상적 으로 close
되어야 함.
* Archived redo log: 같은 thread, sequence number, 그리고 같은 Resetlogs
SCN 과 time.
* Backup Set: 같은 Backup Set recid 와 stamp.
RMAN 이 백업을 수행하다가 위와 같은 조건의 화일이 이미 존재함을 확인하면
이것은 건너뛰게 될 화일의 대상이다. 하지만 이때 바로 Skip 을 결정하지 않고
정해진 Retention Policies 를 조사 한후에 Skip 여부를 결정 하게 된다.
만일 백업 명령에 DELETE INPUT option 이 사용되면 RMAN 은 백업이 Skip
되어도 화일을 지우게 된다.
RMAN 은 모든 화일에 대한 백업이 Skip 되어도 에러메시지나 경고를 보내지
않는다.
그러나 만일 데이터 화일에 대한 백업이 recovery policy window 보다 오래
된 것 이면 RMAN 은 새로운 백업 화일을 만들기 위해서 화일을 백업 하게 된다.
Note:
자체적인 expirations policy 를 가지고 있는 media manager 를 사용할 경우에는
이런 백업 최적화 정책을 사용하는 것에 신중을 기해야 한다.
백업 최적화 를 사용하기 위해서는 CONFIGURE 명령을 사용한다. CONFIGURE
명령은 명령 수행 이후에 이루어지는 모든 백업에 대해 적용이 된다.
예:
CONFIGURE BACKUP OPTIMIZATION ON; # default 는 OFF
2. Backup Optimization에 Retention Policies 적용 하기
Retention Policy 로 백업 최적화를 조절 할 수 있다. 그러나 retention policy를
사용하지 않기 위해서는 'CONFIGURE RETENTION POLICY TO NONE' 을
이용해서 명시적으로 retention policy를 사용하지 않는다고 해야 한다. 디폴트로
REDUNDANCY = 1 이 적용 된다.
a. Recovery Window 를 이용한 Backup Optimization
만일 백업 최적화가 enable 되어 있고 Recovery Window 가 retention policy
적용을 위해서 셋업 되어 있으면 RMAN 은 항상 가장 최근의 백업이 Recovery
Window 보다 오래된 데이터 화일을 백업한다.
예를 들면 다음과 같은 조건에서
o Today is February 21.
o The recovery window is 7 days.
o The most recent backup of tablespace tbs2 to tape is January 3.
o Tablespace tbs2 is read-only.
2월 21일에 tbs2 테이블 스페이스를 테이프로 백업을 하라는 명령을 내리면,
RMAN 은 이 화일이 1월3일 이후에 변경 사항이 없는데도 불구 하고 백업을 하게
된다. 이로써 RMAN 은 최근 7일 동안에 최소한 한번의 백업이 있어야 된다는
조건을 지키게 된다.
이러한 작동 방식은 media manager 가 오래된 테잎을 제거 해도 되도록 한다.
그렇지 않다면, media manager 는 1월 3일의 백업을 무한정 가지고 있게 된다.
2월 21일에 tbs2 테이블 스페이스의 보다 최근의 백업을 만듦으로 써, RMAN 은
media manager 가 1월 3일에 백업 했던 테입을 지워도 되도록 한다.
b. Redundancy 를 이용한 Backup Optimization
Retention policy 로 Redundancy 를 채택 한 경우에 RMAN 은 Redundancy
에 1을 더한 갯수를 초과하는 오프라인 또는 읽기 전용 화일의 백업을 건너뛴다.
이때 'CONFIGURE RETENTION POLICY TO REDUNDANCY n' 명령어로
Redundancy의 갯수를 정한다.
아래와 같은 백업 최적화 명령을 내린 경우를 예로 든다:
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
아카이브 테이블스페이스를 한번도 백업을 받은적이 없고 다음의 작업을 1주일
동안 한다고 하자.
Day Action Result Redundant Backup
Monday Take tablespace archive offline clean.
Tuesday Run BACKUP DATABASE. The archive tablespace is backed up.
Wednesday Run BACKUP DATABASE. The archive tablespace is backed up.
Thursday Run BACKUP DATABASE. The archive tablespace is backed up. Tuesday backup.
Friday Run BACKUP DATABASE. n/a Tuesday backup.
Saturday Run BACKUP DATABASE. n/a Tuesday backup.
Sunday Run DELETE OBSOLETE. The Tuesday backup is deleted.
Monday Run BACKUP DATABASE. The archive tablespace is backed up. Wednesday backup.
화요일, 수요일, 그리고 목요일의 백업은 아카이브 테이블 스페이스를 복사 해서
3개의 백업이 반드시 존재 해야 한다는 조건을 충촉 시킨다. (1+Redundancy)
금요일과 토요일에는 백업 최적화 조건에 의해서 아카이브 테이블 스페이스를
복사하지 않게 된다.
RMAN 은 일요일에는 유효기간이 지난 백업 화일을 지우게 된다. 따라서 화요일에
만든 백업은 삭제 된다. 월요일의 전체 백업은 3개의 백업이 존재 해야 한다는 조건
때문에 아카이브 테이블 스페이스를 또 다시 백업하게 된다. 이런 방식으로 백업
사이클이 진행 된다.
3. RETENTION POLICY NONE vs. DEFAULT
주의 사항:
'CONFIGURE RETENTION POLICY TO NONE' 과 'CONFIGURE RETENTION
POLICY TO DEFAULT' 는 그 의미가 같지 않다. 전자는 RETENTION POLICY
자체가 존재 하지 않는다는 의미 이며 백업은 expire 되지 않으며 'DELETE
OBSOLETE' 명령은 사용 할 수 없게 된다. 후자는 디폴트 RETENTION POLICY
(REDUNDANCY 1) 를 사용하게 된다는 의미 이다.
'DELETE OBSOLETE' 명령은 RETENTION POLICY 기준으로 expire 된 백업을
제거 하라는 명령이다.
보다 자세한 내용은 Oracle9i Recovery Manager User's Guide and
Reference의 Backup Optimization 부분을 참고 하시기 바랍니다.
--------------THE END----------------------------------------------Hi,
Backup optimisation = +- do not copy empty space.
So, when you issue your BACKUP statement, it backs up the datafile. dot. nothing more.
In order to achieve what you're testing, look into TFM for BACKUP INCREMENTAL LEVEL x .
Regards,
Yoann. -
Dear All,
I am practicing Oracle Restore scenarios on my Oracle 9i database. Once I complete my tests in Oracle 9i I will move up to 10g and then finally to 11g.
Following is my recovery scenario:
1) I did NOT configure Recovery Catalog
2) I would like to restore my databse from a 15 days old backup
3) control_file_record_keep_time is set to 7 days.
4) Backups are on tape.
Can you guys please shed some light on how to I proceed?
- PIn oracle 9i , check , which situation you can perform complete recovery and in which situations you have to select incomplete recovery.
check the notes by Alejandro Vargas, BACKUP AND RECOVERY SCENARIOS
http://www.google.co.in/#hl=en&q=oracle+backup+and+recovery+scenarios&aq=0&aqi=g10&aql=&oq=oracle+backup+and+reco&gs_rfai=&fp=aa24f2b3591f5f42
[PDF]
Backup and Recovery Scenarios - Backup & Recovery Check List
- 4:11am
File Format: PDF/Adobe Acrobat - Quick View
Oracle Support Israel. User Managed Recovery Scenarios And Configuration .... 4. recover automatic database using backup controlfile; ...
static7.userland.com/oracle/gems/.../BackupAndRecoveryChecklist.pdf
refer this, this will helps you.
Can one restore RMAN backups without a CONTROLFILE and RECOVERY CATALOG?_
http://www.orafaq.com/wiki/Oracle_database_Backup_and_Recovery_FAQ#Can_one_restore_RMAN_backups_without_a_CONTROLFILE_and_RECOVERY_CATALOG.3F
Edited by: rajeysh on Jun 20, 2010 6:36 PM -
Need inputs on RMAN Backup n Recovery for multiple restore of clean backup
I will explain my scenario below:
We have the requirement of performance testing of our proposed production platform, for this i am asked to take RMAN backup of clean position (Say Day0 or baseline backup) and restore it multiple times for few rounds of testing. My question is after 1st restore (with set until time of day0 position) if i open the database with resetlogs, would i be able to restore same clean backup again? I am using control file in the environment instead of RMAN catalog database. What i can do to make this scenario work? I am already in preperation of setting rman catalog database.
Please suggest me the best way forward...
Many Thanks
NukeshHi Asif,
I tried to make it work but seems there are still issue with my recovery, can you have a look and point out the shortcommings. i am totally lost here
RMAN> list incarnation;
using target database control file instead of recovery catalog
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 MYTEST 2433328848 PARENT 1 19-DEC-06
2 2 MYTEST 2433328848 PARENT 564488 04-NOV-10
3 3 MYTEST 2433328848 CURRENT 693719 06-NOV-10
RMAN> exit
TEST1DB-> rman target sys@MYTEST1
Recovery Manager: Release 10.2.0.3.0 - Production on Sun Nov 7 11:43:01 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
target database Password:
connected to target database: MYTEST (DBID=2433328848, not open)
RMAN> reset database to incarnation 2;
using target database control file instead of recovery catalog
database reset to incarnation 2
RMAN> run {
2> restore database until scn 10000;
3> recover database until scn 10000;
4> alter database open resetlogs;
5> };
Starting restore at 07-NOV-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=191 instance=MYTEST1 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=190 instance=MYTEST1 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/07/2010 11:45:18
RMAN-20208: UNTIL CHANGE is before RESETLOGS change
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, c onnect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, l ibrary, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rm an, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, va lidate"
RMAN-01007: at line 0 column 2 file: standard input
RMAN>
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rmanbackup/MYTEST/ora_cf%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rmanbackup/MYTEST/ora_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10g/dbs/snapcf_MYTEST1.f'; # default
RMAN> exit
SQL> select name from v$database;
NAME
MYTEST
SQL> show parameter CONTROL_FILE_RECORD_KEEP_TIME
NAME TYPE VALUE
control_file_record_keep_time integer 7
SQL> -
Oracle 10g Enterprise manager Solaris 9 (Rman backups)
Hi Guys,
I changed the OS and oracle user's password on my database server and OS user on the backup server and since then my rman backups don''t run. What could be the reason because when I click on the Disk Test Backup it says I must supply the Host Credentials
To save the backup settings, supply operating system login credentials to access the target database. and when I do that I get an error
The specified host user is not a member of the operating system DBA group. The host user must be a DBA group member since the database user does not have the SYSDBA role.Hi,
The specified host user is not a member of the operating system DBA group. The host user must be a DBA group member since the database user does not have the SYSDBA role.Assign DBA group to the newly created oracle user.
This should work
Regards,
X A H E E R -
Hi everybody
What are the steps needed if move the RMAN backup to other location in the OS level
(ie) every week i have to move the backup to other locationThere are not problem for example:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\comp>set ORACLE_SID=W
C:\Documents and Settings\comp>sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Mon Apr 26 14:53:08 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
C:\Documents and Settings\comp>sqlplus "sys/sm as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Mon Apr 26 14:53:15 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 12
Current log sequence 14
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 125829120 bytes
Fixed Size 1288100 bytes
Variable Size 71305308 bytes
Database Buffers 46137344 bytes
Redo Buffers 7098368 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter databaseop;
alter databaseop
ERROR at line 1:
ORA-00940: invalid ALTER command
SQL> alter database open;
Database altered.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
C:\Documents and Settings\comp>rman target sys/sm
Recovery Manager: Release 10.2.0.2.0 - Production on Mon Apr 26 14:55:58 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: W (DBID=754336873)
RMAN> backup database;
Starting backup at 26-APR-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=144 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\PRODUCT\10.2.0\ORADATA\W\SYSTEM01.DBF
input datafile fno=00003 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\SYSAUX01.DBF
input datafile fno=00005 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\EXAMPLE01.DBF
input datafile fno=00002 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\UNDOTBS01.DBF
input datafile fno=00004 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 26-APR-10
channel ORA_DISK_1: finished piece 1 at 26-APR-10
piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\2010_04_26
\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP tag=TAG20100426T145611 comment=NON
E
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:34
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 26-APR-10
channel ORA_DISK_1: finished piece 1 at 26-APR-10
piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\2010_04_26
\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP tag=TAG20100426T145611 comment=NON
E
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
Finished backup at 26-APR-10
RMAN> crossckeck backupset;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "allocate, alter
, backup, beginline, blockrecover, catalog, change, connect, copy, convert, crea
te, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flas
hback, host, {, library, list, mount, open, print, quit, recover, register, rele
ase, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, s
et, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport
, upgrade, unregister, validate"
RMAN-01008: the bad identifier was: crossckeck
RMAN-01007: at line 1 column 1 file: standard input
RMAN> crosscheck backupset;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\201
0_04_26\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP recid=1 stamp=717346573
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\201
0_04_26\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP recid=2 stamp=717346669
Crosschecked 2 objects
RMAN> delete expired backupset
2> ;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
1 1 1 1 EXPIRED DISK D:\ORACLE\PRODUCT\10.2.0\FLASH_R
ECOVERY_AREA\W\BACKUPSET\2010_04_26\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP
2 2 1 1 EXPIRED DISK D:\ORACLE\PRODUCT\10.2.0\FLASH_R
ECOVERY_AREA\W\BACKUPSET\2010_04_26\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP
Do you really want to delete the above objects (enter YES or NO)? y
deleted backup piece
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\201
0_04_26\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP recid=1 stamp=717346573
deleted backup piece
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\W\BACKUPSET\201
0_04_26\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP recid=2 stamp=717346669
Deleted 2 EXPIRED objects
now i copy all backup to c:\db
then
RMAN> catalog start with 'c:\db';
searching for all files that match the pattern c:\db
List of Files Unknown to the Database
=====================================
File Name: C:\db\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP
File Name: C:\db\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP
Do you really want to catalog the above files (enter YES or NO)? y
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: C:\db\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP
File Name: C:\db\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP
RMAN> list backupset;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1 Full 592.76M DISK 00:01:26 26-APR-10
BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20100426T145611
Piece Name: C:\DB\O1_MF_NNNDF_TAG20100426T145611_5XBRSX1M_.BKP
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
1 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\SYSTEM01.
DBF
2 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\UNDOTBS01
.DBF
3 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\SYSAUX01.
DBF
4 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\USERS01.D
BF
5 Full 947689 26-APR-10 D:\ORACLE\PRODUCT\10.2.0\ORADATA\W\EXAMPLE01
.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
2 Full 6.80M DISK 00:00:04 26-APR-10
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20100426T145611
Piece Name: C:\DB\O1_MF_NCSNF_TAG20100426T145611_5XBRWXG2_.BKP
Control File Included: Ckp SCN: 947720 Ckp time: 26-APR-10
SPFILE Included: Modification time: 26-APR-10
RMAN> -
Oracle 11.2.0.1
Windows 7 Home Premium
RMAN> backup database;
Starting backup at 05-MAR-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/05/2012 12:25:05
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 backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 05-MAR-12
channel ORA_DISK_1: finished piece 1 at 05-MAR-12
piece handle=E:\APP\NISHA\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2012_03_05\O1_MF_NCSNF_TAG20120305T122505_7O8RTBXJ_.BKP tag=TAG20120305T122505 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/05/2012 12:25:05
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
RMAN> 1.What is the problem in above scnerio ?
2.How to take RMAN backup when db is down ?
3.How to take RMAN backup when db is noarchivelog mode ?
Please help me. Thank you.I am trying to do a full RMAN cold backup and am getting the following :
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
What’s the cause ?
Here’s the example
connected to target database (not started)
Oracle instance started
database mounted Total System Global Area 1610612736 bytes Fixed Size 2056504 bytes
Variable Size 603983560 bytes
Database Buffers 989855744 bytes
Redo Buffers 14716928 bytes using target database control file instead of recovery catalog
allocated channel: backup_disk1
channel backup_disk1: sid=4977 instance=TEST1 devtype=DISK Starting backup at 31-OCT-13
channel backup_disk1: starting full datafile backupset
channel backup_disk1: specifying datafile(s) in backupset
RMAN-03009: failure of backup command on backup_disk1 channel at 31/10/2013 20:18:45
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel backup_disk1: starting full datafile backupset
channel backup_disk1: specifying datafile(s) in backupset
RMAN-03009: failure of backup command on backup_disk1 channel at 13/10/2013 20:18:45
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel backup_disk1: starting full datafile backupset
channel backup_disk1: specifying datafile(s) in backupset
RMAN-03009: failure of backup command on backup_disk1 channel at 13/10/2013 20:18:46
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel backup_disk1: starting full datafile backupset
channel backup_disk1: specifying datafile(s) in backupset
released channel: backup_disk1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on backup_disk1 channel at 13/10/2013 20:18:47
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
RMAN>
The cause is simple, the database has not been shutdown cleanly. You will require to restart the database and shutdown again, if in a RAC you will have to shutdown all instances cleanly.
Disabing archive log and attempting to backup the database will demonstrate the cause.
SQL> startup force;
ORACLE instance started.
Total System Global Area 1235959808 bytes
Fixed Size 2175288 bytes
Variable Size 620760776 bytes
Database Buffers 603979776 bytes
Redo Buffers 9043968 bytes
Database mounted.
Database opened.
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1235959808 bytes
Fixed Size 2175288 bytes
Variable Size 620760776 bytes
Database Buffers 603979776 bytes
Redo Buffers 9043968 bytes
Database mounted.
SQL>
Now we’ll try again to backup datafile 1.
RMAN> backup datafile 1;
Starting backup at 31-OCT-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=133 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 13/10/2013 20:43:34
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
This is simply because we issue a shutdown abort on the instance. However, just preforming a recovery will allow you to backup as required.
SQL> recover database;
Media recovery complete.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
C:UsersGary>rman target sys/passwd@db11g
Recovery Manager: Release 11.2.0.1.0 – Production on Thu Oct 31 20:44:15 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: DB10G (DBID=3002158372, not open)
RMAN> backup datafile 1;
Starting backup at 06-DEC-10using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=125 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=C:APPGARYORACLEPRODUCT10.2.0DB_1ORADATADB10GSYSTEM01.DBF
channel ORA_DISK_1: starting piece 1 at 31-OCT-13
channel ORA_DISK_1: finished piece 1 at 31-OCT-13
piece handle=C:APPGARYORACLEPRODUCT10.2.0DB_1FLASH_RECOVERY_AREADB10GBACKUPSET2010_12_06O1_MF_NNNDF_TAG20101206T204423_6HTCR810_.BKP tag=TAG20101206T204423 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 31-OCT-13
Starting Control File and SPFILE Autobackup at 31-OCT-13
piece handle=C:APPGARYORACLEPRODUCT10.2.0DB_1FLASH_RECOVERY_AREADB10GAUTOBACKUP2010_12_06O1_MF_S_737066556_6HTCSQVF_.BKP comment=NONE
Finished Control File and SPFILE Autobackup at 31-OCT-13
RMAN> exit
Interestingly, even with the recovery performed, we cannot switch back to archivelog mode without a clean shutdown.
SQL> alter database archivelog;
alter database archivelog*
ERROR at line 1:ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required
SQL> alter database archivelog;
alter database archivelog*
ERROR at line 1:ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
So we’ll startup and shutdown again. You cannot use the force option since that still does not perform a normal shutdown and you’ll get the same error.
SQL> alter database open;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1235959808 bytes
Fixed Size 2175288 bytes
Variable Size 620760776 bytes
Database Buffers 603979776 bytes
Redo Buffers 9043968 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered. -
Can rman backups be used to restore to a different server
We are using R12 with 10gr2 database
If i take Rman backups, can they be used to restore on some other test server for cloning and bringing that test server upto date like the production.
I am confues and dont know and This is the only reason i dont use rman for backups, instead take cold backups manually every night as they are used every week to clone some other server for testing purpose
Please advice
ThanksHi..
1. Copy the pfile to the new server.
2. startup nomount the database using the pfile.
3. Open a new RMAN session and connect to this database
4. Restore the controlfile, this will bring the database in mount stage
5. Once step 4 is completed, restore and recover the database.
NOTE:-- These are the steps for restoring the database when the RMAN backup pieces are copied to the same location as they are on the main server.If you copy the rman backup to some different location, then you will have to use the CATALOG BACKUPPIECE 'location' command before restoring the database.
Go through [http://download.oracle.com/docs/cd/B10500_01/server.920/a96566/rcmdupdb.htm]
HTH
Anand
Edited by: Anand... on Dec 23, 2008 8:13 PM Added link
Maybe you are looking for
-
Cost center (KOSTL) is not updating in HR master table for infotype 0001
Hi ABAP gurus, We have one interface where we are posting the HR master data using the IDOC (IDOC_INPUT_HRMD) into SAP. While updating cost center, We have one issue regarding infotype 0001. It is working fine for all the fields except: KOSTL, ORGEH,
-
Restricting access to a particular servlet in Weblogic
Thanx in advance for reading and replying to this query. I have an application running under a domain. This application has two servlets. I want that whenever a user hits one servlet, weblogic's authentication window should pop up. I know this could
-
Just got a new Dell. Copied over all music to computer and installed latest Itunes. When I am trying to sync i am getting a new error message that suggests 65 out of my 17000+ songs can't sync because the computer is not aauthorized. Everytime I cl
-
We are successfully using oo4o (8.0.6) to get data from ORACLE Release 7.3 into Word (Office 97 and Office XP). The clients are using NT 4.0 or Windows XP. We tried to install the application on a Windows 2003 terminal server with citrix. We use the
-
Accessing Users In NW Roles from MII
We are using 12.1. Is there an easy way from MII to get a list of all the users that are in an SAP NW role? For example, if a certain event occurs I want to e-mail everyone in a particular role from an MII transaction. How do I get the list of user