Status of datafiles during Hot backup

Hi All Gurus,
I have a problem. I have read different contradictory statements about what happens to data files when they are in backup mode (during hot backup). At some places it is given that after we execute the statement "ALTER TABLESPACE xxxx BEGIN BACKUP", oracle stops writing any data changes to data files so that a consistent copy can be made and for any changes during copying, It writes whole blocks of changed data to redo log fiiles. But at some other places it is given that in backup mode oracle continues to write to the datafiles just as normal, even during copying, it only freezes the datafile header's SCN.
Now my question is that if we consider the later case, how it is possible to make a consistent copy of a file which is being changed during the copy? Which version of file will be copied? (Because file was different at the time copying started than at time the copying ends), Also if oracle keeps writing to datafiles in the backup mode then what is the benefit of putting them in the backup mode? I mean what purpose does the "ALTER TABLESPACE xxxx BEGIN BACKUP" statement serve if file is still getting changed during backup?
Thanks,
Amir Siddiqui.

Ok, you are right, but if the datafile gets changes
during backup, how can we get a consistent copy? the
datafile's data is different at the start and end of
copying, so the backup copy would contain some blocks
with older data and some with new - that is, we get
unreliable and inconsistent copy. Any idea how to
handle this?You're right, the copy will not be consistent. But, when you go into backup mode, any time a block is modified for the first time since backup mode began, Oracle will log that entire block to redo, rather than just the change vector. When backup mode ends, Oracle writes an end of backup mode marker to the redo log stream. Now, your backup contains datafiles which are not consistent copies. But that's ok. If you ever need to use those datafiles in a recovery, you'll copy them from backup, and then, you'll apply archived redo logs. At a minimum, the archived redo from the point in time where the backup mode began (which is recorded in the frozen datafile header) until the tablespace comes out of backup mode (which will be applied from the redo log stream where the end backup marker was recorded), is required to have a valid, consistent datafile. So, the idea is, by applying all the appropriate archived redo, you'll "repair" any inconsistencies in the datafiles.
Hope that helps,
-Mark

