New to RMAN
Hi folks,
I am new to RMAN. I have read the Oracle documentation and I understand that I need to use recovery catalog for RMAN.
If I want to use RMAN for backup/recovery (for Oracle 9iR2 running on Solaris).
Just want to verify with you guys I'm on the right track for setting up recovery catalog for RMAN.
I am going to take the following steps: (Please correct me if I'm wrong)
1.Create a new database in a different disk with the following tablespaces.
SYSTEM tablespace 90 MB
TEMPORARY tablespace 5 MB
ROLLBACK SEGMENT tablespace 5 MB
RECCAT tablespace 25 MB
2. Create a user called rman.
3. Connect to the newly created db and
create the recovery catalog using RMAN command.
4. Register the production database in the recovery catalog.
I want to make sure this is a typical method for starting...
Thanks,
Amir
Hi Amir
Yes, we can say that you are correct. However this is raccomanded to create the recovery catalog database on a separete machine, not only on a separate disk.
For the size on the tablespace there is no general value to set. It depends of your needs and tablespace configuration.
Have fun with RMAN.
Bye, Aron
Similar Messages
-
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. -
NEW 9I RMAN: PERSISTENT CONFIGURATION PARAMETERS - INTRODUCTION
제품 : RMAN
작성날짜 : 2001-11-09
NEW 9I RMAN: PERSISTENT CONFIGURATION PARAMETERS - INTRODUCTION
===============================================================
오라클 9i 부터는 RMAN 에서 항상 사용되는 파라미터 세팅을 고정적으로 할 수 있게
되어 매번 파라미터를 주어야 하는 수고를 하지 않아도 된다.
Persistent Configuration Parameters 기능은 RMA 에 다음과 같은 변화를 주었다:
* RMAN 에서 파라미터의 디폴트를 DBA 가 커스터마이징 할 수 있게 되어 사용이 편리해졌다.
* 한번 커스터마이징한 파라미터는 모든 Job 에 적용이 된다.
* DBA 는 'BACKUP DATABASE' 명령어 하나만으로 RMAN 에서 데이터베이스 백업을 수행
할 수 있게 되었다.
* 오라클 9i 의 CONFIGURE 명령어는 RMAN 의 default setting 을 영구적으로 바꾸어 준다.
* 파라미터의 값은 컨트롤파일에 저장이 되며 필요한 경우에는 리커버리 카다로그와 맞추어
주는 과정이 필요하다.
오라클 9i RMAN 에서는는 'show' 명령어로 현재의 파라미터 세팅을 확인 할 수 있다.
SHOW show_operand [,show_operand ...];
show_operand: RETENTION POLICY |
EXCLUDE |
BACKUP COPIES |
CHANNEL |
DEFAULT DEVICE TYPE |
DEVICE TYPE |
SNAPSHOT CONTROLFILE |
ALL
'show all' 명령어로 현재의 모든 세팅을 확인 한다.
RMAN> show all;
using target database controlfile instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
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 SNAPSHOT CONTROLFILE NAME TO '/beta/app/oracle/product/9.0.1/dbs/snapc
f_V901.f'; # default
이렇게 Persistent Configuration Parameters 를 세팅하기 위해서는 스크립트를 만들어
수행 하는 것이 좋다:
run {
# Use the configure commands to create your backup policy.
# When complete these will be the new persistent
# configuration parameters for RMAN in the controlfile
# of the target datbase.
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
'/proj/SME9i/backup/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/proj/SME9i/backup/snapf_prod9.f';
이렇게 스크립트를 수행 한 후에 결과를 확인 하기 위해서는:
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
'/proj/SME9i/backup/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/proj/SME9i/backup/snapf_prod9.f';
결과는 위와 같다.
--------------THE END------------------------------------------------------Search button?!?!
Re: seek some good documents on Recovery MANager to start with
Aron -
Hi All,
I am cloning a database (on a windows server having different directory structure) using a RMAN backup, my database has got around 150 db files, so when I am restoring the same using RMAN, in order to let the control file know my new datafile location (which is of course different than that of my source database), I use SET NEWNAME for DATAFILE n to 'LOCATION\file_name.dbf'.
Now if there are handful of datafiles in my db then I dont mind doing this, but what if the number of files are like 100 +, is there any way through which I can do it rather than manually putting in every entry in the SET NEWNAME command??
Regards,
AjinkyaYou can use the DB_FILE_NAME_CONVERT andLOG_FILE_NAME_CONVERT initialization parameters.
HTH! -
Dear experts!
We always did our db backups with scripts (offline and online). Now we want to use RMAN. I have read a few tutorials over the web.
RUN
configure default device type to disk;
configure channel device type disk format = "M:\rmanbackup\%d_%s_%T";
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to 'M:\rmanbackup\%F.ctl';
configure maxsetsize to 1900M;
backup database plus archivelog;
backup archivelog all delete input;
DELETE BACKUP COMPLETED BEFORE 'SYSDATE-14' DEVICE TYPE DISK;
After two weeks the backup is obsolet. What do you think about my rman script? Are there any weak points or is it ok for first. I'll call the script once a week and do a full database export every day.
Thanks
MarkusI would recommend running the configure commands once and then removing them from you weekly script.
Might also help to configure a retention period instead of doing a delete based on a set time.
configure retention policy to recovery window of 14 days;Then add:
delete noprompt force obsolete;Depending on how many archive log locations you have, you may also want to change the archive log backup command to:
backup database plus archivelog delete all input;and remove the "backup archivelog all delete input" command.
May also help to get a text file backup of your spfile and control file (not mandatory, but you never know when it will come in handy).
Therefore, you could run all the configure commands below once:
configure default device type to disk;
configure channel device type disk format = "M:\rmanbackup\%d_%s_%T";
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to 'M:\rmanbackup\%F.ctl';
configure maxsetsize to 1900M;
configure retention policy to recovery window of 14 days;Then change your RUN command to:
RUN
backup database plus archivelog delete all input;
sql "alter database backup controlfile to trace as ''M:\rmanbackup\controlORCL9.txt''";
sql "create pfile=''M:\rmanbackup\initORCL9.ora'' from spfile";
delete noprompt force obsolete;
}You could run this and see if this works for you. -
ORA-01180: can not create datafile 1 during RMAN restore.
Hello,
I am trying to refresh one of our QA environments and I am getting this error message:
RMAN> run
2> {
3> allocate channel c1 device type disk;
4> allocate channel c2 device type disk;
5> restore database;
6> recover database;
7> }
allocated channel: c1
channel c1: SID=5 device type=DISK
allocated channel: c2
channel c2: SID=131 device type=DISK
Starting restore at 08-NOV-12
using channel ORA_DISK_1
creating datafile file number=1 name=+DATA1/alephpr/datafile/system.269.722874729
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/08/2012 16:27:40
ORA-01180: can not create datafile 1
ORA-01110: data file 1: '+DATA1/alephpr/datafile/system.269.722874729' I created a new database from scratch with the same name as is in Production, later on I will proceed to rename it to the right one. I started the steps for refreshing the PRD copy:
RMAN> shutdown immediate
using target database control file instead of recovery catalog
database dismounted
Oracle instance shut down
RMAN> startup nomount
connected to target database (not started)
Oracle instance started
Total System Global Area 534462464 bytes
Fixed Size 2228200 bytes
Variable Size 176160792 bytes
Database Buffers 348127232 bytes
Redo Buffers 7946240 bytes
RMAN> set dbid=3573460394
executing command: SET DBID
RMAN> restore controlfile from '/restorealeph/c-3573460394-20121106-01';
Starting restore at 08-NOV-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=130 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
+output file name=+DATA1/alephpr/controlfile/current.260.798747585+
+output file name=+FLASH/alephpr/controlfile/current.276.798747585+
Finished restore at 08-NOV-12
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1Once the control file is restored, I need to crosscheck, delete expired and catalog the backups at the new server:
RMAN> crosscheck backup;
Crosschecked 48 objects
RMAN> delete noprompt expired backup;
Deleted 48 EXPIRED objects
RMAN> list backup summary;
specification does not match any backup in the repositoryI need now to catalog the backups we transferred from Prod into the QA server's directory /restorealeph:
RMAN> catalog start with '/restorealeph/';
searching for all files that match the pattern /restorealeph/
List of Files Unknown to the Database
=====================================
File Name: /restorealeph/9cnpm51u_1_1
File Name: /restorealeph/9enpm6lj_1_1
File Name: /restorealeph/c-3573460394-20121107-00
File Name: /restorealeph/c-3573460394-20121107-01
File Name: /restorealeph/c-3573460394-20121106-01
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /restorealeph/9cnpm51u_1_1
File Name: /restorealeph/9enpm6lj_1_1
File Name: /restorealeph/c-3573460394-20121107-00
File Name: /restorealeph/c-3573460394-20121107-01
File Name: /restorealeph/c-3573460394-20121106-01
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
4097 B F A DISK 07-NOV-12 1 1 NO BACKUP_ALEPHPR.TUR_110712030000
4098 B A A DISK 07-NOV-12 1 1 NO BACKUP_ALEPHPR.TUR_110712030000
RMAN> list backup tag="BACKUP_ALEPHPR.TUR_110712030000";
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
4097 Full 178.04G DISK 00:00:00 07-NOV-12
BP Key: 4097 Status: AVAILABLE Compressed: NO Tag: BACKUP_ALEPHPR.TUR_110712030000
Piece Name: /restorealeph/9cnpm51u_1_1
List of Datafiles in backup set 4097
File LV Type Ckp SCN Ckp Time Name
1 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/system.269.722874729
2 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/sysaux.266.722874731
3 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/undotbs1.289.722874727
4 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/undotbs2.257.722874727
5 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/users.298.722874731
6 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/audit.299.723372305
7 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/case_datos.260.723372307
8 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/case_indices.261.723372307
9 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_hist.262.723372309
10 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_l.264.723372319
11 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_long.265.723372349
12 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_md.270.723372355
13 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_sm.271.723372369
14 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_xl.272.723372375
15 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/index_l.273.723372401
16 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/index_md.274.723372427
17 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/index_sm.275.723372455
18 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/index_xl.276.723372473
19 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/tools.278.723372501
26 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_sm.300.736088959
27 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/dev_disco_ptm5_meta.301.746385117
28 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/dev_disco_pstore.302.746385119
29 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/dev_disco_ptm5_cache.304.746385121
30 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/undotbs1.305.796391931
31 Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/undotbs2.306.796392185
BS Key Size Device Type Elapsed Time Completion Time
4098 16.89G DISK 00:00:00 07-NOV-12
BP Key: 4098 Status: AVAILABLE Compressed: NO Tag: BACKUP_ALEPHPR.TUR_110712030000
Piece Name: /restorealeph/9enpm6lj_1_1
List of Archived Logs in backup set 4098
Thrd Seq Low SCN Low Time Next SCN Next Time
1 35722 6919870864350 06-NOV-12 6919871887697 06-NOV-12
1 35723 6919871887697 06-NOV-12 6919872372211 06-NOV-12
1 35724 6919872372211 06-NOV-12 6919872410158 06-NOV-12
1 35725 6919872410158 06-NOV-12 6919872447301 06-NOV-12
1 35726 6919872447301 06-NOV-12 6919872503332 06-NOV-12
1 35727 6919872503332 06-NOV-12 6919872551564 06-NOV-12
1 35728 6919872551564 06-NOV-12 6919872603881 06-NOV-12
1 35729 6919872603881 06-NOV-12 6919872655942 06-NOV-12
1 35730 6919872655942 06-NOV-12 6919872698722 06-NOV-12
1 35731 6919872698722 06-NOV-12 6919872741655 06-NOV-12
1 35732 6919872741655 06-NOV-12 6919872782284 06-NOV-12
1 35733 6919872782284 06-NOV-12 6919872872302 06-NOV-12
1 35734 6919872872302 06-NOV-12 6919872910206 06-NOV-12
1 35735 6919872910206 06-NOV-12 6919872945577 06-NOV-12
1 35736 6919872945577 06-NOV-12 6919872980056 06-NOV-12
1 35737 6919872980056 06-NOV-12 6919873013411 06-NOV-12
1 35738 6919873013411 06-NOV-12 6919873050761 06-NOV-12
1 35739 6919873050761 06-NOV-12 6919873084996 06-NOV-12
1 35740 6919873084996 06-NOV-12 6919873122049 06-NOV-12
1 35741 6919873122049 06-NOV-12 6919873521767 06-NOV-12
1 35742 6919873521767 06-NOV-12 6919873952773 06-NOV-12
1 35743 6919873952773 06-NOV-12 6919874258549 06-NOV-12
1 35744 6919874258549 06-NOV-12 6919874472213 06-NOV-12
1 35745 6919874472213 06-NOV-12 6919874744856 06-NOV-12
1 35746 6919874744856 06-NOV-12 6919875113086 06-NOV-12
1 35747 6919875113086 06-NOV-12 6919875733337 06-NOV-12
1 35748 6919875733337 06-NOV-12 6919876139061 06-NOV-12
1 35749 6919876139061 06-NOV-12 6919876707162 06-NOV-12
1 35750 6919876707162 06-NOV-12 6919877706313 06-NOV-12
1 35751 6919877706313 06-NOV-12 6919877919039 06-NOV-12
1 35752 6919877919039 06-NOV-12 6919878024429 06-NOV-12
1 35753 6919878024429 06-NOV-12 6919878107673 06-NOV-12
1 35754 6919878107673 06-NOV-12 6919878258511 06-NOV-12
1 35755 6919878258511 06-NOV-12 6919878308336 06-NOV-12
1 35756 6919878308336 06-NOV-12 6919878424419 06-NOV-12
1 35757 6919878424419 06-NOV-12 6919878488485 06-NOV-12
1 35758 6919878488485 06-NOV-12 6919878827092 06-NOV-12
1 35759 6919878827092 06-NOV-12 6919879350098 07-NOV-12
1 35760 6919879350098 07-NOV-12 6919879675556 07-NOV-12
2 35949 6919870864360 06-NOV-12 6919871494640 06-NOV-12
2 35950 6919871494640 06-NOV-12 6919871887487 06-NOV-12
2 35951 6919871887487 06-NOV-12 6919872410655 06-NOV-12
2 35952 6919872410655 06-NOV-12 6919872552468 06-NOV-12
2 35953 6919872552468 06-NOV-12 6919872698940 06-NOV-12
2 35954 6919872698940 06-NOV-12 6919872872690 06-NOV-12
2 35955 6919872872690 06-NOV-12 6919872980371 06-NOV-12
2 35956 6919872980371 06-NOV-12 6919873085902 06-NOV-12
2 35957 6919873085902 06-NOV-12 6919873569082 06-NOV-12
2 35958 6919873569082 06-NOV-12 6919873949096 06-NOV-12
2 35959 6919873949096 06-NOV-12 6919874404640 06-NOV-12
2 35960 6919874404640 06-NOV-12 6919875011814 06-NOV-12
2 35961 6919875011814 06-NOV-12 6919875631429 06-NOV-12
2 35962 6919875631429 06-NOV-12 6919876324885 06-NOV-12
2 35963 6919876324885 06-NOV-12 6919876363526 06-NOV-12
2 35964 6919876363526 06-NOV-12 6919876748508 06-NOV-12
2 35965 6919876748508 06-NOV-12 6919877741784 06-NOV-12
2 35966 6919877741784 06-NOV-12 6919878108943 06-NOV-12
2 35967 6919878108943 06-NOV-12 6919878424477 06-NOV-12
2 35968 6919878424477 06-NOV-12 6919879012111 06-NOV-12
2 35969 6919879012111 06-NOV-12 6919879260589 07-NOV-12
2 35970 6919879260589 07-NOV-12 6919879350086 07-NOV-12
2 35971 6919879350086 07-NOV-12 6919879464935 07-NOV-12
2 35972 6919879464935 07-NOV-12 6919879548399 07-NOV-12
2 35973 6919879548399 07-NOV-12 6919879675564 07-NOV-12
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 ALEPHPR 3573460394 PARENT 1 13-MAY-10
2 2 ALEPHPR 3573460394 PARENT 2229467 28-JUN-10
3 3 ALEPHPR 3573460394 CURRENT 6918261828355 26-SEP-12The ASM structure is created...
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 509282 507421 0 507421 0 N DATA1/
MOUNTED EXTERN N 512 4096 1048576 50641 42850 0 42850 0 N FLASH/
ASMCMD> cd DATA1/ALEPHPR/DATAFILE
ASMCMD> pwd
+DATA1/ALEPHPR/DATAFILEBoth source and target databases are 11.2.0.2 PSU 6 running on Linux x64. I cannot use RMAN Duplicate since there is no visibility among different environments (PROD - QA in this case).
Any idea?
Thanks
Martin
Edited by: martin.morono on Nov 8, 2012 11:19 AM
Edited by: martin.morono on Nov 8, 2012 11:49 AMThanks Levi,
I slightly modified your script to recatalog the backup pieces since they are note stored at the same location in PR and QA.
No luck. The error message is different but the result is the same... it keeps failing.
RMAN> run {
2> allocate channel c1 device type disk;
3> allocate channel c2 device type disk;
4> restore controlfile from '/restorealeph/c-3573460394-20121107-01';
5> startup mount;
6> catalog start with '/restorealeph/';
7> restore database from tag 'BACKUP_ALEPHPR.TUR_110712030000';
8> }
allocated channel: c1
channel c1: SID=191 device type=DISK
allocated channel: c2
channel c2: SID=131 device type=DISK
Starting restore at 09 NOV 2012 13:11:09
channel c2: skipped, AUTOBACKUP already found
channel c1: restoring control file
channel c1: restore complete, elapsed time: 00:00:15
output file name=+DATA1/alephpr/controlfile/current.260.798747585
output file name=+FLASH/alephpr/controlfile/current.276.798747585
Finished restore at 09 NOV 2012 13:11:24
database is already started
database mounted
Starting implicit crosscheck backup at 09 NOV 2012 13:11:31
Crosschecked 52 objects
Finished implicit crosscheck backup at 09 NOV 2012 13:11:39
Starting implicit crosscheck copy at 09 NOV 2012 13:11:39
Crosschecked 2 objects
Finished implicit crosscheck copy at 09 NOV 2012 13:11:40
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_2_seq_1.279.795017193
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_2_seq_34950.273.795014469
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_1.281.795017413
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_2.283.795017519
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_3.290.795018411
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_4.291.795018559
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_5.292.795018707
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_6.293.795018811
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_7.294.795018899
File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_8.295.795020509
File Name: +flash/ALEPHPR/CONTROLFILE/Current.268.798725123
searching for all files that match the pattern /restorealeph/
List of Files Unknown to the Database
=====================================
File Name: /restorealeph/9cnpm51u_1_1
File Name: /restorealeph/9enpm6lj_1_1
File Name: /restorealeph/c-3573460394-20121107-00
File Name: /restorealeph/c-3573460394-20121107-01
File Name: /restorealeph/c-3573460394-20121106-01
Do you really want to catalog the above files (enter YES or NO)? YEs
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /restorealeph/9cnpm51u_1_1
File Name: /restorealeph/9enpm6lj_1_1
File Name: /restorealeph/c-3573460394-20121107-00
File Name: /restorealeph/c-3573460394-20121107-01
File Name: /restorealeph/c-3573460394-20121106-01
Starting restore at 09 NOV 2012 13:11:48
released channel: c1
released channel: c2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/09/2012 13:11:48
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 31 found to restore
RMAN-06023: no backup or copy of datafile 30 found to restore
RMAN-06023: no backup or copy of datafile 29 found to restore
RMAN-06023: no backup or copy of datafile 28 found to restore
RMAN-06023: no backup or copy of datafile 27 found to restore
RMAN-06023: no backup or copy of datafile 26 found to restore
RMAN-06023: no backup or copy of datafile 19 found to restore
RMAN-06023: no backup or copy of datafile 18 found to restore
RMAN-06023: no backup or copy of datafile 17 found to restore
RMAN-06023: no backup or copy of datafile 16 found to restore
RMAN-06023: no backup or copy of datafile 15 found to restore
RMAN-06023: no backup or copy of datafile 14 found to restore
RMAN-06023: no backup or copy of datafile 13 found to restore
RMAN-06023: no backup or copy of datafile 12 found to restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
RMAN-06023: no backup or copy of datafile 9 found to restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to 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>Just in case, I re-run this script including the crosscheck backup and the delete noprompt expired backups before restoring an the error messages were the same.
THanks again for your help.
Regards.
Martin
Edited by: martin.morono on Nov 9, 2012 7:21 AM -
Configuring Active Dataguard- Error comes while taking rman backup
Hi All,
I'm following this( http://wiki.oracle.com/page/11gR2+Data+Guard+Setup+project+Part5 ) article to configure a active dataguard. And i have successfully completed lot of steps up to now.
But im getting an error when i'm trying to complete the step 10 under chapter 5 (creating stand by)
step 10
10- OK, here we go, log into RMAN and run the following script. This script will create the standby database
At the command prompt type in rman
when rman launches connect to the target and auxiliary databases
connect target sys/michael@MS112DGP
connect auxiliary sys/michael@MS112DGS
here is my one... my primary db is called as dgp and my stand by is dgs
this is the error im getting... :(
[oracle@dgs ~]$ rman
Recovery Manager: Release 11.2.0.1.0 - Production on Sat Apr 23 09:54:40 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target sys/oracle@dgp
connected to target database: DGP (DBID=1555810211)
RMAN> connect auxiliary sys/oracle@dgs
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-04006: error from auxiliary database: ORA-12528: TNS:listener: all appropriate instances are blocking new connections
RMAN>
can anybody please help me to sort this out. once i solved this i can complete my first dataguard :)
Thanks in advance
MaxHello Sb,
[oracle@dgs admin]$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-APR-2011 21:28:02
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully
[oracle@dgs admin]$ mv listener.ora listener.ora_bkp
[oracle@dgs admin]$ ll
total 16
-rw-r--r-- 1 oracle oinstall 471 Apr 17 09:25 listener.ora_bkp
drwxr-xr-x 2 oracle oinstall 4096 Apr 15 14:18 samples
-rw-r--r-- 1 oracle oinstall 187 May 9 2007 shrept.lst
-rw-r--r-- 1 oracle oinstall 506 Apr 17 09:07 tnsnames.ora
[oracle@dgs admin]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-APR-2011 21:28:26
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/dgs/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dgs.oracle.com)(PORT=1521)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 23-APR-2011 21:28:26
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/dgs/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dgs.oracle.com)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@dgs admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-APR-2011 21:28:37
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 23-APR-2011 21:28:26
Uptime 0 days 0 hr. 0 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/dgs/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dgs.oracle.com)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@dgs admin]$
Thanks,
Max -
Restore to a different node with RMAN and EMC Networker
Please, really need help :)
I took hotbackup using RMAN catalog which went to tape. Here is the script for that:
connect target sys/****@PROD;*
connect rcvcat rman/***@catalog;*
*run {*
allocate channel t1 type 'SBT_TAPE';
send 'NSR_ENV=(NSR_SERVER="**",NSR_DATA_VOLUME_POOL=Oracle)';*
*backup database plus archivelog;*
*release channel t1;*
My settings include control file autobackup as follows:
*RMAN> show all;*
*RMAN configuration parameters are:*
*CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 10 DAYS;*
*CONFIGURE BACKUP OPTIMIZATION OFF; # default*
*CONFIGURE DEFAULT DEVICE TYPE TO DISK;*
*CONFIGURE CONTROLFILE AUTOBACKUP ON;*
*CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';*
*CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default*
*CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default*
*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 '/data/backups/PROD/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 '/data/backups/PROD/hotbkp/snapcf_PROD.f';*
I am trying to restore this backup that is on tape (EMC Networker) to a different node. I can do this outside of Networker without any problems. However, when I try to get the backup from tape I have this issue:
1. initPROD.ora is created and modified accordingly on a new server
2. Export sid, startup nomount on new server
export ORACLE_SID=PROD (on this new server)
*rman target /*
*startup nomount*
3. I then run the following and get this error:
*RMAN> run {*
*2> allocate channel t1 type 'SBT_TAPE'*
*3> send 'NSR_ENV=(NSR_SERVER="***",NSR_CLIENT="********")';*
*4> restore controlfile from autobackup;*
*5> sql 'alter database mount';*
*6> sql 'alter database rename file "/data/dbf/PROD/redo01.log" to "/data/scratch/dbf/PROD/redo01.log"';*
*7> sql 'alter database rename file "/data/dbf/PROD/redo02.log to "/data/scratch/dbf/PROD/redo02.log"';*
*8> sql 'alter database rename file "/data/dbf/PROD/redo03.log to "/data/scratch/dbf/PROD/redo03.log"';*
*9> set until sequence 22; (I get this from archive logs)*
*10> set newname for datafile 1 to '/data/scratch/dbf/PROD/system01.dbf';*
*11> set newname for datafile 2 to '/data/scratch/dbf/PROD/undotbs01.dbf';*
*12> set newname for datafile 3 to '/data/scratch/dbf/PROD/sysaux01.dbf';*
*13> set newname for datafile 4 to '/data/scratch/dbf/PROD/users01.dbf';*
*14> restore database;*
*15> switch datafile all;*
*16> recover database;*
*17> alter database open resetlogs;*
*18> }*
*allocated channel: t1*
*channel t1: sid=149 devtype=SBT_TAPE*
*channel t1: NMO v4.5.0.0*
*Starting restore at 27-FEB-09*
*released channel: t1*
*RMAN-00571: ===========================================================*
*RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============*
*RMAN-00571: ===========================================================*
*RMAN-03002: failure of restore command at 02/27/2009 22:10:43*
*RMAN-06495: must explicitly specify DBID with SET DBID command*
I cannot seem to pass this error. This error indicates that the db has to be either mounted or DBID set before the restore of teh controlfile. Mounting db before the restore of the controlfile does not work. Setting db id 1) does not make sense because if the primary db is down then I cannot get it, right? My primary is up now, so I was able to get db id, but setting it made the restore hang with the following:
*RMAN> run {*
*connect target*
*set dbid=466048808*
*2> allocate channel t1 type 'SBT_TAPE'*
*3> send 'NSR_ENV=(NSR_SERVER="***",NSR_CLIENT="********")';*
*4> restore controlfile from autobackup;*
*5> sql 'alter database mount';*
*6> sql 'alter database rename file "/data/dbf/PROD/redo01.log" to "/data/scratch/dbf/PROD/redo01.log"';*
*7> sql 'alter database rename file "/data/dbf/PROD/redo02.log to "/data/scratch/dbf/PROD/redo02.log"';*
*8> sql 'alter database rename file "/data/dbf/PROD/redo03.log to "/data/scratch/dbf/PROD/redo03.log"';*
*9> set until sequence 22; (I get this from archive logs)*
*10> set newname for datafile 1 to '/data/scratch/dbf/PROD/system01.dbf';*
*11> set newname for datafile 2 to '/data/scratch/dbf/PROD/undotbs01.dbf';*
*12> set newname for datafile 3 to '/data/scratch/dbf/PROD/sysaux01.dbf';*
*13> set newname for datafile 4 to '/data/scratch/dbf/PROD/users01.dbf';*
*14> restore database;*
*15> switch datafile all;*
*16> recover database;*
*17> alter database open resetlogs;*
*18> }*
*connected to target database: PROD (not mounted)*
*executing command: SET DBID*
*using target database control file instead of recovery catalog*
*allocated channel: t1*
*channel t1: sid=152 devtype=SBT_TAPE*
*channel t1: NMO v4.5.0.0*
*Starting restore at 27-FEB-09*
*channel t1: looking for autobackup on day: 20090227*
*channel t1: looking for autobackup on day: 20090226*
*channel t1: looking for autobackup on day: 20090225*
It looks like it cannot find the autbackup of controlfile? But when I list backup while connected to the target db and rman catalog, I see that autobackup is included in every hot backup that we do:
*BS Key Type LV Size Device Type Elapsed Time Completion Time*
*4639 Full 7.00M SBT_TAPE 00:00:04 27-FEB-09*
*BP Key: 4641 Status: AVAILABLE Compressed: NO Tag: TAG20090227T150141*
*Handle: /NMO_c-466048808-20090227-01/ Media:*
*Control File Included: Ckp SCN: 23352682865 Ckp time: 27-FEB-09*
*SPFILE Included: Modification time: 26-FEB-09*
I am stuck What I am doing wrong? Thank you!
Edited by: rysalka on Feb 28, 2009 8:35 AMDo a list command to see if the controlfile backup is on tape.
RMAN> list backup of controlfile;
I suggest you to read the manual of EMC Networker or call EMC on how to restore the database to another node. I am using Veritas Netbackup, it may be similar to EMC Networke for your reference. There are a few things that need to be followed when you restore database to another node:
1) set DB_ID, which you have done
2) set NB_CLIENT (in your case NSR_CLIENT) to the primary node from where backup was taken
3) configure the backup server to allow redirect restore between the two nodes.
Hope this helps. -
Need Advice on RMAN backup script
Hi;
Can any one advice if any error or guide to make RMAN backup proper :
Backup Policy are:
1. 0 level backup
2. current log file is arvhived before backing up
3. backup whole database (datafiles)
4. backup separate control file
5. backup is done on disk
6. control file auto backup ON
7. only 7 days archive log are need to be preserve ; old need to be deleted
### one time paramters seting
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'O:\rman\backup\Auto_Ctrl_weekly_%F';
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
### Command for weekly 0 level backup
run {
allocate channel c1 type disk;
sql 'alter system archive log current';
backup incremental level 0 tag = weekly_database format 'o:\rman\backup\full_weekly_%d_%s_%p_%t'(database);
release channel c1;
configure controlfile autobackup format for device type disk to 'o:\rman\backup\auto_ctrl_weekly_%f';
allocate channel c1 type disk;
backup tag = weekly_arch archivelog until time 'sysdate-7' format 'o:\rman\backup\archive_weekly_%d_%s_%p_%t';
delete archivelog until time 'sysdate-7';
release channel c1;
Regards
SmithDear Pierre F.;
Actually, I just added in my backup plan to have daily backup through RMAN, instead of COLD backup.
I have planned to take cold backup once a week. here is the side of data:
*** datafile 410
*** size of database : 86 GM
*** relog files size : 250MB
*** daily archive logs are : 250MB * 4(number of files) = 1GM aprox.
yes, time constraint is there; just because of the size of database. and we r going for 24/7
Is this script going to run only one per week ?
Ans: no I this was level 0 backup; i will take level 1 incremental backup with same script daily too.
Do you have any other RMAN script ?
ANS: no, I will modify same script for incremental.
after local copy of backup all backup files (RMAN) will be copy over network to backup server or we can install LTO tape device to copy directly from database server.
kindly advise me I am new in RMAN.
regards;
SMITH -
How to upgrade RMAN catalog from 10.2.0.4 to 11?
Hi, we are on Oracle 10.2.0.4, Solaris 5.10. Our RMAN catalog is 10.2.0.4 version and we have several 11g databases that need to connect to the catalog and obviously cannot. So we need to upgrade the catalog to 11. Does anyone have any docs on how to do it. Do I need to upgrade RMAN database to 11 via conventional upgrade and then do UPGRADE CATALOG? Really confusing, any help would be very appreciated.
Thank you!You need to:
1 - upgrade the recovery catalog database
2 - upgrade the recovery catalog Schema
Please check the details on note *452529.1 Recovery catalog for RMAN backup*.
Normally newer databases (target) can be cataloged on previous version catalog database, but with 11g there is the bug 6756872 (RMAN REGISTER OF 11G TARGET INTO 10G CATALOG FAILS WITH ORA-04028) which force you to upgrade the catalog.
You can also review RMAN Compatibility Matrix (Note 73431.1) which has all valid version combinations.
If your scenario is simple enough, another option could be create a new 11g RMAN catalog and register there your databases, without importing data from the 10.2 catalog.
Regards. -
RMAN script- delete archives.
Is this a solid rman backup script? I am getting varied times for a daily backup- some days it's a normal 1 hour, next day it's 6 hours. I can't find a reason- no errors are being generated, I am told to find out why this server does this and not our other servers- they were all built the same (same hardware/os/database build).
I am new to RMAN, but here is my "at job" running nightly.
rman target/
run {
backup database plus archivelog;
delete noprompt obsolete;
delete expired archivelog all;
sql 'alter system archive log current';
exit
Any reason why RMAN would run longer on certain days? Where do I look to figure this out?rman target/
run {
backup database plus archivelog;
delete noprompt obsolete;
delete expired archivelog all;
sql 'alter system archive log current';
exitWhen you use "plus archivelog" then you dont need to issue "'alter system archive log current';" command bcz after taking DB backup it switches the logfile.
For slowness, I will say check the system state when it misbehave. Check for any locks/wait-events in the DB. Do you run any other process at that time when backup runs?? Check for any other scheduled tasks on that box on that time. Also check alert log for that time period for more information.
they were all built the same (same hardware/os/database build).Can you tell us what hardware/os/database you are on??
Daljit Singh -
Problem backing up database using RMAN
Hi All,
I am new to RMAN. I am trying to test backup a db with RMAN. I successfully configured RMAN and registered a test db with it. Then I tried to take full backup of the db. The backup started as I saw the .dbf file of one of the tbs in the db at the destination. The problem is the backup process hanged up after that. I killed the unix session. Then opened one more session and tried copying a datafile. Same thing happened. I can see the full datafile copy at the destination location. Still the process hangs. I am confused. Can somebody help me understand whats going on. The follwing output will give you a big picture :
RMAN> run{
2> allocate channel c2 type disk;
3> backup tablespace "DATA" format '/backup/TEST/%d_DATA_%u';
4> release channel c2;
5> }
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c2
RMAN-08500: channel c2: sid=14 devtype=DISK
RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08008: channel c2: starting full datafile backupset
RMAN-08502: set_count=3 set_stamp=459437384 creation_time=17-APR-02
RMAN-08010: channel c2: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00005 name=/oradata/TEST/DATA.dbf
In the above example I am trying to backup the DATA tablespace. The process started as I saw the .dbf file under /backup/TEST. But still the process hangs.
Thanks in advance.channel ORA_AUX_DISK_1: reading from backup piece E:\BACKUP\STNDBY_CF_AIRPRIM_T690931864_S25_P1
ORA-19870: error reading backup piece E:\BACKUP\STNDBY_CF_AIRPRIM_T690931864_S25_P1
ORA-19504: failed to create file "E:\ORACLE\PRODUCT\10.2.0\ORADATA\AIRPRIM\CONTROL01.CTL"
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
failover to previous backup
Can you please confirm if the directory E:\ORACLE\PRODUCT\10.2.0\ORADATA\AIRPRIM is existing on standby box and rman can write to that location (free space & permissions)
If the issue is still present provide us the control_files parameter from standby..
- Ravi.M -
Hi All,
I'm new in RMAN and Currently we have 14 days retention policy for daily and weekly backup.
In the same time we also will have 186days retention for monthly backup, that's mean its should be recoverable around that 3 month (for monthly).
My question is, What should I put the scripts for monthly backup ?
I saw some example its for offline backup:
BACKUP DATABASE UNTIL 'SYSDATE+365' NOLOGS;
But I want the backup should be online ?
Currently our weekly backup like this
#!/bin/bash
# SID= env | grep ORACLE_SID | cut -c12-15
export ORACLE_HOME=/oracle/BWD/112_64
export ORACLE_SID=BWD
LOGFILE=/tmp/BWD-weekly-`date +%y%m%d%H%M`.out
echo>> $LOGFILE
chmod 666 $LOGFILE
echo Script $0>> $LOGFILE
echo ==== started on `date` ====>> $LOGFILE
echo>> $LOGFILE
rman target / << !EOF >> $LOGFILE
allocate channel for maintenance type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
crosscheck archivelog all;
release channel;
run
allocate channel t1 type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
backup as compressed backupset
incremental level 0 cumulative
TAG SMQ_LEVEL0_WEEKLY_BACKUP
format 'weekly_%d_set%s_piece%p_%T_%U'
filesperset 5
database plus archivelog delete input;
sql 'alter system archive log current';
crosscheck backup;
release channel t1;
And Daily backup:
#!/bin/bash
SID=EPD
export ORACLE_HOME=/oracle/$SID/112_64
export ORACLE_SID=$SID
#LOGFILE=/tmp/EPD-weekly-`date +%y%m%d%H%M`.out
LOGFILE=/tmp/$SID-daily-`date +%y%m%d%H%M`.out
echo>> $LOGFILE
chmod 666 $LOGFILE
echo Script $0>> $LOGFILE
echo ==== started on `date` ====>> $LOGFILE
echo>> $LOGFILE
rman target / << !EOF >> $LOGFILE
allocate channel for maintenance type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
crosscheck archivelog all;
release channel;
run
allocate channel t1 type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
backup as compressed backupset
incremental level 1 cumulative
TAG EPD_LEVEL1_DAILY_BACKUP
format 'daily_%d_set%s_piece%p_%T_%U'
filesperset 5
database plus archivelog delete input;
sql 'alter system archive log current';
crosscheck backup;
release channel t1;
Appreciate if anyone has more experience to share with me the best aproach for this.Hi,
I would change some things in your script.
It would create a routine for the backup of archivelogs separately ... every X hours (this is highly recommended).
When you perform a backup with the option 'LOGS' the archivelogs required to restore that backup will be maintained automatically. (ie The archivelogs will obey the policy Backup FULL with KEEP option).
rman target / << !EOF >> $LOGFILE
allocate channel for maintenance type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
crosscheck archivelog all;
release channel;Why you are executing CROSSCHECK of ARCHIVELOG on each backup execution?
I recommend you run this command only when necessary and manually. Because the ARCHVELOGS must be there. If archivelog is not on directory this can compromise your backup.
If you run the crosscheck automatically you can invalidade your backup if you don't know where is that archivelog wich is missing. Because CROSSCHECK will mark the missing ARCHIVELOG as EXPIRED and the BACKUP will execute successful but during RESTORE you will need that ARCHIVELOG and during recover database may fail.
I recommend execute crosscheck command manually and only after the error was raised on the logs. i.e Backup must fail to know what's going on. As maintenance operation if necessary we should run CROSSCHECK manually.
run
allocate channel t1 type 'sbt_tape' parms
'ENV=(tdpo_optfile=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
backup as compressed backupset
incremental level 0 cumulative
TAG SMQ_LEVEL0_WEEKLY_BACKUP
format 'weekly_%d_set%s_piece%p_%T_%U'
filesperset 5
database plus archivelog delete input;
sql 'alter system archive log current';
crosscheck backup;
release channel t1;
}The command "sql 'alter system archive log current';" is not required since RMAN do it automatically when start backup of archivelogs. And even if this was necessary this command should be executed before start backup of archivelogs. So you should execute BACKUP DATABASE ... separately from PLUS ARCHVELOG...
e.g :
1° (BACKUP DATABASE ... )
2° (sql 'Alter system archivelog...)
3° (Backup Archivelog all delete...)
I recommend also you format the Backup (BACKUPPIECE) of ARCHIVELOG.
backup as compressed backupset
incremental level 0 cumulative
TAG SMQ_LEVEL0_WEEKLY_BACKUP
format 'weekly_%d_set%s_piece%p_%T_%U'
filesperset 5
database plus archivelog
format 'ARC_%d_set%s_piece%p_%T_%U' delete input;Create a script to do Backup of Archivelgos at least each 3 hours
Backup ARCHIVELOG ALL TAG 'ARC_DATE' FORMAT 'ARC_%d_set%s_piece%p_%T_%U' delete input;As you need recover database in any point time in a window of 3 month you can do that:
backup database tag monthly_SMQ keep until time 'sysdate+168';The all archivelogs required for recover this backup will automatically be maintained.
Regards,
Levi Pereira -
Problem in database recovery thru RMAN
I am completely new to RMAN.
I took full backup thru RMAN and as per suggested by some document, I deleted controlfile, datafile and SPfile in order to learn recovery thru RMAN.
now, when I try to connect to RMAN catalog I'm getting the following error "
RMAN> connect catalog rman/rman@test9i
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-04004: error from recovery catalog database: ORA-01033: ORACLE initializat
on or shutdown in progress"
can anybody help me in connecting and recovering the database.I thinnk there may be user connected while performing a shutdown.Disconnect the user and stop the listner then you perform the recovery
correct me if i am wrong -
I am sort of new to RMAN, I've been playing with it for a while but that's about as far as I've taken it. My question is does RMAN automatically backup any archive logs needed for recovery when I run "backup database" command or do I have to issue "backup database plus archive log" in order to insure recovery.
Backup database also backups archivelogs.No,it does not. From documentation:
backup database;
Creates a backup set (AS BACKUPSET) or group of image copies (AS COPY) for all datafiles in the database. If generating a backup set, then RMAN can include only datafiles and control files: it cannot include archived redo logs.
Werner
Maybe you are looking for
-
Laptop troubles and now my entire iTunes library has been deleted.
My laptop is old and I regularly have troubles with it. Tonight it was being particularly stubborn, crashing, not starting up. Mostly caused by a virus I had resolved about 4 years ago and a worn out battery and charger. Well I was just downloading m
-
[SOLVED] System hung loading domU
Very strange issue. I built a base Arch system and things seem to be functional. I was able to get thing loaded up with xen, I created a domu configuration for xen and managed to get things loaded and Arch installed into a domu without a ton of iss
-
Can't rebuid index for failed index
Hi, I got a kind of indexing failure for certain reason, for example, using too long name of dot-notation to specifying a object attribute for indexing. Then I drop the failed index by the following statement: drop index myIdx force; Then try to re-c
-
Microsoft Messenger 8,0 delays to have access.
Microsoft Messenger 8,0 delays to have access.
-
SHOWING POPUP MENU BY PRESSING BUTTON?
Hello OTN members, The situation is as follows: On a Form i have Button, and by pressing the button it should bring up the popup menu ? Is the above condition possible by right clicking the button. Thanks for any suggestions. Sailesh null