Recover with RMAN

Hi Experts,
I have a question
i have a backup strategy with rman that create a data file copy and some backupset for other next days
i can restore and recover my database until last exist ARCHIVE LOG without any problem.
now i want to know how can i recover database again until last transaction in redo log if i had db redo log file???
can rman recover from redo log until last transaction register in redolog??
if yes how can i do this?
Thanks
Best Regards

Hi,
1) I think with 3 kind of backup file i have my DB until last transaction that save in online redolog file. is it true?
suppose that we restore database from full backup.
so we have a DB from time full backup time without transactions in archivelogs and redolog file.
now we want recover database until last transaction.we can use two command for this goal:
a. RECOVER DATABASE UNTIL SEQUENCE [last archivelog sequence# + 1];
this command complete successfully and we can open database with resetlogs. but data is until last archive log so u don't have transaction in redolog file.
b. RECOVER DATABASE;
this command always complete with error that says sequence number [last archivelog sequence# + 1 ] not found.
so we found out that this command only see archivelogs, not archivelogs and redolog files.
and i don't know if we can open this database with resetlogs option.
As mentioned by before poster, the redolog files are not backed up and there is needless to take a backup of the redolog and transfer it to the new server. n
2) please tell me how can i introduce redologs to rman?  should i copy them in the same address with their address in control file??
In the RMAN command you must archive the current redolog  file before backing up the archivelogs, which will ensure you will have a upto date  backup. Let me share one of my coding:
RUN
ALLOCATE CHANNEL RMAN_BACK_CH01 TYPE DISK;
ALLOCATE CHANNEL RMAN_BACK_CH02 TYPE DISK;
ALLOCATE CHANNEL RMAN_BACK_CH03 TYPE DISK;
BACKUP
AS BACKUPSET
TAG 'FULL_DATABASE'
FORMAT '/u01/backup/DBFILES_%F’;
DATABASE
SQL 'ALTER SYSTEM SWITCH LOGFILE';
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
RUN
BACKUP
AS BACKUPSET
TAG 'ARCHIVELOGS_ALL'
FORMAT '/u01/backup/ARCHIVELOGS_%F’
DELETE INPUT;
ARCHIVELOG ALL
Hope this helps!
Thanks &
Best Regards,

Similar Messages

  • Logical Standby recover with RMAN

    Hi All,
    I have a test environment with Primary DB Server, Physical Standby and Logical Standby.
    The Logical Standby DB (cur_log_stdb) is backed up every evening by RMAN and I have a question:
    If I recover my Logical Standby DB from backup and switch replication to new Logical Standby DB (new_log_stdb) it will work or not?
    My steps e.g.:
    1. Make a new server for my new_log_stdb and repair structure of catalogs;
    2. Repair listener.ora and tnsnames.ora files from cur_log_stdb to new_log_stdb;
    3. Restore DB with RMAN from backup to new_log_stdb;
    4. On cur_log_stdb execute "alter database stop logical standby apply";
    5. Change a DNS name from cur_log_stdb to new_log_stdb;
    6. On new_log_stdb execute "alter database start logical standby apply immediate";
    I'm not sure that archivelogs will apply to the new_log_stdb for period since rman backup was created.
    But if this plan won't work how can I restore Logical Standby DB from RMAN backup and resume replication from Primary?
    Configuration:
    Oracle Linux 6.4
    Oracle Database 11.2.0.3
    Primary and Physical with Data Guard

    Hello;
    The only way to know for sure is to test it. You are asking somebody you don't know to confirm a recovery test for you. You have to perform the test yourself to be certain.
    If your plan does not work you can always rebuild the Standby.
    Best Regards
    mseberg

  • Got error while recover controlfile with rman

    Dear all,
    My controlfile and some datafiles were crash and i tried to recover their with rman as the following step:
    1. startup nomount;
    2. restore controlfile from autobackup;
    3. alter database mount;
    4. restore database;
    5.SELECT archivelog_change#-1 FROM v$database;
    ARCHIVELOG_CHANGE#-1
    1301671
    6.run {
    set until scn 1301671;
    recover database;
    executing command: SET until clause
    Starting recover at 01 พ.ย. 2006
    using channel ORA_DISK_1
    starting media recovery
    media recovery failed
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 11/01/2006 15:38:01
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database reco
    ver if needed
    start until change 1301671 using backup controlfile
    ORA-00283: recovery session canceled due to errors
    ORA-01190: controlfile or data file 1 is from before the last RESETLOGS
    ORA-01110: data file 1: 'C:\ORACLE\ORADATA\DB01\SYSTEM01.DBF'
    What happend? Please give me some advise.
    Thaks for advance !
    Chara

    After every resetlogs you have to take fresh backup.
    It seems you have opened your database in resetlogs and your backup is prior to this resetlogs.So the controlfile is showing inconsistance with the other datafiles.

  • Migrating with RMAN from 10g to 11g

    Hi gurus,
    I am following the following procedure to migrate database from 10g to 11g using rman
    Source side:
    RMAN>connect target
    RMAN>backup database;
    RMAN>backup archivelog all;
    RMAN>backup current controlfile;
    SQL> create pfile from spfile;
    Copied datafile, archivelog backup files and pfile and password files to target side. i.e. on 11g server side
    Target side:
    Set proper parameters for 11g
    SQL>startup nomount;
    RMAN>connect target
    RMAN>set dbid=<source database id>
    RMAN>catalog start with '<rman backup file location';
    RMAN>restore controlfile;
    RMAN>run
    set newname for datafile 1 to '<target datafiles location with file name';
    restore database;
    switch datafile all;
    finished
    upto now it's success full when i am trying to recover
    RMAN>recover database;
    it is saying
    rman 00571
    rman 00569
    rman 00571
    rman 03002
    ora - 19698
    can you please suggest the solution for this.
    thanks a lot.

    I'm not sure what you're doing is supported.
    You are taking a 10g database and restore and recover it using 11g software.
    I think you are allowed to do that with 10g software only.

  • Auxiliary channel allocation in TSPITR with RMAN-managed instance

    Hi,
    I'm trying do perform TSPITR with RMAN-managed auxiliary instance. All backups are stored on tape. I need to send MML environment values while allocating auxiliary channel to connect to correct NetWorker server and send other NetWorker parameters.
    Unfortunately I have issues with sending these params - I can't send them from recover RUN block, as auxiliary instance does not exists at the time when I'm starting to execute script. (example from test env using disk channels)
    RMAN> RUN
    2> {
    3> ALLOCATE CHANNEL c1 DEVICE TYPE disk;
    4> ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE disk;
    5> SET NEWNAME FOR DATAFILE 1 TO '/u01/backup/tspitr/10gdb2/system01.f';
    6> SET NEWNAME FOR DATAFILE 2 TO '/u01/backup/tspitr/10gdb2/undo01.f';
    7> SET NEWNAME FOR DATAFILE 7 TO '/u01/backup/tspitr/10gdb2/hr_bak01.f';
    8> SET AUXILIARY INSTANCE PARAMETER FILE TO '/home/oracle/params_auxinit.ora';
    9> RECOVER TABLESPACE hr_test UNTIL TIME "SYSDATE - 1/4"
    10> AUXILIARY DESTINATION '/u01/backup/tspitr/10gdb2';
    11> RELEASE CHANNEL c1;
    12> RELEASE CHANNEL aux1;
    13> }
    allocated channel: c1
    channel c1: sid=141 devtype=DISK
    released channel: c1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of allocate command at 04/07/2010 17:21:53
    RMAN-06174: not connected to auxiliary databaseI know I can do it using configure, but is there any way to set this on session level?
    10.2.0.4, RHEL
    Thanks,
    Lukasz

    What can be done here, is to CONFIGURE AUXILIARY CHANNEL to set appropriate params for auxiliary instance (without allocating channels manually).
    I just wanted to know, if I can do it just for this one session (without permanent modification). What I can do, is:
    CONFIGURE AUXILIARY CHANNEL DEVICE TYPE sbt_tape PARMS 'mml settings';
    CONFIGURE CHANNEL DEVICE TYPE sbt_tape PARMS 'mml settings';
    CONFIGURE DEFAULT DEVICE TYPE TO sbt_tape;
    RUN
    (new names, auxiliary parameter file)
    RECOVER TABLESPACE ...
    CONFIGURE AUXILIARY CHANNEL DEVICE TYPE sbt_tape CLEAR;
    CONFIGURE CHANNEL DEVICE TYPE sbt_tape CLEAR;
    CONFIGURE DEFAULT DEVICE TYPE CLEAR;I just wanted more 'elegant' solution.
    Update:
    Due to bug no. 4768353 there is no possibility to use automatic channel allocation in auxiliary instance. Problem resolved by using own customized auxiliary instance started before recovery process. Channels have been allocated manually using ALLOCATE AUXILIARY CHANNEL c1 DEVICE TYPE sbt... on already running aux.
    Thanks,
    Lukasz
    Edited by: Łukasz Mastalerz on Apr 19, 2010 6:47 PM

  • Oracle 3113 creating a standby with rman

    Hello,
    environment is 11gR2 on Linux.
    Tested on CentOS 5.5 as OS and local LAN as interconnect and the duplicate command terminates successfully in some minutes.
    Same script but using oel 5.5 and a wan (3Mbit/s) and I keep getting 3113 errors after about 2h or 3h.
    I suspect some timeout on wan (that is over vpn) but I would also like to trace something at my side.
    I run a shell script with nohup and send it to background and this is the log, from which you can see the rman script:
    Recovery Manager: Release 11.2.0.1.0 - Production on Tue Sep 7 14:50:11 2010
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    RMAN>
    connected to target database: TESDB1 (DBID=11492743)
    RMAN>
    connected to auxiliary database: DUMMY (not mounted)
    RMAN>
    RMAN> run{
    2> allocate channel prmy1 type disk;
    3> allocate auxiliary channel stby1 type disk;
    4> duplicate target database for standby from active database
    5> spfile
    6> parameter_value_convert 'TESDB1','TESDB1DR'
    7> set db_file_name_convert='/TESDB1/','/TESDB1DR/'
    8> set log_file_name_convert='/TESDB1/','/TESDB1DR/'
    9> set 'db_unique_name'='TESDB1DR'
    10> set control_files='/app/oradata/TESDB1DR/control01.ctl','/app/oradata/flash_recovery_area/TESDB1DR/control02.ctl'
    11> set db_recovery_file_dest='/app/oradata/flash_recovery_area'
    12> set DB_RECOVERY_FILE_DEST_SIZE='4977M'
    13> nofilenamecheck;
    14> }
    using target database control file instead of recovery catalog
    allocated channel: prmy1
    channel prmy1: SID=12 device type=DISK
    allocated channel: stby1
    channel stby1: SID=135 device type=DISK
    Starting Duplicate Db at 07-SEP-10
    executing Memory Script
    executing command: SET NEWNAME
    renamed tempfile 1 to /app/oradata/TESDB1DR/temp01.dbf in control file
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting backup at 07-SEP-10
    channel prmy1: starting datafile copy
    input datafile file number=00003 name=/app/oradata/TESDB1/undotbs01.dbf
    .. after about three hours (and 3.2Gb transferred) it continues with:
    RMAN-03009: failure of backup command on prmy1 channel at 09/07/2010 17:53:49
    RMAN-06136: ORACLE error from auxiliary database: ORA-03113: end-of-file on communication channel
    Process ID: 3187
    Session ID: 192 Serial number: 3
    continuing other job steps, job failed will not be re-run
    .. after 15 minutes:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 09/07/2010 18:09:35
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on clone_default channel at 09/07/2010 18:09:34
    RMAN-10038: database session for channel clone_default terminated unexpectedly
    RMAN> **end-of-file**
    RMAN>
    Recovery Manager complete.
    the undo tbs is 3.2 Gb so I'm not sure if the 3113 happens at the end of copy... but the tablespace doesn't succeed
    and the other jobs don't start even if it says "continuing other job steps"..
    rman started at 14:50 and in listener at dr site I have:
    Tue Sep 07 14:50:55 2010
    07-SEP-2010 14:50:55 * service_update * TESDB1DR * 0
    07-SEP-2010 14:50:55 * (CONNECT_DATA=(SERVICE_NAME=TESDB1DR)(CID=(PROGRAM=oracle)(HOST=lb-orajde.boiron.ntm)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.49.1.93)(PORT=35240)) * establish * TESDB1DR * 0
    Tue Sep 07 15:00:58 2010
    07-SEP-2010 15:00:58 * service_update * TESDB1DR * 0
    Tue Sep 07 16:35:04 2010
    07-SEP-2010 16:35:04 * service_update * TESDB1DR * 0
    Tue Sep 07 17:02:04 2010
    07-SEP-2010 17:02:04 * service_update * TESDB1DR * 0
    07-SEP-2010 17:02:10 * service_update * TESDB1DR * 0
    Tue Sep 07 17:53:17 2010
    07-SEP-2010 17:53:17 * service_update * TESDB1DR * 0
    Tue Sep 07 18:09:00 2010
    07-SEP-2010 18:09:00 * (CONNECT_DATA=(SERVICE_NAME=TESDB1DR)(CID=(PROGRAM=rman)(HOST=lb-orajde.boiron.ntm)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.49.1.93)(PORT=32610)) * establish * TESDB1DR * 0
    In alert.log at dr site I have at 17:02 (about 50 minutes before error):
    Tue Sep 07 15:05:01 2010
    db_recovery_file_dest_size of 4977 MB is 0.00% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.
    Tue Sep 07 17:02:03 2010
    Fatal NI connect error 12170.
    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.1.0 - Production
    Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
    Time: 07-SEP-2010 17:02:03
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 110
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.49.1.93)(PORT=35226))
    some times (always at 17:02) and nothing more
    In alert.log at primary site:
    Tue Sep 07 14:50:36 2010
    Clearing standby activation ID 11529351 (0xafec87)
    The primary database controlfile was created using the
    'MAXLOGFILES 16' clause.
    There is space for up to 13 standby redo logfiles
    Use the following SQL commands on the standby database to create
    standby redo logfiles that match the primary database:
    ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;
    ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;
    ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;
    ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;
    Tue Sep 07 16:00:40 2010
    Thread 1 advanced to log sequence 759 (LGWR switch)
    Current log# 3 seq# 759 mem# 0: /app/oradata/TESDB1/redo03.log
    Tue Sep 07 16:00:41 2010
    Archived Log entry 528 added for thread 1 sequence 758 ID 0xafec87 dest 1:
    In sqlnet.log of primary site:
    Tue Sep 07 17:53:49 2010
    Fatal NI connect error 12170.
    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.1.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
    Time: 07-SEP-2010 17:53:49
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 110
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.12.41)(PORT=1521))
    and the same at 18:09
    No other errors.
    Any hints?
    BTW: what is the minimum size of undo tbs? Can I have compression enabled also during duplication if transport service is configured with COMPRESSION=ENABLED, or does it count only when copying redo files?
    Thanks in advance,
    Gianluca

    Thanks for your reply.
    I will try your suggestion as it could come useful some time.
    So with this alternate method at the end I would have standby aligned as of backup time, correct?
    And after running something like this on standby:
    SQL> alter database recover managed standby database disconnect from session;
    It will begin to receive, archive and apply redo logs, correct?
    Some answers regarding the original question. It was confirmed that there was a 2hours cut-off time at firewall level.
    The first datafile that the rman session began to copy was 3.2Gb in size, taking more than 2 hours completing.
    Monitoring with netstat on source and target I saw this at source during the duplicate process:
    tcp 0 0 10.49.1.93:46626 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46627 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46629 192.168.12.41:1521 ESTABLISHED
    tcp 0 369240 10.49.1.93:50371 192.168.12.41:1521 ESTABLISHED
    and the session bound to port 50371 was the only one pushing data (send queue not empty).
    The other 3 ones I presume are for control of rman session. I get 3 sessions even if I open only one channel on primary side.
    After the first datafile completes copy, a new session (with port 14871) is established substituting the other one.
    The three initial ones instead remain for all the duplicate process.
    tcp 0 487872 10.49.1.93:14871 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46626 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46627 192.168.12.41:1521 ESTABLISHED
    tcp 0 0 10.49.1.93:46629 192.168.12.41:1521 ESTABLISHED
    So after the copy of the first file, the session come back to one or more of the initial 3 ones, and they probably make a push-ack, got a 3113 as the firewall has silently cut them after 2 hours.... and the datafile, even if completed, is not marked as completed. A new run would copy again it...
    Now the time has been put to 8hours, with 24hours being the maximum value set (no disable possible as far as the network guy said...).
    And the duplicate completed correctly.
    Would I have to fear any problems with this cut-off due to "normal" dataguard operations or not, in your opinion?
    Thanks
    Gianluca

  • Trying to restore a database with RMAN in new server

    Hello,
    Database: Oracle 10gR2
    O/S: Windows Server 2003
    My RMAN backuppieces are stored in a network drive:
    \\old_location\FULL
    and
    \\old_location\INC
    I'm trying to restore a whole database with RMAN in another server from my FULL backup.
    For that, I copy all backuppieces files
    from: \\old_location\FULL
    to new server: D:\new_location\
    Also I created the relevant folder hierarchy under <ORACLE_BASE> directory, as follows:
    a. Create BDUMP, CDUMP, and UDUMP directories under '<ORACLE_ BASE>\admin' directory
    b. Create <DATABASE_NAME> directory under '<ORACLE_BASE>\oradata' directory
    c. pfile.ora and controlfile (CTL_MTDPROD_2308_20120401_1.CTL) are backup from original database and they are in D:\new_location\
    d. I copied pfile.ora and controlfile to folder: C:\oracle\product\10.2.0\db_1\database\
    I started creating an instance in new server from scratch:
    C:\>oradim -new -sid MTDPROD -intpwd mtdprod
    C:\> SET ORACLE_SID=MTDPROD
    C:\> rman
    RMAN> connect target sys
    RMAN> SET DBID=21692876873
    RMAN> STARTUP force nomount PFILE=C:\oracle\product\10.2.0\db_1\database\init_mtdprod.ora
    RMAN> restore controlfile from 'C:\oracle\product\10.2.0\db_1\database\CTL_MTDPROD_2308_20120401_1.CTL';
    RMAN> alter database mount;
    #Since I want to read my backuppieces from D:\new_location and not from \\old_location\FULL then I catalog and restore like:
    RMAN> catalog start with 'D:\new_location\';
    RMAN> restore database;
    Starting recover at 25/04/12
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=541 devtype=DISK
    channel ORA_DISK_1: starting incremental datafile backupset restore
    channel ORA_DISK_1: specifying datafile copies to recover
    recovering datafile copy fno=00003 name=D:\BD_MTDPROD\CONTROLFILES\SYSAUX01.DBF
    recovering datafile copy fno=00004 name=D:\BD_MTDPROD\CONTROLFILES\USERS01.DBF
    recovering datafile copy fno=00007 name=D:\BD_MTDPROD\DATAFILES_DATA\MSE.ORA
    recovering datafile copy fno=00010 name=D:\BD_MTDPROD\DATAFILES_DATA\EXPEDIENTES2.ORA
    channel ORA_DISK_1: reading from backup piece \\old_location\FULL\FULL_MTDPROD_20120401_2304_1.BAK
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: failover to piece handle=D:\new_location\FULL\FULL_MTDPROD_20120401_2304_1.BAK tag=TAG20120401T190004
    .....(continues)
    Questions:
    1. RMAN still reads from old_location. The only way to avoid that would be deleting all files from \\old_location\FULL ?
    2. The message "failover to piece handle=D:\new_location\...." indicates that that file is not usefull? I just copy them from old_location to new_location... how can they get useless?
    I suspect there is something in controlfile that redirects to \\old_location\FULL\ and doesn't let to read from D:\new_location\
    Please, advice.

    user521219 wrote:
    Questions:
    1. RMAN still reads from old_location. The only way to avoid that would be deleting all files from \\old_location\FULL ?
    2. The message "failover to piece handle=D:\new_location\...." indicates that that file is not usefull? I just copy them from old_location to new_location... how can they get useless?
    I suspect there is something in controlfile that redirects to \\old_location\FULL\ and doesn't let to read from D:\new_location\Is this a cold backup? Did you change the location of control file in your PFILE or is it still pointing to old location?
    You may want to check the output of RESTORE DATABASE PREVIEW command, which will just report which backup files it uses without actually restoring thhe DB.

  • Recovery Logical Standby with RMAN

    Hi All,
    I have a test environment with Primary DB Server, Physical Standby and Logical Standby.
    The Logical Standby DB (cur_log_stdb) is backed up every evening by RMAN and I have a question:
    If I recover my Logical Standby DB from backup and switch replication to new Logical Standby DB (new_log_stdb) it will work or not?
    My steps e.g.:
    1. Make a new server for my new_log_stdb and repair structure of catalogs;
    2. Repair listener.ora and tnsnames.ora files from cur_log_stdb to new_log_stdb;
    3. Restore DB with RMAN from backup to new_log_stdb;
    4. On cur_log_stdb execute "alter database stop logical standby apply";
    5. Change a DNS name from cur_log_stdb to new_log_stdb;
    6. On new_log_stdb execute "alter database start logical standby apply immediate";
    I'm not sure that archivelogs will apply to the new_log_stdb for period since rman backup was created.
    Configuration:
    Oracle Linux 6.4
    Oracle Database 11.2.0.3
    Primary and Physical with Data Guard

    You might get better responses in the DataGuard forum ("space").
    I am sceptical if this plan would work.
    Hemant K Chitale

  • Problem with RMAN incomplete recovery

    Oracle Version: 9i
    Operating System: Windows 2000
    I have a problem with RMAN incomplete recovery until sequence.
    According to my database structure ............
    SQL> SELECT GROUP#,SEQUENCE#,THREAD# FROM V$LOG;
    GROUP# SEQUENCE# THREAD#
    1 14 1
    2 13 1
    3 12 1
    I took the backup of backup of full database using RMAN and i am trying to recover like this:
    RUN
    ALLOCATE CHANNEL C1 TYPE DISK;
    SET UNTIL SEQUENCE 7 THREAD 1;
    RESTORE DATABASE;
    RECOVER DATABASE;
    ALTER DATABASE OPEN RESETLOGS;
    BUT i am getting a message saying there is no backup of DATAFILE 1,2,......10 to restore although my database is in archivelog mode and i took a backup.
    Yachendra

    Please consult v$backup_datafile.
    It will tell you when the file was backed up.
    RMAN will always search for a datafile backup prior to the logsequence or whatever is limiting the incomplete recovery.
    Likely when you made your backup Oracle was already past sequence 7.
    Sybrand Bakker
    Senior Oracle DBA

  • Tablespace Point in Time Recovery fails with RMAN-06026:

    I have cataloged with RMAN the datafiles from Snapshot backup. Still it fails with the following error.
    RMAN> RECOVER TABLESPACE TSPC UNTIL TIME "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')" AUXILIARY DESTINATION '/tmp/auxpran';
    Starting recover at 03-APR-13
    using channel ORA_DISK_1
    RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time
    List of tablespaces expected to have UNDO segments
    Tablespace SYSTEM
    Tablespace UNDOTBS1
    Creating automatic instance, with SID='Ebgt'
    initialization parameters used for automatic instance:
    db_name=ORCL
    db_unique_name=Ebgt_tspitr_ORCL
    compatible=11.2.0.0.0
    db_block_size=8192
    db_files=200
    sga_target=280M
    processes=50
    db_create_file_dest=/tmp/auxpran
    log_archive_dest_1='location=/tmp/auxpran'
    #No auxiliary parameter file used
    starting up automatic instance ORCL
    Oracle instance started
    Total System Global Area 292933632 bytes
    Fixed Size 1336092 bytes
    Variable Size 100666596 bytes
    Database Buffers 184549376 bytes
    Redo Buffers 6381568 bytes
    Automatic instance created
    Running TRANSPORT_SET_CHECK on recovery set tablespaces
    TRANSPORT_SET_CHECK completed successfully
    contents of Memory Script:
    # set requested point in time
    set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
    # restore the controlfile
    restore clone controlfile;
    # mount the controlfile
    sql clone 'alter database mount clone database';
    # archive current online log
    sql 'alter system archive log current';
    # avoid unnecessary autobackups for structural changes during TSPITR
    sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
    executing Memory Script
    executing command: SET until clause
    Starting restore at 03-APR-13
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=19 device type=DISK
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: copied control file copy
    input file name=/tmp/auxpran/controlbc.ctl
    output file name=/tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl
    Finished restore at 03-APR-13
    sql statement: alter database mount clone database
    sql statement: alter system archive log current
    sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
    contents of Memory Script:
    # set requested point in time
    set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
    # set destinations for recovery set and auxiliary set datafiles
    set newname for clone datafile 1 to new;
    set newname for clone datafile 3 to new;
    set newname for clone datafile 2 to new;
    set newname for clone tempfile 1 to new;
    set newname for datafile 5 to
    "+DG_DATA/orcl/datafile/tspc.268.811733685";
    # switch all tempfiles
    switch clone tempfile all;
    # restore the tablespaces in the recovery set and the auxiliary set
    restore clone datafile 1, 3, 2, 5;
    switch clone datafile all;
    executing Memory Script
    executing command: SET until clause
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    renamed tempfile 1 to /tmp/auxpran/ORCL/datafile/o1_mf_temp_%u_.tmp in control file
    Starting restore at 03-APR-13
    using channel ORA_AUX_DISK_1
    One or more auxiliary set datafiles could not be removed
    Removing automatic instance
    shutting down automatic instance
    database dismounted
    Oracle instance shut down
    Automatic instance removed
    auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl deleted
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 04/03/2013 02:32:55
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    Could anyone please reply ASAP?
    Regards,
    Pranam

    I had created a snapshot of the database(datafiles and archivelogs) and cataloged them.
    CATALOG START WITH "+TBL_DG_DATA/ORCL/DATAFILE/" NOPROMPT;
    catalog start with "+DG_ARCH/ORCL/ARCHIVELOG/" NOPROMPT;
    The time i gave was after the snapshot was created.
    When it failed the first time I created another controlfile using
    sql "alter database backup controlfile to ''/tmp/auxpran/controlbc.ctl''";
    And ran the recover command after the time after i generated this controlfile. Changed nothing else. TSPITR completed successfully. But it had failed first time. Cannot figure how it ran the second time but failed the first time.
    Removing automatic instance
    Automatic instance removed
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_temp_8opndd87_.tmp deleted
    auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_3_8opnd1o6_.log deleted
    auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_2_8opncy32_.log deleted
    auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_1_8opncv7d_.log deleted
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_sysaux_8opn516p_.dbf deleted
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_undotbs1_8opn4j14_.dbf deleted
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_system_8opmyvly_.dbf deleted
    auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opmy14q_.ctl deleted
    Finished recover at 03-APR-13

  • Standby db in R/W mode with RMAN

    Hello,
    I have a test environment that I have a physical non-managed standby database created in a virtual machine. I would like to use a physical standby database for read/write testing and reporting. I've been implementing the Data Guard Scenarios and tried to see if I can revert the activated database back to a physical standby database. However, I keep receiving the following error when I try to open the standby in read only mode:
    ORA-16004: backup database requires recovery
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
    Note: The standby db starts up as follows:
    startup nomount pfile=C:\oracle\product\10.2.0\db_2\database\initORCLstdby.ora;
    alter database mount standby database;
    Once every x minutes, a batch job ships the logs from the primary to the secondary and runs the following:
    connect / as sysdba
    spool c:\scripts\logapply.log
    alter database recover automatic standby database until cancel;
    alter database recover cancel;
    Here's the steps I've done:
    1. On the standby database, query the V$DATABASE view and record the current SCN of the standby database:
    SQL> SELECT CURRENT_SCN FROM V$DATABASE;
    CURRENT_SCN
    1804721
    2. This step didn't work/isn't necessary:
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL
    ERROR at line 1:
    ORA-16136: Managed Standby Recovery not active
    3. Connect to the standby database as the RMAN target and create an incremental backup from the current SCN of the standby database that was recorded in step 1:
    RMAN> connect target "system/password"
    connected to target database: ORCL (DBID=xxxxx, not open)
    RMAN> BACKUP INCREMENTAL FROM SCN 1804721 DATABASE FORMAT 'C:\tmp\ForStandby_%U' tag 'FOR STANDBY';
    4. Connect to the standby database as the RMAN target, and catalog all incremental backup pieces:
    RMAN> CATALOG START WITH 'c:\tmp\ForStandby_';
    5. On the primary database, switch logs so the SCN of the restore point (created in step 1) will be archived on the physical standby database and ship it to the standby database:
    SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
    6. Activate the physical standby database:
    SQL> ALTER DATABASE ACTIVATE STANDBY DATABASE;
    SQL> STARTUP MOUNT FORCE;
    SQL> ALTER DATABASE OPEN;
    Make any write changes on the activated standby database.
    7. Revert the activated database back to a physical standby database.
    SQL> STARTUP MOUNT FORCE;
    Connect to the standby database as the RMAN target and apply incremental backups
    Open another session for RMAN:
    RMAN> RECOVER DATABASE NOREDO;
    Back to SQL session
    SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
    SQL> SHUTDOWN IMMEDIATE;
    I then run a batch file that automatically start the standby database and recover from the shipped archive logs:
    startup nomount pfile=C:\oracle\product\10.2.0\db_2\database\initORCLstdby.ora;
    alter database mount standby database;
    SQL> alter database recover automatic standby database until cancel;
    alter database recover automatic standby database until cancel
    ERROR at line 1:
    ORA-00279: change 1804724 generated at 04/25/2008 18:14:16 needed for thread 1
    ORA-00289: suggestion : C:\ARCHIVELOGS\NODE2\ARCH_1_1_652990391.ARC
    ORA-00280: change 1804724 for thread 1 is in sequence #1
    ORA-00278: log file 'C:\ARCHIVELOGS\NODE2\ARCH_1_1_652990391.ARC' no longer
    needed for this recovery
    ORA-00308: cannot open archived log
    'C:\ARCHIVELOGS\NODE2\ARCH_1_1_652990391.ARC'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    SQL> alter database recover cancel;
    alter database recover cancel
    ERROR at line 1:
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
    I've tried another approach to step 7:
    SQL> STARTUP MOUNT FORCE;
    SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
    SQL> STARTUP MOUNT FORCE;
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
    I get an error if I try this:
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCO
    NNECT;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT
    ERROR at line 1:
    ORA-38500: USING CURRENT LOGFILE option not available without stand
    When I try to open the standby database in read only mode, I get this error:
    SQL> alter database open read only;
    alter database open read only
    ERROR at line 1:
    ORA-16004: backup database requires recovery
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
    I ran SELECT SEQUENCE#, FIRST_TIME FROM V$LOG_HISTORY; and found that the standby sequence# is only one sequence behind the test primary database.
    I'm stuck and would appreciate any help. Thank you.

    And how do you think you will conserve disk space with RMAN ?
    Stop and think about it : How can you revert a database AFTER you have Opened
    it Read/Write ? You need to flashback it OR restore it from a backup taken before
    the OPEN.
    So, you could have taken a backup to Tape or to alternate disk before OPENing the
    database. The backup to alternate disk can be via Flashback Recovery area or
    a regular RMAN (compressed, you want ?) backup. In the second case, you wouldn't
    be using a Flashback mechanism but a simple backup and restore method.

  • Backup set in the tape. copied into disk. how to recover using RMAN

    I have backup set in the tape. copied into disk. how to recover using RMAN
    any link and steps please

    It should be something like the following, but really you should read and understand the rman documentation first ...
    1. restore the controlfile
    sqlplus / as sysdba
    startup nomount
    exit
    rman
    connect target /
    restore controlfile from '/path to the controlfile backup piece';
    exit
    sqlplus / as sysdba
    alter database mount
    exit
    2. catalog the backup pieces
    rman
    connect target /
    catalog start with '/path to backup pieces';
    3. restore the database
    rman
    connect target /
    restore database
    4. recover the database
    rman
    connect target /
    recover database
    5. open the database
    sqlplus / as sysdba
    alter database open resetlogs;

  • Restore incremental backup with rman

    Dear Friends
    can u tell me how to restore an incremental backup with rman? i backup my rman with statement below :
    1. backup full database format '/oracle/PRD/sapbackup/%U';
    the results was :
    -rw-r----- 1 oraprd dba 19006996480 Jun 10 12:08 0ojiit4n_1_1
    -rw-r----- 1 oraprd dba 12746752 Jun 10 12:08 0pjiiu6b_1_1
    2. after that i do incremental backup :
    backup incremental level 1 cumulative database format '/oracle/PRD/sapbackup/%U';
    the results was :
    -rw-r----- 1 oraprd dba 173400064 Jun 10 13:44 0ujij2k0_1_1
    -rw-r----- 1 oraprd dba 12746752 Jun 10 13:44 0vjij3qc_1_1
    what statement i need to run for restore the incremental backup?

    run{
    ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
    RESTORE DATABASE;
    RECOVER DATABASE;
    The above command will restore your database from the last good RMAN backup. Your last backup is incremental level backup as you posted. The above command will fullfill your requirements

  • Incremental backup and recover with UNTIL SCN options.

    Hi there
    My question is just about internal RMAN mecanisms.
    Suppose i've cumulative method for backup with RMAN.
    Reference backup provided by Level 0 (by night)
    after that i've file001.arc, file002.arc during day
    Baclup cumulative Level 1 (by night)
    after that i've file003.arc, file004.arc, file005.arc during day
    Baclup cumulative Level 1 (by night)
    after that i've file006.arc, file007.arc, file008.arc, file009.arc, file010.arc, file011.arc during day
    Baclup cumulative Level 1 (by night)
    after that i've file012.arc, file013.arc during day
    Baclup cumulative Level 1 (by night)
    Suppose we need to recover with UNTIL SCN ... (incident can be identied by SCN #nnnnn, suppose SCN near of file008.arc).
    Is Rman use benefits of incremental, or in this case (need to recover before particular SCN) systematically start with Reference backup (Created by Incremental Level 0) and then file001.arc, file002.arc ....
    Platform:Oracle 10g
    Regards
    Den

    You recover using backup controlfile when you have lost the controlfile - should be obvious.
    You recover until cancel when, for example, you want to manually see the archive logs being applied and decide when to stop recovering (maybe you have lost the archive log backups and want it to stop when you don't have any more left to apply).

  • Backup & Recover with EXPDP & IMPDP

    Hi,
    ich habe a beginner problem!
    My Environment is 10.2.0.4 & 11.2.0.2.
    I would like
    to backup a small database with EXPDP (FULL=Y)
    and to recover it with IMPDP(FULL=Y). ( *I don't want to use RMAN in this case*)My question:
    + what have I more to backup ( e.g. Passwordfile, control files, init.ora..) to be able to recover 
      successfully with IMPDP?
    + what are the steps to recover with IMPDP?I tried to look for an Howto in INTERNET, but unsuccesfully until now!
    Can any expert give me an answer? or show me somewhere to get a good HOWTO?
    thanks & regards
    hqt200475

    So that's a little different situation than the original, general question.
    In this situation yes, create a new instance then import the user that holds the rman catalog data from your last export. The rman catalog is typically low-volume enough this import won't have any problems (we'll assume the export was not taken while any rman-driven backups were running).
    We know that your environment already relies on rman, since it is the rman catalog you are backing up, so you need to get familiar with rman anyway. Setting up rman backup and recovery for your rman catalog database sounds like the perfect learning exercise as you improve on your predecessor's procedures.
    Backup and Recovery Quick Start Guide for 10.2: http://download.oracle.com/docs/cd/B19306_01/backup.102/b14193/toc.htm
    Backup and Recovery User's Guide for 11.2: http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/toc.htm
    A section of that guide of direct interest (Protecting the Recovery Catalog): http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmcatdb.htm#CHDEBDJG

Maybe you are looking for

  • Blue Screen When I Start Up My Macbook

    My macbook was freezing so I restarted it a few times. I got a blue screen with only a pointer. When I inserted the installation disk and booted Disk Utility and tried to make repairs, it said there were no errors in my start-up disk, yet when i trie

  • Error in Java Mapping program

    Hi friends, I am tryin java mapping for first time.. and created one java program using link https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/wholePayloadtoaXML+field But when I am compiling it using JAVAC, I am getting following error message t

  • How do i sync my pdf documents on my iPad to my mac

    How do i sync my pdf documents on my ipad to my mac

  • Lost my iphone 5 data when backed up for 1st time.

    I lost all of the photos and other data on my I5 when i backed it up for first time. It asked if i wanted to back up from last date which i conformed. the last date was the date i backed up my old I4. Now it has reverted back to that data and everyth

  • WSDL Binding

    Hi! I wannt to invoke several web services at the same time by calling one port type. How can I do that? I know that it is possible to denife more than one endpoint to a port type via binding in WSDL. But when I actually run the process, which web se