Similar Messages

  • Performance effect during HOT backup mode

    Dear Experts,
    Oracle 10gR2, Windows Server 2003 ,I.4TB database size
    Our backup team put database in hot backup mode (alter tablespace begin......).
    Is it cause some performance issue in the database ?
    Thanks & Regards
    Sunil Kumar

    sunil kumar wrote:
    Dear Aman,
    As I told you I just joined and same thing I told to upper level, I need some definite proof so that I can prove my point because it always happens here: Database always put in hot backup mode and application here went very slow. I am a new DBA, so I need some some proof(what kind I don't know :)
    Aman, hot backup with RMAN is more preferable as compare to alter tablespace begin backup...... command.
    Why ?
    and if so why we still using OS commands to take backup;
    Thanks & Regards
    Sunil Kumar
    :)You have the answers to your other questions. As to "why we still using OS commands to take backup"? Well, um..... ;-) You'd have to ask you're organization that question. I can tell you there is no defensible reason to do so ..... ;-)

  • Long database response time during hot backup

    Hello,
    We are running Oracle 10g R2 on AIX 5.3. Our database is approximately 20G in size.
    Our users are running applications which are highly sensitive to database response times. So any significant delay in database response time(say about more than 5 seconds) has serious impact on the user applications.
    Everyday we take online backups using RMAN and we recently discovered that during the online backup process we are experiencing a serious performance problems at certain periods. For example a typical query which normally takes ~0.5 secods for database to respond takes about >30 seconds for several times during the process. to observe the problem more clearly we also wrote some test scripts which make random queries to the database to measure any delays in response times, and seen that we are getting late responses at several occasions(which normally never happen even when we run the script for a day without running RMAN online backup).
    We have gone through IBM's whitepaper on "Tuning AIX for Oracle" and seen that there isn't any misconfiguration that would have bad impact on oracle performance on the AIX side.
    Also we have gone throught the following:
    http://www.oracle.com/technology/deploy/availability/pdf/rman_performance_wp.pdf
    http://www.oracle.com/technology/deploy/availability/pdf/br_optimization.pdf
    http://download-west.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmtunin.htm#sthref1057
    We normally take our backups to tape drive. In order to test for any I/O bottlenecks we experimented by taking the backups to the disk drive. We have tried DURATION and MINIMIZE LOAD parameters, and also tried setting the RATE parameter to very low values(about 2M/s which normally reaches to about 100M/s) which resulted in total elapsed time for backups to increase from 30 mins to about 4-5 hours. And we came to find out that there is no improvement about the issue in any of these scenarios.
    Also we ran the ADDM reports which claimed I/O bottleneck with about 20% impact on the system, so we tried decreasing I/O using the RATE parameter and then ADDM said "low I/O bottleneck".
    Database responsiveness is a vital for our system. What measures can we take to avoid such slowness?
    Thanks.

    Hello,
    Isn't there anything we can do about it? the application software is working almost real-time with the database and cannot tolerate long delays(with which I mean something longer than 5 seconds) due to the nature of the the system.
    I wonder if there are any other methods to decrease the online backup load on the system.
    Thanks for the response.
    Edited by: Emrek on 13.Nis.2010 04:03

  • Tablespace and datafile hot backup

    Hi,
    I wanted to if there is a command to copy a datafile using sqlplus command. I making a script that will backup the database while its online.I made a script for the alter tablespace begin backup but I wanted to know how to copy the datafiles without using the OS command,instead I wanted to use a sql commands. Is there any script or procedure to do this one.
    thanks
    Best Regards,
    Antok

    RMAN is the best utility to do the backup and recover activities. It take care copy and paste itself. Bellow given script is also usefull for hot backup
    spool hotbackup_PROD3.sql;
    set feedback off;
    set verify off;
    set pagesize 2500
    set linesize 132
    set serveroutput on size 50000;
    declare
    cursor tablespace is select tablespace_name from dba_tablespaces where tablespace_name
    in('RBS1',
    'STORAGE',
    'SYSADM_IDX2',
    'SYSADM_IDX3',
    'SYSADM_IDX4',
    'SYSTEM');
    cursor datafile(tsname varchar2 ) is select file_name from dba_data_files
    where tablespace_name = tsname;
    begin
    dbms_output.put_line('spool hotbackup_PRODc.log;');
    dbms_output.put_line('alter system switch logfile;');
    dbms_output.put_line('select ''log''||sequence#,sysdate from v$log where status = ''CURRENT'';
    for tsname in tablespace
    loop
    dbms_output.put_line('alter tablespace '||tsname.tablespace_name||' begin backup;');
    dbms_output.put_line('prompt Starting Backup for '||tsname.tablespace_name||' Tablespace')
    for dname in datafile(tsname.tablespace_name)
    loop
    dbms_output.put_line('prompt Copying File '||dname.file_name||'.....');
    dbms_output.put_line('!cp '||dname.file_name||' /backup2/hotbak'||dname.file_name);
    end loop;
    dbms_output.put_line('alter tablespace '||tsname.tablespace_name||' end backup;');
    dbms_output.put_line('prompt Finished backing up '||tsname.tablespace_name||' Tablespace')
    dbms_output.put_line('alter system switch logfile;');
    end loop;
    dbms_output.put_line('spool off;');
    dbms_output.put_line('!mailx -s "KL_PROD521_HOTBACKUP1" [email protected] < /prod1/HOTBKUP/hotbackup_PRODc.log');
    dbms_output.put_line('exit');
    end;
    spool off;
    @hotbackup_PROD3.sql
    exit;

  • Lost datafile while taking hot backup

    Hi,
    While we are taking Hot Backup,
    one of datafile is accedentally deleted by user ...
    So could you pls suggest me how can we troubleshoot??
    DBversion: 10.2.0.4
    OS Version: Linux
    Thanks,
    Srini ...
    Edited by: Srini on Apr 11, 2012 1:12 PM
    Edited by: Srini on Apr 11, 2012 1:13 PM

    Some unix can fix the directory entry if you do it before the last process closes the file and you have the appropriate tools and expertise. Google for your OS. Here's one that just happened to be the first that came up for me: http://linuxshellaccount.blogspot.com/2008/08/recovering-deleted-files-by-inode.html
    If you can't do that (and it surely isn't something to depend on if it even works), you need to restore the previous one that you do have, all intervening archived logs, and recover. You probably want to export anything that might be in that file if you can, before you do anything else. As soon as Oracle closes it, it will be gone.

  • Error   during DEV backup PSAPSR3 is already in backup status

    Dear All,
    When i m taking development backup.It generating the error PSAPSR3 is already in backup status.Plz tell me how to resolve this issue.
    LOG file is attached.
    BR0051I BRBACKUP 7.00 (13)                                                                               
    BR0189W Expiration period equal 0 - backup volumes could be immediately overwritten                                                                               
    BR0055I Start of database backup: bdxxiprp.ant 2008-05-13 17.40.29                                                                               
    BR0477I Oracle pfile E:\oracle\MRD\102\database\initMRD.ora created from spfile E:\oracle\MRD\102\database\spfileMRD.ora                                                                               
    BR0280I BRBACKUP time stamp: 2008-05-13 17.40.32                                                                               
    BR0319I Control file copy created: G:\oracle\MRD\sapbackup\CNTRLMRD.DBF 24461312                                                                               
    BR0328E Database file Q:\SAPDATA1\SR3_1\SR3.DATA1 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file Q:\SAPDATA1\SR3_2\SR3.DATA2 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file Q:\SAPDATA1\SR3_3\SR3.DATA3 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file Q:\SAPDATA1\SR3_4\SR3.DATA4 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file G:\ORACLE\MRD\SAPDATA1\SR3_5\SR3.DATA5 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file H:\ORACLE\MRD\SAPDATA2\SR3_6\SR3.DATA6 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file H:\ORACLE\MRD\SAPDATA2\SR3_7\SR3.DATA7 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file H:\ORACLE\MRD\SAPDATA2\SR3_8\SR3.DATA8 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file H:\ORACLE\MRD\SAPDATA2\SR3_9\SR3.DATA9 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file H:\ORACLE\MRD\SAPDATA2\SR3_10\SR3.DATA10 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file I:\ORACLE\MRD\SAPDATA3\SR3_11\SR3.DATA11 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file I:\ORACLE\MRD\SAPDATA3\SR3_12\SR3.DATA12 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file I:\ORACLE\MRD\SAPDATA3\SR3_13\SR3.DATA13 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file I:\ORACLE\MRD\SAPDATA3\SR3_14\SR3.DATA14 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file I:\ORACLE\MRD\SAPDATA3\SR3_15\SR3.DATA15 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file J:\ORACLE\MRD\SAPDATA4\SR3_16\SR3.DATA16 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file J:\ORACLE\MRD\SAPDATA4\SR3_17\SR3.DATA17 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file J:\ORACLE\MRD\SAPDATA4\SR3_18\SR3.DATA18 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file J:\ORACLE\MRD\SAPDATA4\SR3_19\SR3.DATA19 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0328E Database file J:\ORACLE\MRD\SAPDATA4\SR3_20\SR3.DATA20 of tablespace PSAPSR3 is already in backup status                                                                               
    BR0056I End of database backup: bdxxiprp.ant 2008-05-13 17.40.35                                                                               
    BR0280I BRBACKUP time stamp: 2008-05-13 17.40.35                                                                               
    BR0054I BRBACKUP terminated with errors          
    Thank and Regard's
    Adil

    Hi ,
    Are you taken backup successfully , if not pls check below things.
    1,tablespace PSAPSR3 is already in backup status, This error usually occurs when you are running an Online Backup and because of some previous failed backups the table spaces are still under back up status.
    pls check if any backup is running or not
    ps -ef|grep brbackup .
    2 , check any lock file is created under oracl/SID/sapbackup if s remove lock file from the directory .
    3 , login into DB
    > sqlplus /nolog
    SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 19 14:57:23 2010
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    SQL> connect /as sysdba
    Connected.
    SQL> select status from v$backup;
    check the status it should not be ACTIVE .
    from your case Tablespace PSAPSR3 is already in backup status so login into DB
    > sqlplus /nolog
    SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 19 14:57:23 2010
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    SQL> connect /as sysdba
    Connected.
    alter tablespace PSAPSR3 end backup;
    SQL> alter tablespace PSAPSR3 end backup;
    Tablespace altered.
    SQL> select status from v$backup;
    STATUS
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    STATUS
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    STATUS
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    STATUS
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    NOT ACTIVE
    41 rows selected.
    SQL>
    After complete the above activity pls fire the backup .
    It might be resolve your issue .
    Edited by: satheesh0812 on Oct 19, 2010 11:54 AM

  • How to take a Hot backup of Oracle database

    1: put the db in archive log mode
    2: set the db_sid to correct one
    3: login to sqlplus
    4: verify the name of the db that you are connected to
    select name from v$database;
    5: check if the db is in archive log made
    select log_mode from v$database;
    if not in archive log mode
    another command to check
    archive log list;
    6: find where on disk oracle writes archive log when it is in archive log mode
    sql> show parameter log_archive_dest_1;
    if the value is found to be 0, that means no values will be recorded, so we need to change it
    sql> alter system set log_archive_dest_1='LOCATION=c:\database\oradata\finance\archived_logs\'
    scope=spfile;
    7: shutdown immediate; < this is done just to prepare the db for hot backups >
    8: startup the db in mount mode
    startup mount;
    ( 3 startup types : nomount - just starts the instance, mount - locates the control files and open up according to the values, open - finds the datafiles from the control files and opens up the db )
    9: put the db in archive log mode
    alter database archivelog;
    10: open the database
    alter database open;
    11: check the status of the db
    select log_mode from v$database;
    SQL> archive log list;
    12: create a directory for archived log
    check if its empty, if empty we need to switch
    sql> alter system archive log current;
    run it 5 times < need to put / and enter > , then check the archive log dir , we will find files
    13: make a table in the database and insert data in it
    create table employees (fname varchar(2));
    check the table
    desc employees;
    insert values
    insert into employees values ('Mica');
    14: tablespace must be in hot backup mode
    check the status
    select * from v$backup;
    if found not active, then we need to change
    we cannot put the db in hot backup mode, unless it is archive log mode
    change to hot backup mode
    alter database begin backup;
    check the status
    select * from v$backup;
    15: now we can only COPY DBF FILES
    copy *dbf <distination location>
    16: need to take the db out to hot backup mode
    alter database end backup;
    17: need to make another archive log switch
    alter system archive log current;
    18: need to copy control files now, need to do a binary bckup
    alter database backup controlfile to '<location>\controlbackup';
    19: insert more values to the table
    insert into employess values ('NASH')
    COMMIT;
    make another archive log switch : alter system archive log current;
    do the same process for more values
    20 : backup all the archive logs to a new location
    21: shutdown the db and simulate a hw error, delete all the files from the database folder
    22: try to start the sqlplus and db ::: error
    23: copy all the backups to the db dir
    need to copy the control files, rename the binary backup of the control file and make the copies as needed
    24: try to mount the db, error < must use reset logs or noreset logs >
    25: need to do a recovering of the database
    shutdown
    restore the archive logs
    startup mount;
    recover database until cancel using backup controlfile;
    it will ask for a log file :
    yes for recovery
    cancel for cancelling recovery
    26: check status: open the database in readonly
    alter database open read only;
    check the tables to see the data
    shutdown immediate
    shartup mount;
    recover again : recover database until cancel using backup controlfile;
    if oracle is asking for a log that do nto exist , all we have to do is type cancel
    27: open the database
    alter database open;
    need to do reset logs
    alter database open resetlogs;
    28: check the db that you are connected, check the tables
    thanks and regards
    VKN
    site admin
    http://www.nitrofuture.com

    A very long list ... let me make it shorter.
    SQL> archive log list;If I see this:
    Database log mode              No Archive ModeI put the database into archivelog mode and leave it there forever.
    If it is in archivelog mode:
    RMAN> TARGET SYS/<password>@<service_name> NOCATALOG
    RMAN> BACKUP DATABASE PLUS ARCHIVELOG;Though there are a lot of things one could do better such as incrementals with block change tracking, creating an RMAN catalog, etc.

  • When i start my hot backup my database getting very slow

    Hi,
    I am using following commands for enabling hot backup
    SQL>ALTER SYSTEM ARCHIVE LOG CURRENT;
    SQL>ARCHIVE LOG LIST;
    SQL >ALTER DABATBASE BEGIN BACKUP;
    Database altered.
    SQL>SELECT FILE#,STATUS FROM V$BACKUP;
    FILE# STATUS
    1 ACTIVE
    2 ACTIVE
    3 ACTIVE
    4 ACTIVE
    and using cp -rp command to copy the file (backup copying speed good) but database performance very slow
    How to improve performance ...
    Regards
    Vignesh C

    Uwe Hesse wrote:
    It is very likely that you experience slow performance with ALTER DATABASE BEGIN BACKUP , because until you do ALTER DATABASE END BACKUP , every modified block is additionally written into the online logfiles . Doesn't that happen only the first time the block is modified?
    >
    The command was introduced for split mirror backups, when this period is very short. Else ALTER TABLESPACE ... BEGIN/END BACKUP for every tablespace one at a time reduces the amount of additional redo during non-RMAN Hot Backup. There appear to be only 4 files. We don't know how big or sparse they are.
    >
    RMAN doesn't need that at all - much less redo - and also archive - generation then.
    Furthermore, you can use BACKUP AS COMPRESSED BACKUPSET DATABASE to decrease the size of the backup even more - if space is an issue.
    In short: Use RMAN :-)
    Agree with that! Unless the copy is actually going to an NFS mount or something, where I would be concerned whether it is the type of NFS that Oracle likes. I'd also advise a current patch set, as the OP didn't tell us the exact version, and I have this nagging unfocused memory of some compression problems of the "oh, I can't recover" variety.
    I'd like to see some evidence on I/O and cpu usage before giving advice. When I used to copy files like this, it would choke out everyone else. RMAN was a savior, but had to wait for local SAN upgrade.

  • Where is the official Oracle documentation that describes Hot Backup?

    I have used the woefully inadequate Metalink search utilities and Google but the nearest thing I have found is a description on "Ask Tom".
    I am looking for the official Oracle documentation that describes what happens internally during a Hot Backup. There are a lot of web sites and blogs out there that describe it but I am looking for the description from Oracle themselves. The only things I have found in the Oracle documentation so far is how to start and stop Hot Backup but not what happens internally. Preferably 11gR2 if it makes any difference.
    Thanks in advance.

    Thanks mseberg. This is what I was looking for. I had read this manual before but apparently glossed over this paragraph:
    "When performing a user-managed online backup, you must place your datafiles into
    backup mode with the ALTER DATABASE or ALTER TABLESPACE statement with the
    BEGIN BACKUP clause. When a tablespace is in backup mode, the database writes the
    before image for an entire block to the redo stream before modifying a block. The
    database also records changes to the block in the online redo log. Backup mode also
    freezes the data file checkpoint until the file is removed from backup mode. Oracle
    Database performs this safeguard because it cannot guarantee that a third-party
    backup tool copies the file header before copying the data blocks."
    Hot backup is still quite useful and Rman doesn't cover all cases. What we are doing with it is using storage-based replication (Shadow Image) to another set of LUNS which we then mount on another server and backup using Rman. This removes the overhead of Rman on the Production Database server and extends our backup window to almost 24 hours.

  • User hot and Rman hot backup

    During user mode hot backup lots of redo gets generated as the entire block is written when any changes are made to a block which is in hot backup mode.But during Rman hot backup less redo are generated why is this so and whatz the logic invloved? and how oracle recovers the file that has been backed up through Rman.
    Could you please explain me regarding this in detail it will be really helpful.
    kumaresh

    From Article      Note:76736.1 RMAN FAQ: Recovery Manager -- Frequently Asked
    To understand why RMAN does not require extra logging or backup mode,
    you must first understand why those features are required for non-RMAN
    online backups.
    A non-RMAN online backup consists of a non-Oracle tool, such as cp or
    dd, backing up a datafile at the same time that DBWR is updating the
    file. We can't prevent the tool from reading a particular block at the
    exact same time that DBWR is updating that block. When that happens,
    the non-Oracle tool might read a block in a half-updated state, so that
    the block which is copied to the backup media might only have been
    updated in its first half, while the second half contains older data.
    This is called a "fractured block". If this backup needs to be restored
    later, and that block needs to be recovered, recovery will fail because
    that block is not usable.
    The 'alter tablespace begin backup' command is our solution for the
    fractured block problem. When a tablespace is in backup mode, and a
    change is made to a data block, instead of logging just the changed
    bytes to the redo log, we also log a copy of the entire block image
    before the change, so that we can reconstruct this block if media
    recovery finds that this block was fractured. That block image logging
    is what causes extra redo to be generated while files are in backup
    mode.
    The reason that RMAN does not require extra logging is that it
    guarantees that it will never back up a fractured block. We can make
    that guarantee because we know the format of Oracle data blocks, and we
    verify that each block that we read is complete before we copy it to the
    backup. If we read a fractured block, we read the block again to obtain
    a complete block before backing it up. non-Oracle tools are not able to
    do the same thing because they do not know how to verify the contents of
    an Oracle data block.
    Backup mode has another effect, which is to 'freeze' the checkpoint in
    the header of the file until the file is removed from backup mode.
    We do this because we cannot guarantee that the third-party backup
    tool will copy the file header prior to copying the data blocks.
    RMAN does not need to freeze the file header checkpoint because we
    know the order in which we will read the blocks, which enables us to
    capture a known good checkpoint for the file.

  • Failure when trying to open db with resetlogs after restore of hot backup

    Hello,
    i know that ora-600 errors should be directed to oracle instead of here, but as i have no access to oracle support you may be able / willing to give me some hint anyway. here is what i tried to do:
    1. Make a Hot Backup of an Oracle DB running on Win2003, Version 9.2.0.5
    2. Trying to restore this backup on a new host, running WinXP, Oracle 9.2.0.5
    I can create the new controlfile and do a recovery with the syntax
    "recover database using backup controlfile until cancel"
    However, after this i'm trying to open the DB with the following syntax:
    "alter database open resetlogs"
    This takes a few seconds, then the instance gets terminated, showing an ora-600 error in the alert.log (i guess its useless to show the specific ora-600 error here, or am i wrong at this point?)
    now i'm wondering if the difference in the operating system could be the reason ? I also have to mention that the database files from the hot backup were transfered over a WAN line, could a damage to this files, happened during the transfer cause something like this ?

    These are from Howard
    When you re-create a controlfile using a script or command that says 'create controlfile...', that command will require you to spell out the path to all the datafiles and online redo logs. It is a simple matter for your server process to visit each of the files mentioned in the create controlfile and read the SCN stored in the datafile header. It can also read the online redo logs and read the latest checkpoint change number stored there.
    If all those numbers agree, that is obviously the age to which the rest of the database had gotten before the controlfiles were lost, and it's OK to create the new controlfile with that agreed-upon SCN forced in to the controlfile as its new SCN. Therefore the entire database is consistent and the database can be opened without recovery.
    This sort of thing is what happens when you close your database down nicely and then delete all controlfiles as part of a recovery demo on a training course!
    If those numbers don't agree, then it doesn't really matter. Logically, the highest number found, whether that be in one or more of the datafiles or one of the online logs, must be the age the database had reached before disaster struck. Your server process then writes that highest number into the new controlfile as its new SCN, and therefore your new controlfile agrees with the age of the latest bit of your database. The bits which were found to have smaller SCNs than that are therefore obviously in need of recovery -and because your new controlfile knows the SCN at which recovery should stop, recovery can be performed without trouble.
    When the datafiles are inconsistent the control file has the latest SCN on it and it tries to bring the entrire database consisent with respective to its SCN..if something does not matches it says it is consisten
    SO the recovery is done mainly based on the Controlf file..but the term backup..assume we have binary backup or the created new controlfile will have the scn to bring the DB to consistent state
    Message was edited by:
    Maran Viswarayar

  • Hot Backup Mechanism

    Hi all,
    I know that Oracle will not update the datafile headers with SCN when they are in backup mode. But, I have a question, if at all the committed transactions will be written to the datafile during backup? I thought that Oracle will hold all committed data in the DBBC (Entries will be made in Redo Logs though) until tablespaces are taken out of backup mode.
    Please correct me if I am wrong.
    Thanks,
    Aswin.

    Aswin,
    You are ABSOLUTELY wrong. I am not sure how did you pick up the concept like this but this is plain wrong. Have a look here,
    E:\Documents and Settings\aristadba>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jun 8 14:36:44 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area  167772160 bytes
    Fixed Size                  1247900 bytes
    Variable Size              75498852 bytes
    Database Buffers           88080384 bytes
    Redo Buffers                2945024 bytes
    Database mounted.
    SQL> alter database archivelog;
    alter database archivelog
    ERROR at line 1:
    ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
    SQL> alter database open;
    Database altered.
    SQL> shut imm
    SP2-0717: illegal SHUTDOWN option
    SQL> shut immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area  167772160 bytes
    Fixed Size                  1247900 bytes
    Variable Size              75498852 bytes
    Database Buffers           88080384 bytes
    Redo Buffers                2945024 bytes
    Database mounted.
    SQL> alter database archivelog;
    Database altered.
    SQL> alter database open;
    Database altered.
    SQL> select checkpoint_change# from V$datafile;
    CHECKPOINT_CHANGE#
               1762853
               1762853
               1762853
               1762853
               1762853
               1762853
    6 rows selected.
    SQL> select checkpoint_change#, last_change# from V$datafile;
    CHECKPOINT_CHANGE# LAST_CHANGE#
               1762853
               1762853
               1762853
               1762853
               1762853
               1762853
    6 rows selected.
    SQL> select * from V$backup;
         FILE# STATUS                CHANGE# TIME
             1 NOT ACTIVE                  0
             2 NOT ACTIVE                  0
             3 NOT ACTIVE                  0
             4 NOT ACTIVE                  0
             5 NOT ACTIVE                  0
             6 NOT ACTIVE                  0
    6 rows selected.
    SQL> select name from V$tablespace';
    ERROR:
    ORA-01756: quoted string not properly terminated
    SQL> select name from V$tablespace;
    NAME
    SYSTEM
    UNDOTBS1
    SYSAUX
    USERS
    TEMP
    EXAMPLE
    SONY
    7 rows selected.
    SQL> alter tablespace sony begin backup;
    Tablespace altered.
    SQL> select checkpoint_change#, last_change# from V$datafile;
    CHECKPOINT_CHANGE# LAST_CHANGE#
               1762853
               1762853
               1762853
               1762853
               1762853
               1762999
    6 rows selected.
    SQL> select * from V$backup;
         FILE# STATUS                CHANGE# TIME
             1 NOT ACTIVE                  0
             2 NOT ACTIVE                  0
             3 NOT ACTIVE                  0
             4 NOT ACTIVE                  0
             5 NOT ACTIVE                  0
             6 ACTIVE                1762999 08-JUN-09
    6 rows selected.
    SQL> create table sony_table ( a number) tablespace sony;
    Table created.
    SQL> begin
      2  for i in 1..100 loop
      3  insert into sony_table values(100);
      4  end loop;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL> alter system flush buffer_cache;
    System altered.
    SQL> alter tablespace sony end backup;
    Tablespace altered.
    SQL> select * from sony_table;
             A
           100
           100
           100
           100
           100
           100
           100
           100
           100
    ....You can see here that the tablespace got a table created into it. In that table, we insserted some data which surely was smaller than the cache itself. So we flushed the buffer cache, making sure that the data of the buffer cache is going to be into the data file. After that we got the tablespace out from the backup and we got our data.
    The only thing that does get frozen down in the begin backup mode is that the file headers get freezed at that point when the backup got started. Makes sense in doing so as this point would be remembered by the ocontrol file to identify that when the tablespace would be undergoing recovery, from what point the redo vectors need to get applied. The data does NOT go in to the file header but into the object blocks which has the System Change Number in them. This number gets frozen. So even when your tablespace is in the backup mode, the buffers stilll move as they were moving when the tablespace was in the normal mode. With that. there is no point what so ever to keep the committed in the data buffer cache . Even if you say that your logic is correct, still there can be a situation where your logic would be proved wrong. Buffer cache wont ever be equl to that amount of data in size which is changed by the users. So if we keep the committed data in the cache which is of , say 10meg and you changed 1000 meg, what about this data? Where would we keep it if we wont let it be flished to the data file?
    HTH
    Aman....

  • EBS 11i hot backup

    Hi experts,
    I am doing hot clone of my ebs 11i with 10g db.
    all dbf file have copied control file is created with using trace on TEST...
    db is now on mount stage
    when i trying to recover gettign this error....
    SQL> recover database using backup controlfile until cancel;
    ORA-00283: recovery session canceled due to errors
    ORA-01110: data file 65: '/d02_testdbx/oracle/testdb/testdata/csdd01.dbf'
    ORA-01201: file 1 header failed to write correctly
    ORA-283 signalled during: ALTER DATABASE RECOVER database using backup controlfile until cancel ...
    Please suggest what to do ?????
    os is AIX
    thanks

    Hi;
    Please check below and see its helpful:
    Rman Duplicate Error When Creating Standby Database Rman-11003 Ora-1157 [ID 306092.1]
    Also check:
    OERR: ORA 1201 file header failed to write correctly [ID 18773.1]
    How to clone/duplicate a database with added datafile with no backup. [ID 292947.1]
    ORA-01110 ORA-1122 ORA-01251 When Restoring With a Backup from a Standby DB [ID 743101.1]
    MPP: (RDBMS) ORA-1124 ORA-283 ORA-1110 ON RECOVERY [ID 1031379.6]
    RMAN TSPITR Fails with ORA-283 [ID 241237.1]
    Hope it helps
    Regard
    Helios

  • Hot Backup을 Script로 작성후 Cron으로 실행시...

    안녕하세요!
    건강한 가을 보내시고 계신지요?
    오늘은 Hot Backup에 대해서 몇가지 궁금한게 있어서 글을 올립니다
    -. HP-UNIX 11, Oracle 9.2.0.7
    -. Oracle Database 파일 용량 : 약 50G
    -. Script 내용중 일부 발췌
    alter system switch log file; <--백업해야할 dbf 양이 많아 먼저 한번 실행시켰음
    ####### Tablespace Backup
    alter tablespace system begin backup;
    !cp /oradata/system01.dbf /BACKUP/hot/system01.dbf
    alter tablespace system end backup;
    ...........각 테이블스페이스별로 위와 같이 정의
    ####### Archive Log File Backup
    alter system switch log file;
    alter system archive log off;
    !cp /oradata/arch/*.arc /BACKUP/hot/arch/.
    !rm /oracle/arch/*.arc
    alter system archive log start;
    ####### Control File Backup
    alter system checkpoint;
    alter database backup controlfile '/BACKUP/hot/control.bkp';
    위와 같이 Script를 작성하여, Cron을 사용하여 야간에 작업을 수행코자 합니다.
    1. 위의 Script에서 수정을 가해야 하는 부분이나, 좀 더 추가되어야할 부분이 있으시면 기탄없이 지적 부탁드립니다.
    2. 야간에 작업을 수행하다보니, Tablespace의 Begin backup을 했는데, 여타의 장애로 인해 End Backup이 수행이 안될경우, DBA가 강제로 End Backup을 안해줄 경우에는 어떻게 되는지요?
    그리고, 이러한 위험을 해결키 위해 고수님들은 어떠한 방법을 사용하는지 알고 싶습니다.
    행복한 하루 되십시요!
    감사합니다.

    첫번째로..
    백업초기에 log switch를 하는 것은 경험상 필요하기도 합니다.
    트랜잭션이 거의 없는 백업본의 경우에 archive가 거의 떨어지지
    않게 되고, 하루 백업하는데 백업본에 archive는 없는 이상한 사태가
    벌어지죠. 차후에 cancel복구를 해야 하는 경우에도 어렵기 때문에
    online backup 시 초기에 log switch 를 해주기는 합니다.
    두번째로..
    alter system archive log stop; 명령은 왜 하셨는지요?
    이거 하면.. archiveing 이 멈추니 트랜잭션도 멈춥니다. 서비스 영향을
    줄텐데요.. 백업이 서비스에 영향을 주어서는 안되겠죠.
    archive log를 백업시에는 파일명에 대한 리스트를 만들고 그 리스터에
    있는 파일들을 백업후 삭제하는 방법으로 변경하시는 것이 좋을 것 같습니다.
    세번째로.. 컨트롤파일 백업은 tablespace backup 이후에
    바로 하시는 것이 좋습니다. archive file을 백업하는 시간동안
    SCN이 변경이 되겠고, 그러면 해당 컨트롤파일을 백업하고 그것을
    restore하게 되면 controlfile의 scn이 틀리니 controlfile의 SCN까지
    복구가 필요하다고 판단하겠죠.
    순서를.. 테이블스페이스 데이터파일 백업 -> 컨트롤파일 백업 -> 아카이브백업
    이런 순으로 하시면 좋을 것 같습니다.
    네번째로..
    begin backup을 하게 되면 테이블스페이스의 데이터파일 헤더에는 bebin
    backup mode라고 쓰게 됩니다. 그리고 이렇게 begin backup mode인
    테이블스페이스에서 변경된 데이터는 그 데이터를 row 단위로 redo log entry에
    등록하는 것이 아니라 블록단위로 등록하게 됩니다. 즉 단 하나의 row만을
    update했을 뿐인데도 해당 block전체가 redo log entry로 들어가겠죠. 당연히
    archive file이 훨씬 많이 쌓이게 됩니다. 또한 DB를 abort로 내렸을 경우에는
    이후에 open을 하려고 하면 system01.dbf 파일을 복구하라고 나와서
    아주 당황하게 되지요.
    그리고 사례를 보면..모 시청에서 DBA가 한달동안
    begin backup이 된 것을 몰랐고, DB fail이 났는데..복구를 한답시고
    controlfile을 재생성하였습니다. 그런데 bootstrap failure가 발생했고
    게다가 아카이브도 없고 백업도 없는 것이었습니다. 결국엔 adjust scn으로
    강제복구를 했지요.. begin backup mode인지는 아침에 시스템담당자가
    꼭 확인해야 하는 것 중에 하나입니다. 아침 점검 스크립트 수행하지
    않으시는지요?
    첨부로.. 얼마전에 여기 게시판에도 올렸던 내용인데요..
    백업 스크립트를 드리죠..
    그리고 아침에 DB를 점검할 때 보아야 하는 사항은 제가 정리한 것이
    있습니다.
    아래 링크에서 다운받아서 참고하세요.
    http://www.dbguide.net/servlet/com.util.DownloadServlet?file=%2F20060120%2F1137768090586.zip&filename=%C0%CF%C0%CF+DB%C1%A1%B0%CB+%BD%BA%C5%A9%B8%B3%C6%AE_%B0%F8%B0%B3%BF%EBv0.1.zip
    ===================================================
    온라인 백업은 파라메터 파일 , 콘트롤 파일, 모든 데이터파일 , 아카이브로그를
    백업후 다른 서버로 이동시키면 다른 서버로 복구할 수 있습니다.
    하지만 online backup시에 datafile, controlfile만을 백업하므로 current redo log가 없으므로
    until cancel 복구를 해야 합니다.(rman 백업도 마찬가지)
    1) init파일,DB file, controlfile을 다른서버로 이동시킵니다.
    보통 controlfile백업은 alter database backup controlfile to '~~'; 이렇게 하기 때문에
    하나만 복사하므로 이것을 추가 복사해서 controlfile의 경로에 복사해줍니다.
    2) init파일에 controlfile의 경로, background_dump_dest, user_dump_dest, core_dump_dest, log_archive_dest 를
    경로에 맞게 지정해줍니다.
    3) DB를 mount상태로 올립니다. 만약 mount하는 동안 에러가 난다면 controlfile에서
    문제가 생겼으므로 controlfile의 백업을 확인합니다.
    4) datafile, redolog file의 file_name을 변경합니다.
    select name from v$datafile;
    select member from v$logfile;
    alter database rename file '현재경로' to '이동시킨 경로';
    alter database rename file '현재경로' to '이동시킨 경로';
    단 여기에서 tempfile은 백업대상도 아니고 rename이 안되므로 새로 생성해 주어야 합니다.
    select name from v$tempfile;
    select * from sys.props$;에서 default temporary tablespace를 찾거나
    또는 select distiinct temporary_tablespace from dba_users 에서 찾습니다.
    tempfile을 추가하는 방법은 더이상 말씀 안드립니다. NBR과정의 기본이니까요..
    5) DB의 archive file을 log_archive_dest 에 설정된 곳으로 이동시키고 recovery를 수행합니다.
    recover database until cancel;
    마지막 archvie까지 적용후 cancel하기
    alter database open resetlogs;
    resetlogs open하기
    # 온라인 백업 스크립트(데이터파일, 컨트롤파일만 백업)
    작업 이전에 /backup , /backup/control 이라는 디렉토리 생성
    - 백업 메인
    vi /backup/onbackup.sh
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    sh -x /backup/1_onbackup.sh
    sh -x /backup/2_cp_backup.sh
    sh -x /backup/3_control_backup.sh
    sh -x /backup/4_offbackup.sh
    - 백업 모드 변경
    vi /backup/1_onbackup.sh
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    # backup mode on
    sqlplus /nolog << EOF1
    conn /as sysdba
    set head off
    set feedback off
    set time off
    set timing off
    set echo off
    spool /tmp/backup_online.tmp
    select 'alter tablespace '||tablespace_name||' begin backup;' from dba_tablespaces where status='ONLINE' and contents <>'TEMPORARY';
    spool off
    !cat /tmp/backup_online.tmp|grep -v spool|grep -v SQL > /tmp/backup_online.sql
    @/tmp/backup_online.sql
    exit
    EOF1
    - 데이터파일 백업할 쿼리
    vi /backup/2_cp_backup.sql
    select 'mkdir /backup/'||to_char(sysdate,'YYYYMMDD_HH24MI') from dual;
    select 'cp '||name||' /backup/'||to_char(sysdate,'YYYYMMDD_HH24MI') from v$datafile;
    - 데이터파일 copy하는 스크립트
    vi /backup/2_cp_backup.sh
    # cp backup, mkdir /backup/SYSDATE directory
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    sqlplus /nolog << EOF2
    conn /as sysdba
    set head off
    set feedback off
    set time off
    set timing off
    set echo off
    spool /tmp/backup_script.tmp
    @2_cp_backup.sql
    spool off
    !cat /tmp/backup_script.tmp |grep -v spool |grep -v SQL > /tmp/backup_script.sh
    !chmod 755 /tmp/backup_script.sh
    exit
    EOF2
    sh -x /tmp/backup_script.sh
    - 컨트롤파일 백업
    vi /backup/3_control_backup.sh
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    # controlfile backup
    sqlplus /nolog << EOF3
    conn /as sysdba
    set head off
    set feedback off
    set time off
    set timing off
    set echo off
    spool /tmp/control_backup.tmp
    select 'alter database backup controlfile to ''/backup/control/'||to_char(sysdate,'YYYYMMDD_HH24MI')||'.ctl'';' from dual;
    spool off
    !cat /tmp/control_backup.tmp |grep -v spool|grep -v SQL > /tmp/control_backup.sql
    @/tmp/control_backup.sql
    exit
    EOF3
    - 백업모드 offline하기
    vi /backup/4_offbackup.sh
    export LANG=C
    export ORACLE_HOME=/u/ora9i/product/9.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=PROD
    # backup mode off
    sqlplus /nolog << EOF4
    conn /as sysdba
    set head off
    set feedback off
    set time off
    set timing off
    set echo off
    spool /tmp/backup_offline.spool
    select 'alter tablespace '||tablespace_name||' end backup;' from dba_tablespaces where status='ONLINE' and contents <>'TEMPORARY';
    spool off
    !cat /tmp/backup_offline.spool |grep -v SQL > /tmp/backup_offline.sql
    @/tmp/backup_offline.sql
    exit
    EOF4
    그리고 만약 파일리스트만 내리고 veritas netbackup으로 백업이 가능하다면 아래와 같이 하면
    됩니다. veritas netbackup에서는 file리스트만 파일로 떨구면 그 파일을 백업해줍니다.
    archvie backup은 아래와 같이 하면 되는데 아래는 archive file의 backup list만 만듭니다.
    수정해서 backup list에서 YYYYMMDD_HH24MI의 분단위 디렉토리를 만들고 archive file을
    다른 서버로 cp복사하도록 하면 됩니다. 꼭 아래 스크립트는 테스트 후에 사용하시길
    바랍니다...
    # 데이터파일 백업과 archvie백업 쉘은 아래와 같습니다.
    1. begin backup할 스크립트를 수행합니다.
    dbbegin.sh
    TBS_INFO=/tmp/tbs_info~.$$
    sqlplus /nolog << EOF > $TBS_INFO 2>&1
    connect / as sysdba;
    select 'tablespace '||tablespace_name from dba_tablespaces;
    disconnect;
    exit
    EOF
    cat $TBS_INFO | awk ''$1 == "tablespace" { print $2 }'' | while read LINE
    do
    export LINE
    echo "Issuing alter tablespace $LINE begin backup;"
    /usr/openv/netbackup/oracle/table_begin.sh
    done
    \rm $TBS_INFO
    2. 위에서의 table_begin.sh 는 아래와 같습니다.
    table_begin.sh
    sqlplus /nolog << EOF > /dev/null 2>&1
    connect / as sysdba;
    alter tablespace $LINE begin backup;
    disconnect;
    exit
    EOF
    3. dbbegin.sh 을 하게 되면 테이블스페이스가 backup mode가 됩니다.
    4. 데이터파일 리스트를 추출합니다.
    datafile_list
    #!/bin/ksh
    DATAFILE_INFO=/tmp/datafile_info~.$$
    datafile_list=/tmp/PROD_data_list
    sqlplus /nolog << EOF > $DATAFILE_INFO 2>&1
    connect / as sysdba;
    select ''datafile_name ''||file_name from dba_data_files;
    select ''logfile_name ''||member from v\$logfile;
    select ''controlfile_name ''||name from v\$controlfile;
    disconnect
    EOF
    cat $DATAFILE_INFO | awk ''$1 == "datafile_name" {print $2}''
    /tmp/PROD_dbfile_list cat $DATAFILE_INFO | awk ''$1 == "logfile_name" {print $2}''
    /tmp/PROD_logfile_list cat $DATAFILE_INFO | awk ''$1 == "controlfile_name" {print $2}''
    /tmp/PROD_controlfile_list cat /tmp/PROD_dbfile_list > $datafile_list
    cat /tmp/PROD_logfile_list >> $datafile_list
    cat /tmp/PROD_controlfile_list >> $datafile_list
    \rm $DATAFILE_INFO
    5. 데이터파일 리스트를 netbackup에서 tape백업을 하도록 합니다.
    veritas netbackup에서 리스트만 주면 백업해줌..
    6. end backup 을 만드는 스크립트를 수행
    dbend.sh
    #!/bin/ksh
    TBS_INFO=/tmp/tbs_info~.$$
    sqlplus /nolog << EOF > $TBS_INFO 2>&1
    connect / as sysdba;
    select ''tablespace ''||tablespace_name from dba_tablespaces;
    disconnect;
    exit
    EOF
    cat $TBS_INFO |awk ''$1 == "tablespace" { print $2 }''|while read LINE
    do
    export LINE
    echo "Issuing alter tablespace $LINE end backup;"
    /usr/openv/netbackup/oracle/table_end.sh
    done
    \rm $TBS_INFO
    7. 위에서 table_end.sh 는 아래와 같습니다.
    table_end.sh
    sqlplus /nolog << EOF > /dev/null 2>&1
    connect / as sysdba;
    alter tablespace $LINE end backup;
    disconnect;
    exit
    EOF
    6. archive log가 없을 수 있으므로 수동으로 log switch 해줍니다.
    arch_list_1
    #!/bin/ksh
    sqlplus /nolog << EOF > $LOG
    connect / as sysdba;
    alter system switch logfile;
    disconnect;
    exit;
    EOF
    7. archvie file의 리스트를 뽑아냅니다.
    arch_list
    #!/bin/ksh
    TBS_INFO=/tmp/tbs_info~.$$
    ARCHIVE_DIR=/tmp/PROD_archive_dir.txt
    sqlplus /nolog << EOF > $LOG 2>&1
    connect / as sysdba;
    alter system switch logfile;
    disconnect;
    exit;
    EOF
    sqlplus /nolog << EOF > $TBS_INFO 2>&1
    connect / as sysdba;
    archive log list;
    disconnect;
    exit;
    EOF
    cat $TBS_INFO | awk ''$1 == "Archive" {print $3}'' > $ARCHIVE_DIR
    ARCH_DIR=
    cat $ARCHIVE_DIR
    ARCH_LIST_PROD=
    ls -ltr $ARCH_DIR/*.arc |wc -l
    echo "ARCH_LIST_PROD : $ARCH_LIST_PROD" >> $LOG
    ARCH_LIST_PROD_1=
    expr$ARCH_LIST_PROD - 1
    echo "ARCH_LIST_PROD_1 : $ARCH_LIST_PROD_1" >> $LOG
    /usr/bin/ls -ltr $ARCH_DIR/*.arc |awk ''{print $9}'' |head -
    $ARCH_LIST_PROD_1 > /tmp/PROD_arch_list
    echo "Archive Log List Print.....O.k....
    /usr/bin/date +%c
    " >> $LOG
    #\rm $TBS_INFO $ARCHIVE_DIR
    8. 위에서 /tmp/PROD_arch_list에 있는 archive리스트를 veritas netbackup에서 넣어주면 tape백업이 됩니다.그리고 특이한 것은 archvie file은 archive file을 백업했으면
    지우도록 설정하면 되겠지요.

  • Creating a new controlfile with datafiles in RMAN backup

    Hi,
    i am using oracle 10g (10.2.0.1) in RHEL5 server. i am trying to restore a RMAN backup from one server to another new server with new db name. i have taken out the spfile from RMAN autobackup and created pfile from it and edited the pfile with new dbname and directory structure and started the db in nomount with the new pfile. Now i have restored the controfile from the RMAN autobackup tried to put the database in mount state. But it failed due to the below error
    RMAN-03002: failure of alter db command at 11/05/2012 21:44:56
    ORA-01103: database name 'ORADB' in control file is not 'DEVDB'
    Hence i shutdown the database and started the db in nomount with new pfile and tried to create the controlfile with the new db name,but it failed as it is looking for the datafiles.
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01565: error in identifying file
    '/u01/app/oracle/oradata/DEVDB/datafile/o1_mf_system_80jq0kfw_.dbf'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    All my datafiles reside in my RMAN backup. How to get the datafiles from RMAN backup in the above scenario??
    Regards,
    007

    Hello;
    The location and filename and DBIS will be different, but you need something like this :
    $ORACLE_HOME/bin/rman  << EOF
    CONNECT TARGET /
    STARTUP NOMOUNT;
    SET DBID 3754763357;  #DBID of PROD database
    RUN
       ALLOCATE CHANNEL c1 DEVICE TYPE disk format '/u01/oradata/backups';
       RESTORE CONTROLFILE FROM '/u01/oradata/backups/sb_t790762003_s85_p1';
       ALTER DATABASE MOUNT;
       SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/CLONE/system01.dbf';
        SET NEWNAME FOR TEMPFILE 1 TO '/u01/app/oracle/oradata/CLONE/temp01.dbf';
       RESTORE DATABASE;
       SWITCH DATAFILE ALL;
       RECOVER DATABASE;
       release channel c1;
    ALTER DATABASE OPEN RESETLOGS; So you need "SET NEWNAME" for all your files
    Full Example
    http://www.visi.com/~mseberg/rman/restore_database_without_catalog.html
    Best Regards
    mseberg

Maybe you are looking for

  • IDOC-XI-File Scenario -Response?

    I know how to configure R/3 to send IDOC to XI, and then XI-File configuration. I read how-to doc on acknowledgment, it assumes the receiving party is also on R/3 where they configured AUDIT to send response from receiving party. But this case is rec

  • My Playlist for recently added is not in any order on my ipad but is on itunes

    i looks like i played get ur freak on by missy elliot and then hit shulffle with the tracks ing the same order everytime. on itunes though everything is in perfect order. when i hit sync it goes back to normal half way through and changes back at the

  • Project resource Management: Discoverer reports for Utilization.

    Hello, We are planning to use PJRs discoverer reports. Is it mandatory to use PJI for the same? Also what is the exact difference in new and old utilizaiton models? It will be great f you can point me to some proper docs on this one. thanks fo ryour

  • Mac Pro boots into Vista upon startup, not OS X?

    Hi, I installed Windows Vista on a second hard drive on my Mac Pro but for some reason it insisits on booting into windows every time i start or restart my Mac? Tried setting the startup disk to OS X but it still boots into Vista! I have to hold down

  • Feature Request - Ability to prevent videos from auto playing in Browser

    This one isn't totally specific to the Classic, but I thought I'd throw it out there. Currently, when visiting sites such as CNN or CTV News in the BlackBerry Browser and you open an article with a video, it will be begin playing automatically. This