About a dropped archived log.
Hello every body.
I have this big problem:
An archived log of my standby was dropped, so I restored that archived log at primary database and didn´t go to standby database.
I copied it to standby and I was try to register it manual:
SQL: alter database register logfile ´....´;
But a ora shows me that archived log already exists and it can´t register it.
So how can I resolve this problem?
Thanks a lot
First investigate that for you actually need this log for standby database recovering? Also how happen dropping ? from just OS level then that is right you will get an error.To checking execute below script from standby database
select max(sequence#) from v$archived_log where applied='YES'; If above result is bigger than from your losing archivelog sequence then do not worry else after copying this archive log from primary to standby then execute below command on standby database and apply this log
recover standby database until cancel;
/*Then apply this log and*/
shutdown immediate;
startup mount;
alter database recover managed standby database;
Similar Messages
-
Question about only new archive logs backed up in backup
Hi,
We are taking daily two online backup. We are running database in ARCHIVELOG mode. We configure database in PRIMARY and PHYSICAL STANDBY mode. Till now, we were taking all archive logs in backup. But it was causing problem of lot of space utilization of disk.
So based on search in this forum, I am planning to take only new archive logs generated since last backed up using following command.
BACKUP ARCHIVELOG all not backed up 1 times format '$dir/archivelogs_%s_%t' FORCE;
I am not sure about how it impact during restore and recovery when we take only new archivelogs in backup.
We restore database and then after perform always incomplete recovery till latest SCN capture in backup using following commands.
RESTORE DATABASE;
RECOVER DATABASE UNTIL SCN $BACKUP_LAST_SCN;
Do you see any problem/risk of implementing this solution going ahead?
Please let me provide your thoughts/inputs for this.
Thanks.
ShardulHi,
We are not deleting archive logs from actual location after backup. We keep latest 6 days archive logs at actual location. But here we are planning to put only new archive logs in backup image which were not backed up due to disk size problem.
For your reference below is our datbase backup RMAN commands. We are taking full database backup.
run {
ALLOCATE CHANNEL C1 TYPE DISK;
delete noprompt archivelog all completed before 'sysdate-5';
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP INCREMENTAL LEVEL=0 CUMULATIVE format '$dir/level0_%u' DATABASE include current controlfile
for standby force;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP ARCHIVELOG all not backed up 1 times format '$dir/archivelogs_%s_%t' FORCE;
BACKUP CURRENT CONTROLFILE format '$dir/control_primary' FORCE;
Then in this polich do you see any problem when we restore database as PRIMARY or PHYSICAL STANDBY on server. We are using Oracle 10.2.0.3. -
Question about import in archive log mode
Hello.
I am a developer, I have ordered to write a script that makes the import of a schema of a database (release 9.2.0.7). That import will be done once a day. I have seen that in my development environment the import creates 54 archivers files (10M aprox. each), that means more that half a Gb a day, it seems too much to me.
I cannot see why all those archivers can be useful. Would a good way of proceeding the following?
1. Forcing an archiver just before the import (I do not know how to do that) so that a backup could be done to the state before the import.
2. Disabling archive log mode during the import and enabling it just after the import (I do not know how to do that).
3. Forcing a new archiver just after the import (I do not know how to do that).
Thanks in advance.540M is not that much.
One would question why you need to import every day,
there must be better ways to do this.
The three steps you propose look like an awful
scenario, as it would require the database to switch
from archivelog to noarchivelog and vice versa.
This would require the database to close twice a
day.
The scenario is also incomplete as one would need to
take a backup after the import
If you can convince your DBA to close the database
twice a day, he should write the script, which he can
easily derive from the docs.
But likely he will visit Billy Verreynne to borrow
his lead pipe, and rightly so ;)
Sybrand Bakker
Senior Oracle DBAThanks for the answer.
A few things:
- Sorry for my ignorance, I have no experience in database backups, I do not understand why I need to backup just after the import.
- That database is not critical, it is just for a team who will test on that database several applications, so the database will only need to be open during the office schedule.
- I have no dba. The client has a dba for several databases but I have no contact with him/her nor my boss has. -
Question about ALTER SYSTEM ARCHIVE LOG START
Good morning,
I'm trying (unsuccessfully) to get my database to be in archive log mode.
These are the steps I followed:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 377487824 bytes
Database Buffers 150994944 bytes
Redo Buffers 5804032 bytes
Database mounted.
SQL> select log_mode from v$database;
LOG_MODE
ARCHIVELOG
SQL> show parameter log_archive_start;
NAME TYPE VALUE
log_archive_start boolean FALSE
SQL> alter system archive log start;
System altered.
SQL> show parameter log_archive_start;
NAME TYPE VALUE
log_archive_start boolean FALSE
SQL>I've gone thru that process twice but, I don't seem to be able to get the ARCH process to start. (newbie mistake I'm sure...)
Thank you for your help (again!),
John.The parameter log_archive_start is no more needed John (as suggested already) and the best way to check the archive options is through the archive log list command.
[oracle@edhdr2p0-orcl oui]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Aug 10 10:51:57 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing 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 11
Current log sequence 13
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 418484224 bytes
Fixed Size 1336932 bytes
Variable Size 318769564 bytes
Database Buffers 92274688 bytes
Redo Buffers 6103040 bytes
Database mounted.
SQL> select process,status from V$archive_processes;
PROCESS STATUS
0 STOPPED
1 STOPPED
2 STOPPED
3 STOPPED
4 STOPPED
5 STOPPED
6 STOPPED
7 STOPPED
8 STOPPED
9 STOPPED
10 STOPPED
PROCESS STATUS
11 STOPPED
12 STOPPED
13 STOPPED
14 STOPPED
15 STOPPED
16 STOPPED
17 STOPPED
18 STOPPED
19 STOPPED
20 STOPPED
21 STOPPED
PROCESS STATUS
22 STOPPED
23 STOPPED
24 STOPPED
25 STOPPED
26 STOPPED
27 STOPPED
28 STOPPED
29 STOPPED
30 rows selected.
SQL>
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
archive log list;
Database altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 11
Next log sequence to archive 13
Current log sequence 13
SQL>
SQL> select * from V$archive_processes where status <> 'STOPPED';
PROCESS STATUS LOG_SEQUENCE STAT
0 ACTIVE 0 IDLE
1 ACTIVE 0 IDLE
2 ACTIVE 0 IDLE
3 ACTIVE 0 IDLEHTH
Aman.... -
Problem about space management of archived log files
Dear friends,
I have a problem about space management of archived log files.
my database is Oracle 10g release 1 running in archivelog mode. I use OEM(web based) to config all the backup and recovery settings.
I config "Flash Recovery Area" to do backup and recovery automatically. my daily backup schedule is every night at 2:00am. and my backup setting is "disk settings"--"compressed backup set". the following is the RMAN script:
Daily Script:
run {
allocate channel oem_disk_backup device type disk;
recover copy of database with tag 'ORA$OEM_LEVEL_0';
backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
the retention policy is the second choice, that is "Retain backups that are necessary for a recovery to any time within the specified number of days (point-in-time recovery)". the recovery window is 1 day.
I assign enough space for flash recovery area. my database size is about 2G. I assign 20G as flash recovery area.
now here is the problem, through oracle online manual, it said oracle can manage the flash recovery area automatically, that is, when the space is full, it can delete the obsolete archived log files. but in fact, it never works! whenever the space is full, the database will hang up! besides, the status of archived log files is very strange, for example, it can change "obsolete" stauts from "yes" to "no", and then from "no" to "yes". I really have no idea about this! even though I know oracle usually keep archived files for some longer days than retention policy, but I really don't know why the obsolete status can change automatically. although I can write a schedule job to delete obsolete archived files every day, but I just want to know the reason. my goal is to backup all the files on disk and let oracle automatically manage them.
also, there is another problem about archive mode. I have two oracle 10g databases(release one), the size of db1 is more than 20G, the size of db2 is about 2G. both of them have the same backup and recovery policy, except I assign more flash recovery area for db1. both of them are on archive mode. both of nearly nobody access except for the schedule backup job and sometime I will admin through oem. the strange thing is that the number of archived log files of smaller database, db2, are much bigger than ones of bigger database. also the same situation for the size of the flashback logs for point-in-time recovery. (I enable flashback logging for fast database point-in-time recovery, the flashback retention time is 24 hours.) I found the memory utility of smaller database is higher than bigger database. nearly all the time the smaller database's memory utility keeps more than 99%. while the bigger one's memory utility keeps about 97%. (I enable "Automatic Shared Memory Management" on both databases.) but both database's cup and queue are very low. I'm nearly sure no one hack the databases. so I really have no idea why the same backup and recovery policy will result so different result, especially the smaller one produces more redo logs than bigger one. does there anyone happen to know the reason or how should I do to check the reason?
by the way, I found web based OEM can't reflect the correct database status when the database shutdown abnormally. for example, if the database hang up because of out of flash recovery area, after I assign more flash recovery area space and then restart the database, the OEM usually can't reflect the correct database status. I must restart OEM manually to correctly reflect the current database status. does there anyone know in what situation I should restart OEM to reflect the correct database status?
sorry for the long message, I just want to describe in details to easy diagnosis.
any hint will be greatly appreciated!
Sammythank you very much, in fact, my site's oracle never works about managing archive files automatically although I have tried all my best. at last, I made a job running daily to check the archive files and delete them.
thanks again. -
Hi!
I wonder if there is possibility to configure archiving policy in a way:
set one destination (/arch1/oracle) as primary, and another (/arch2/oracle) as optionally.
redo Logs will be copied to /arch2/oracle only if /arch1/oracle fails, but after it will be available again, files will be moved (or copied) from /arch2/oracle to /arch1/oracle. Anybody tried to store backup files in that way? is it possible? I tried various combinations of log_archive_dest_n and log_archive_dest_state_n parameters, but it won't work in a way I expected.
Message was edited by:
wojaczekit's about limitation of disk place on server where DB operates. Archived logs are stored on NFS filesystem, but time to time there are some problems with remote filesystem. In such cases DB will hang and manual change of arch log destination to local FS is needed. But this destination could not be set permanently because of disk space limitations.
When i set destination 1 as mandatory and 2 as optionally db hangs when arc can't use mandatory destination.
Setting both destinations as optionally gives finally inconsistency and storing files on local fs, what is not desirable -
Roblem about space management of archived log files
Dear friends,
I have a problem about space management of archived log files.
my database is Oracle 10g release 1 running in archivelog mode. I use OEM(web based) to config all the backup and recovery settings.
I config "Flash Recovery Area" to do backup and recovery automatically. my daily backup schedule is every night at 2:00am. and my backup setting is "disk settings"--"compressed backup set". the following is the RMAN script:
Daily Script:
run {
allocate channel oem_disk_backup device type disk;
recover copy of database with tag 'ORA$OEM_LEVEL_0';
backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
the retention policy is the second choice, that is "Retain backups that are necessary for a recovery to any time within the specified number of days (point-in-time recovery)". the recovery window is 1 day.
I assign enough space for flash recovery area. my database size is about 2G. I assign 20G as flash recovery area.
now here is the problem, through oracle online manual, it said oracle can manage the flash recovery area automatically, that is, when the space is full, it can delete the obsolete archived log files. but in fact, it never works! whenever the space is full, the database will hang up! besides, the status of archived log files is very strange, for example, it can change "obsolete" stauts from "yes" to "no", and then from "no" to "yes". I really have no idea about this! even though I know oracle usually keep archived files for some longer days than retention policy, but I really don't know why the obsolete status can change automatically. although I can write a schedule job to delete obsolete archived files every day, but I just want to know the reason. my goal is to backup all the files on disk and let oracle automatically manage them.
also, there is another problem about archive mode. I have two oracle 10g databases(release one), the size of db1 is more than 20G, the size of db2 is about 2G. both of them have the same backup and recovery policy, except I assign more flash recovery area for db1. both of them are on archive mode. both of nearly nobody access except for the schedule backup job and sometime I will admin through oem. the strange thing is that the number of archived log files of smaller database, db2, are much bigger than ones of bigger database. also the same situation for the size of the flashback logs for point-in-time recovery. (I enable flashback logging for fast database point-in-time recovery, the flashback retention time is 24 hours.) I found the memory utility of smaller database is higher than bigger database. nearly all the time the smaller database's memory utility keeps more than 99%. while the bigger one's memory utility keeps about 97%. (I enable "Automatic Shared Memory Management" on both databases.) but both database's cup and queue are very low. I'm nearly sure no one hack the databases. so I really have no idea why the same backup and recovery policy will result so different result, especially the smaller one produces more redo logs than bigger one. does there anyone happen to know the reason or how should I do to check the reason?
by the way, I found web based OEM can't reflect the correct database status when the database shutdown abnormally. for example, if the database hang up because of out of flash recovery area, after I assign more flash recovery area space and then restart the database, the OEM usually can't reflect the correct database status. I must restart OEM manually to correctly reflect the current database status. does there anyone know in what situation I should restart OEM to reflect the correct database status?
sorry for the long message, I just want to describe in details to easy diagnosis.
any hint will be greatly appreciated!
Sammythank you very much, in fact, my site's oracle never works about managing archive files automatically although I have tried all my best. at last, I made a job running daily to check the archive files and delete them.
thanks again. -
Question about Archive Log Deletion policy
I've a problem to understand the Archive Log Deletion policy, and I I'd like to this problem explain with the following example.
Messages of the database are in German, but I guess you'll understand them.
SQL> startup
ORACLE-Instance hochgefahren.
Total System Global Area 5344731136 bytes
Fixed Size 2129240 bytes
Variable Size 2684355240 bytes
Database Buffers 2617245696 bytes
Redo Buffers 41000960 bytes
Datenbank mounted.
Datenbank geöffnet.
SQL> archive log list
Datenbank-Log-Modus Archive-Modus
Automatische Archivierung Aktiviert
Archivierungsziel E:\oracle\thetis_iv\arch
Älteste Online-Log-Sequenz 17917
Nächste zu archivierende Log-Sequenz 17919
Aktuelle Log-Sequenz 17919
SQL> alter system switch logfile;
System wurde geändert.I created a brand new archive log.
SQL> exit
Verbindung zu Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options beendet
D:\OracleDB\product\11.1.0\db_1\BIN>dir E:\oracle\thetis_iv\arch
Datenträger in Laufwerk E: ist Volume
Volumeseriennummer: 3EBD-77E5
Verzeichnis von E:\oracle\thetis_iv\arch
06.04.2011 15:04 <DIR> .
06.04.2011 15:04 <DIR> ..
06.04.2011 15:04 17.137.152 ARC17919_0721667907.001
1 Datei(en), 17.137.152 Bytes
2 Verzeichnis(se), 41.073.258.496 Bytes freiand this is the only archive log in the directory. Now I start rman:
D:\OracleDB\product\11.1.0\db_1\BIN>rman target / catalog rmanrepo@rmanrepo
Recovery Manager: Release 11.1.0.7.0 - Production on Mi Apr 6 15:05:35 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Mit Ziel-Datenbank verbunden: ENTWIV (DBID=21045568)
Kennwort für Recovery-Katalog-Datenbank:
Verbindung mit Datenbank des Recovery-Katalogs
RMAN> show all;
RMAN-Konfigurationsparameter für Datenbank mit db_unique_name ENTWIV sind:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'E:\oracle\thetis_iv\backup\CF_%F_ENTWIV.ORA';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(TPDO_OPTFILE=D:\Services\Tivoli\TSM\AgentOBA64\tpdo.opt)';
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 BACKED UP 2 TIMES TO 'SBT_TAPE';
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORACLEDB\PRODUCT\11.1.0\DB_1\DATABASE\SNCFENTWIV.ORA'; # defaultThe archive log deletion policy says the the logfiles have to be backed up for two times before they get deleted.
Now I backup all archive logs, that havn't been backed up for at least two times.
RMAN> run { backup archivelog all not backed up 2 times
2> format '%d_AR_%Y%M%D_%s_%t'
3> tag 'ARCHIVE LOGS'
4> DELETE ALL INPUT;
5> }
Starten backup um 06.04.2011 15:08:01
Aktuelles Log archiviert
Zugewiesener Kanal: ORA_SBT_TAPE_1
Kanal ORA_SBT_TAPE_1: SID=253 Device-Typ=SBT_TAPE
Kanal ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.5.1.0
Kanal ORA_SBT_TAPE_1: Backup Set für Archive Log wird begonnen
Kanal ORA_SBT_TAPE_1: Archive Logs in Backup Set werden angegeben
Eingabe-Archive-Log-Thread=1 Sequence=17919 RECID=147 STAMP=747759899
Eingabe-Archive-Log-Thread=1 Sequence=17920 RECID=148 STAMP=747760081
Kanal ORA_SBT_TAPE_1: Piece 1 wird auf 06.04.2011 15:08:02 begonnen
Kanal ORA_SBT_TAPE_1: Piece 1 auf 06.04.2011 15:08:09 beendet
Piece Handle=ENTWIV_AR_20110406_23_747760082 Tag=ARCHIVE LOGS Kommentar=API Version 2.0,MMS Version 5.5.1.0
Kanal ORA_SBT_TAPE_1: Backup Set vollstõndig, abgelaufene Zeit: 00:00:08
Kanal ORA_SBT_TAPE_1: Archive Logs werden gel÷scht
Archive Log-Dateiname=E:\ORACLE\THETIS_IV\ARCH\ARC17919_0721667907.001 RECID=147 STAMP=747759899
Archive Log-Dateiname=E:\ORACLE\THETIS_IV\ARCH\ARC17920_0721667907.001 RECID=148 STAMP=747760081
Beendet backup um 06.04.2011 15:08:10
RMAN> exit
Recovery Manager abgeschlossen.
D:\OracleDB\product\11.1.0\db_1\BIN> dir E:\oracle\thetis_iv\arch
Datenträger in Laufwerk E: ist Volume
Volumeseriennummer: 3EBD-77E5
Verzeichnis von E:\oracle\thetis_iv\arch
06.04.2011 15:08 <DIR> .
06.04.2011 15:08 <DIR> ..
0 Datei(en), 0 Bytes
2 Verzeichnis(se), 41.090.396.160 Bytes freirman deleted all archive logs, even I they are on tape only once by now.
Thats not what I expected. Where is my mistake?Hi,
I do new tests it's very strange.
BACKUP ARCHIVELOG command is not obeying the policy of archivelog.
You can open a SR on MOS. (to check bugs)
I reproduce the same test and the result was the same, it seems that this is a bug.
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;
RMAN> backup archivelog all not backed up 2 times delete all input;
Starting backup at 06-APR-11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=15 RECID=16 STAMP=747753711
input archived log thread=2 sequence=20 RECID=17 STAMP=747753714
input archived log thread=1 sequence=16 RECID=19 STAMP=747753729
input archived log thread=2 sequence=21 RECID=18 STAMP=747753729
channel ORA_DISK_1: starting piece 1 at 06-APR-11
channel ORA_DISK_1: finished piece 1 at 06-APR-11
piece handle=+DATA/orcl/backupset/2011_04_06/annnf0_tag20110406t132210_0.304.747753731 tag=TAG20110406T132210 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_1_seq_15.293.747753711 RECID=16 STAMP=747753711
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_2_seq_20.295.747753715 RECID=17 STAMP=747753714
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_1_seq_16.294.747753729 RECID=19 STAMP=747753729
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_2_seq_21.298.747753729 RECID=18 STAMP=747753729
Finished backup at 06-APR-11
RMAN> list archivelog all;
specification does not match any archived log in the repositoryOracle Docs Says:
The BACKUP ARCHIVELOG ... DELETE INPUT command deletes archived log files after they are backed up.
This command eliminates the separate step of manually deleting archived redo logs.
With DELETE INPUT, RMAN deletes only the specific copy of the archived log chosen for the backup set.
With DELETE ALL INPUT, RMAN deletes each backed-up archived redo log file from all log archiving destinations.
As explained in "Configuring an Archived Redo Log Deletion Policy",
the BACKUP ... DELETE INPUT and DELETE ARCHIVELOG commands obey the archived redo log deletion policy
for logs in all archiving locations. For example, if you specify that logs should only be deleted when backed
up at least twice to tape, then BACKUP ... DELETE honors this policy.http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmbckba.htm#BRADV89524
But in ours case it's not honors this policy.
Only with the FORCE command should this happen. But it is not our case.
Oracle Docs:
If FORCE is not specified on the deletion commands,
then these deletion commands obey the archived log deletion policy.
If FORCE is specified, then the deletion commands ignore the archived log deletion policy.http://download.oracle.com/docs/cd/E11882_01/backup.112/e10643/rcmsynta010.htm#RCMRF113
Alternatively you can do the following:
Set the commands separately.
Check this:
RMAN> run {
2> backup archivelog all not backed up 2 times ;
3> delete archivelog all backed up 2 times to disk;
4> }
Starting backup at 06-APR-11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=2 sequence=22 RECID=21 STAMP=747755128
input archived log thread=1 sequence=17 RECID=20 STAMP=747755127
channel ORA_DISK_1: starting piece 1 at 06-APR-11
channel ORA_DISK_1: finished piece 1 at 06-APR-11
piece handle=+DATA/orcl/backupset/2011_04_06/annnf0_tag20110406t134528_0.295.747755129 tag=TAG20110406T134528 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 06-APR-11
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=78 instance=orcl1 device type=DISK
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_1_seq_17.298.747755127 thread=1 sequence=17
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=+DATA/orcl/archivelog/2011_04_06/thread_2_seq_22.294.747755129 thread=2 sequence=22
RMAN>Edited by: Levi Pereira on Apr 6, 2011 1:35 PM -
DB version: 11.1.0.7
when I issue cmd " alter system archive log current", the alertlog raise error "Thread 1 cannot allocate new log, sequence 149, Private strand flush not complete".
I think it's normal, because in the log file , here some dirty data have NOT been written to the data_files, so it can raise the error Private strand flush not complete.
BUT in my point, when I issue the cmd "alter system checkpoint" and then, subsequently, I issue the " alter system archive log current", there shoud not raise any error" becasue the dirty data already been written via the cmd "alter system checkpoint". but in the alertlog the error still here (Private strand flush not complete).
that's why, How can I understand that. thanks!To understand it, please check Doc 372557.1 Alert Log Messages: Private Strand Flush Not Complete
and
cannot allocate new log&Private strand flush not complete
Edited by: Fran on 25-jun-2012 1:07 -
Need to restore a table which is del by mistake my archive log is on
Hi Guru's
i took full backup through RMAN. My archive log in ON.
After taking backup one of table is deleted by mistake ,how can i restore it ?
ThanksHello,
The solution depends on your Oracle Release and if you enabled RECYCLE BIN and/or FLASHBACK LOG.
If the Table was dropped and you are in Oracle *9.2* or earlier release, you need to Restore/Recover the Database (from the RMAN BACKUP) to a time before the Table was dropped, somewhere else (another server,...). Then from this Database you may export the Table and import it to the original Database.
If the rows of the Table were just Deleted (so the Table still exists), you may (in 9.2) use FLASHBACK QUERY to get back the deleted rows.
If you are in *10.1* or later release, then if the Table was dropped you may use FLASHBACK DROP to get it back (see the previous post from Kamran). If the rows were just deleted (so the Table still exists) you may use FLASHBACK QUERY or more efficiently FLASHBACK TABLE:
http://www.oracle-developer.net/display.php?id=313
About FLASHBACK QUERY, it depends on the Undo Retention time (it should be large enough), and the table shouldn't have Column of specific Datatype like LONG or LOB:
http://www.orafaq.com/node/50
Hope this help.
Best regards,
Jean-Valentin -
DB Back to a Specific Time with Archive Logs (Until cancel or time?)
I'll try to be as clear as possible with my intended goals and the limitations of the system I'm working with:
1. We have a test instance of our Oracle DB that I would like to be able to refresh with data from the production instance at any time, without having to shut down the production database or put tablespaces into hot backup mode.
2. Both systems are HP Itanium boxes with differing numbers of CPUs and RAM. Those differences have been taken into account in the init.ora file for the DB instances.
3. The test and production instances are using a SAN to hold the following file systems: ora_redo1, ora_redo2, ora_archlog, oradata10g. The test instance is using SAN snapshots (HP EVA series SAN) of the production file systems to pull the data over when needed. The problem is that the only window to do this is when the production system is down for nightly maintenance which is about a 20 minute period. I want to escape this limitation.
What I've been doing is using the HP SAN to take snapshots of the file systems on the production system mentioned above. I do this while the production DB is up and running. I then import those snapshots into the test system, run an fsck to ensure file system integrity, then start up the Oracle instance as follows:
startup mount
Then I run the following query I found on line to determine the current redo log:
select member from v$logfile lf , v$log l where l.status='CURRENT' and lf.group#=l.group#;
Then I attempt to run a recovery as follows:
recover database using backup controlfile until cancel;
When prompted, I enter the path to the first of the current redo logs and hit enter. After waiting, sometimes it says that the recovery completed, other times it stops saying there was an error and that more files are needed to make the DB consistent.
I took the above route because doing a recover until time (which is what I really want to do) kept prompting me for the next archive log in sequence that didn't yet exist when I took the SAN snapshot. Here was my recover until time command:
recover database until time 'yyyy-mm-dd:hh:mm:ss' using backup controlfile;
What I would like to do is take the SAN snapshot and then recover the database to about a minute before the snapshot using the archive logs. I don't want to use RMAN since that seems to be overkill for this purpose. A simple recovery to a specific point in time seems to be all that is needed and I have archive logs which, I assume, SHOULD help me get there. Even if I have to lose the last hour's worth of transactions I could live with that. But my tests setting the specific time of recovery to even 12 hours earlier still resulted in a prompt for the next, non-existent archivelog.
I will also note that I even tried copying the next archive log over once it did exist and the recovery would then prompt me for the next archive log! I will admit right now that I really don't know a whole lot about Oracle or DBs, but it's my task to try and make it possible to "refresh" the test DB with the most recent data with no impact on the production DB.
The reason I don't want to use hot backup mode is that I don't know the DB schema other than there are probably 58 or more tablespaces. The goal is to use SAN snapshots for their speed instead of having to take RMAN files and copy them to the test instance. I'm sure I'm not the only person who has ever tried this. But most of what I've found on line refers to RMAN, hot backup mode, or down time. The first two don't take advantage of SAN snapshots for a quick swap of all the Oracle file systems and I can't afford downtime other than that window at night. Is there some reason that the recover to time didn't work even though I have archive logs?
One final point. The recover until cancel actually worked a couple of times, but it seems to be sporadic. It likely has something to do with what was happening on the production DB when I created the SAN snapshots. I actually thought I had a solution with recover until cancel last week until it didn't work three times in a row.I haven't completely discounted it but it seems like I would need to back up to files, then restore from files. I don't want to do that. I want a full file system level SAN snapshot that I can just drop into place. The does work when the production base is shut down. However, considering that I do have archive logs, shouldn't it be possible to use them to recover to a specific scene without having to do an RMAN backup at all? It seems that doing an RMAN backup/recovery would just make this whole process a lot longer since the DB is 160 gigs in size (not huge, but the dump would take more time than I would like). With a SAN snapshot, if I can get this to work, I'm looking at about a 15-20 minute period of time to move the production DB over to test.
Since you are suggesting that RMAN may be a better approach I'll provide more details about what I'm trying to do. Essentially this is like trying to recover a DB from a server that had its power plug pulled. I was hoping that Oracle's automatic recovery would do the same thing it would do in that instance. But obviously that doesn't work. What I want to do is bring over all the datafiles, redo logs, and archive logs using the SAN snapshot. Then if possible use some aspect of Oracle (RMAN if it can do it) to mount the database, then recover to a specific time or SCN if using RMAN. However, when I tried using RMAN to do it, I got an error saying that it couldn't restore the data file because it already existed. Since I don't want to start from scratch and have RMAN rebuild files that I've already taken snapshots of (needless copying of data), I gave up on the RMAN approach. But, if you know of a way to use RMAN so that it can recover to a specific incarnation without needing to runm a backup first, I am completely open to trying it. -
How to Recover database from old backup and full archive log file
Hi Oracle expert!
I met problem when restore my oracle database.
In my case:
- My database version: 10.2.0.2
- I have a database full backup (01-Nov)
- I have all Archived log file from (01-Nov -> 05-Nov)
- My database drop in 05-Nov with disk error (no datafile, no redo..).
- I have no any RMAN backup from (01-Nov -> 05-Nov)
How can i restore my database to 05-Nov?
Thanksuser10280724 wrote:
Hi Chinar.
When i used RMAN flow as your step, but i met the problem!
- After recover database i select sequence#, applied from v$archived_log;
--> it apply newest archived log that i had.
- but when I select Data from table created between 01-Nov to 05-Nov, it not found!
Not the same way the step:
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL?
It apply newest the same archived log i had table created between 01-Nov to 05-Nov.
How can i do with RMAN to recover my table?That is not possible,if your all available archive logs applied using rman or through sqlplus(recover database using backup controlfile until cancel) and one of these logs contain your table then there are not any problems.So there are not any difference between recovery using rman and user managed(using sqlplus),but there main matter is applying all archive logs.So first check through rman list copy of archivelog all or list backup of archivelog all and identify there in rman repository is any information or not about these logs. -
Changing the location of archive log from flash recovery area PLZ HELP!!!
Hi All,
My archive log is being stored in flash memory area which got full and the production server went down.
alert log file details.....
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 43432960 bytes disk space from 2147483648 limit
*** 2010-04-25 14:22:49.777 62692 kcrr.c
ARCH: Error 19809 Creating archive log file to
'/oracle/product/10.2.0/flash_rec
overy_area/EDWREP/archivelog/2010_04_25/o1_mf_1_232_%u_.arc'
*** 2010-04-25 14:22:49.777 60970 kcrr.c
kcrrfail: dest:10 err:19809 force:0 blast:1I removed the files and started the database,
Can someone kindly tell me as to how to avoid this problem in future by keeping archive log destination in flash recovery area.
I want to change the location of archive log files, can someone please guide me as to hiow to do that
I changed the size of flash recovery area for the time being, but i am afraid it will be full again!!
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG 99.44 0 57
BACKUPPIECE 0 0 0
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0
6 rows selected.
SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE = 4G ;
System altered.
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG 49.72 0 57
BACKUPPIECE 0 0 0
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0
6 rows selected.regards,
Edited by: user10243788 on Apr 25, 2010 6:12 AMuser10243788 wrote:
Hi All,
My archive log is being stored in flash memory area which got full and the production server went down.
alert log file details.....
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 43432960 bytes disk space from 2147483648 limit
*** 2010-04-25 14:22:49.777 62692 kcrr.c
ARCH: Error 19809 Creating archive log file to
'/oracle/product/10.2.0/flash_rec
overy_area/EDWREP/archivelog/2010_04_25/o1_mf_1_232_%u_.arc'
*** 2010-04-25 14:22:49.777 60970 kcrr.c
kcrrfail: dest:10 err:19809 force:0 blast:1I removed the files and started the database,
Can someone kindly tell me as to how to avoid this problem in future by keeping archive log destination in flash recovery area.
I want to change the location of archive log files, can someone please guide me as to hiow to do that
I changed the size of flash recovery area for the time being, but i am afraid it will be full again!!
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG 99.44 0 57
BACKUPPIECE 0 0 0
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0
6 rows selected.
SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE = 4G ;
System altered.
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG 49.72 0 57
BACKUPPIECE 0 0 0
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0
6 rows selected.regards,
Edited by: user10243788 on Apr 25, 2010 6:12 AMPointing the archive log dest (and/or the FRA) to a new location, or enlarging them, will do no good if you are not performing regular housekeeping on the archivelogs. You will just keep knocking down the same problem over and over.
If you simply delete the archivelogs at the OS level, the database will never know about it and it will continue to think the destination is full, based on records kept in the control file.
For regular housekeeping, you need to be doing something similar to this in rman:
run {
backup archivelog all not backed up 1 times tag='bkup_vlnxora1_arch';
delete noprompt archivelog all backed up 1 times to device type disk;
run {
delete noprompt obsolete;
crosscheck archivelog all;
delete noprompt expired archivelog all; -
What order are Archive logs restored in when RMAN recover database issued
Ok, you have a run block that has restored your level-0 RMAN backup.
Your base datafiles are down on disc.
You are about to start recovery to point in time, lets say until this morning at 07:00am.
run { set until time "TO_DATE('2010/06/08_07:00:00','YYYY/MM/DD_HH24:MI:SS')";
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
recover database;
So the above runs, it analyses the earlies SCN required for recovery, checks for incremental backups (none here), works out the archivelog range
required and starts to restore the archive logs. All as expected and works.
My question: Is there a particular order that RMAN will restore the archive logs and is the restore / recover process implemented as per the run block.
i.e Will all required archive logs based on the run block be restored and then the database recovered forward. Or is there something in RMAN that says restore these archive logs, ok now roll forwards, restore some more.
When we were doing this the order of the archive logs coming back seemed to be random but obviously constrained by the run block. Is this an area we need to tune to get recoveries faster for situations where incrementals are not available?
Any inputs on experience welcome. I am now drilling into the documentation for any references there.
ThanksHi there, thanks for the response I checked this and here are the numbers / time stamps on an example:
This is from interpreting the list backup of archivelog commands.
Backupset = 122672
==============
Archive log sequence 120688 low time: 25th May 15:53:07 next time: 25th May 15:57:54
Piece1 pieceNumber=123368 9th June 04:10:38 <-- catalogued by us.
Piece2 pieceNumber=122673 25th May 16:05:18 <-- Original backup on production.
Backupset = 122677
==============
Archive log sequence 120683 low time: 25th May 15:27:50 Next time 25th May 15:32:24 <-- lower sequence number restored after above.
Piece1 PieceNumber=123372 9th June 04:11:34 <-- Catalogued by us.
Piece2 PieceNumber=122678 25th May 16:08:45 <-- Orignial backup on Production.
So the above would show that if catalogue command you could influence the Piece numbering. Therefore the restore order if like you say piece number is the key. I will need to review production as to why they were backed up in different order completed on production. Would think they would use the backupset numbering and then piece within the set / availability.
Question: You mention archive logs are restored and applied and deleted in batches if the volume of archivelogs is large enough to be spread over multiple backup sets. What determines the batches in terms of size / number?
Thanks for inputs. Answers some questions. -
How to recover a database with archive log
how to recover database with archivle log
Hi,
With in information no one can tell the answer.
Kindly post your qusetion in details information, you want to recover the database in archive log mode, what type of error you get, bcoz depending up on the errors you recover your database,
please mention all about your database
cheers
Senthil Kumar
Maybe you are looking for
-
Address book groups: can't customize contacts with multiple email
I have many groups setup in address book and frequently like to use them. Additionally, several of my contacts assigned to groups have multiple email addresses. Is there a way to specifiy which email address of a contact's associates itself with the
-
Error:express document "Update was terminated" received from author
Hi All, I m creating shipment frm the transaction VL01. While creating the shimpment i am assigning one Z output type and clicking on the planning phase on the shipment. After that i am saving my shipment. At this point of time my shimpmnet is create
-
How to set delta load in process chain
hello all The scenario is i created process chain for transaction data and all the infopackages are in initial load now I want to do delta,how to set delta in process chain,bcoz only the new records should load? kindly anyone let me know. regards bal
-
How to create transport request for business function activation?
Hi Gurús, I activated LOG_MM_MAA_1 business function in development (DEV) system: Component: SAP_APPL Release: 604 Level: 0006 SP: SAPKH60406 I want to transport the activation to quality (QAS) system. In SFW5 transaction --> System Settings --> Tran
-
How to change validity in info record
dear experts , how to change validity in info record Srithar K