Backup Mode

Gurus,
I have a script to put all tablespaces in backup mode (oracle 9i). This script used to take less than a minute to execute. Now, it is taking more than one hour for the same tablespaces.
Any idea what can decrease the performance of
alter tablespace xxx begin backup;
Please help

OK, you have 381 datafiles, but I made the wrong question (mea culpa), the relevant info is actually the number of tablespaces. When you execute "begin backup" the whole buffer cache is scanned, independently of the number of dirty buffers, so if the buffer cache is large and you have a lot of tablespaces, the time it takes to process all of them will be high. The workaround is to use RMAN for backups, it doesn't issue "begin backup". I've to remark that hitting this "bug" is just a possibility among others.
Enrique

Similar Messages

  • What happen when Database in Backup Mode?

    Hi,
    What happen when we kept database in backup mode, Means using command 'Alter database Begin Backup';
    Thanks...
    Asit

    jgarry wrote:
    EdStevens wrote:
    jgarry wrote:
    What do you think of the snapshot backup on page 22 of [url http://en.community.dell.com/techcenter/storage/w/wiki/2638.oracle-11g-backup-and-recovery-using-rman-and-equallogic-snapshots-by-sis.aspx]this paper? (No sarcasm, I'm curious about these snap solutions in general. Though I am really down on Dell for what turned out to be a brain-damaged laptop I got for my wife.)
    Well, you can't really make a judgement about a company's enterprise products based on an experience with their consumer products.What if it came from what they call a business products catalog? They intermingle laptops with servers.
    Don't know, in general. I do know that for Dell there is a distinct difference between their decidedly consumer laptops (Inspiron) and their "business" Lattitude series. I know that at my last job we had a lot of rock solid HP equipment (servers and SAN) - vs. an HP laptop I had that was trouble from Day One. I'm sure there is a point in desktops and laptops the line can get blurred, but in the case of the OP, he was no where near that fuzzy line.
    >
    >>
    Perhaps I can find time to read the white paper over the weekend ....

  • Database in backup mode

    Hi Guys,
    If I put my database in backup mode and perform the backup (hotbackup/online) of the database.
    When I need to do restoration, do I need any archive logs at all? (not necessary to recover up to point in time) Can i just restore the datafiles and do a alter database open resetlogs?
    Will the database be inconsistent and can't startup without applying any archive logs at all? as the datatabase is not shutdown when doing the backup.
    thanks

    dbaing wrote:
    Hi Guys,
    If I put my database in backup mode and perform the backup (hotbackup/online) of the database.
    When I need to do restoration, do I need any archive logs at all? (not necessary to recover up to point in time) Can i just restore the datafiles and do a alter database open resetlogs?Yes, even if you won't be required to do an point in time recovery, you need the archive logs to make the database consistent which it won't be in a hot backup mode.
    Will the database be inconsistent and can't startup without applying any archive logs at all? as the datatabase is not shutdown when doing the backup.Yep.
    That said, use RMAN to do the same thing. It would be much better to use it than using the backup mode .
    HTH
    Aman....

  • Do I need to use standby database in begin backup mode to take the backup?

    Hi All,
    I have a 10g(10.2.0.4) primary database with standby on a solaris platform. I need to create another standby database for the same primary.
    I have stopped the recovery on existing standby database and started copying(os copy) the files from existing standby to 2nd standby server. However I haven't kept the existing standby database(mounted) in begin backup mode. Is it okay?
    Thanks,
    Arun

    Backup mode for a mounted database?
    orclz>
    orclz> startup mount
    ORACLE instance started.
    Total System Global Area  788529152 bytes
    Fixed Size                  3050600 bytes
    Variable Size            373293976 bytes
    Database Buffers          406847488 bytes
    Redo Buffers                5337088 bytes
    Database mounted.
    orclz>
    orclz> alter database begin backup;
    alter database begin backup
    ERROR at line 1:
    ORA-01109: database not open
    orclz>

  • Update & select query when tablespace in backup mode

    Hi,
    I have a query related to the DML statement when tablespace is in backup mode. Suppose when put the tablespace in begin backup mode then during the time one user run an update statement against this tablespace and commit the transaction and other user run the select query on the same data then which image the user will get and from where the data will be taken to display.
    steps:
    alter tablespace users begin backup;
    update emp set sal=4000 where empno=101;
    commit;
    select * from emp where empno=101;
    Now what result user will get and from where the data will fetch.
    Thanks,
    Gulshan

    Hi,
    alter tablespace users begin backup;
    update emp set sal=4000 where empno=101;
    commit;
    select * from emp where empno=101;AFAIK, the database would work normally and you will not find the difference from transactions perspective. If you check from Oracle architecture and process, fuzzy bit will be setted at up and additional redo vectors would be saved up in the online redo logs - due to which size of redo would higher when compared to normal transactions. Secondly, you must be worried about the backup - which might not be consistent. So better opt for RMAN instead of User managed Backups.
    - Pavan Kumar N

  • Time Machine is endless preparing backup mode

    My time machine backup is an endless preparing backup mode to a Time Machine. Prior errors were a failed backup. Do I need to power down the Time Machine and restart! I see the back disk icon on the desktop and the Time Machine is under the Finder Shared.

    Give it as much time as you can. I've seen 2-3 hours of "preparing" before the backup starts.
    Try to let it go until the end of the day if you can. If no luck, stop the process and try the next step.
    Open Hard Drive > Applications > Utilities > Disk Utility
    Click your Hard Drive on the left to highlight it. Choose the icon with the exact name as the Hard Drive on your desktop. If you haven't changed this, it will be named Macintosh HD.
    Click Repair Disk Permissions
    This will take 15-45 minutes, maybe a little longer depending on how much data is on the disk.
    When the permission repair is complete, try the Time Machine reset again to see if that will get things going.

  • PIT recovery until time when database was in backup mode

    Hello,
    Is it possible to recover database until some point/time which is within "time window" when database tablespaces were still in online backup mode?
    I was basicaly replicatying database from source to target DB by putting DB to online backup mode, then copy all datafiles, after copy of datafiles was finished I started applying redologs generated on source DB afterwards. After I applied tens of redologs with "recover database until cancel using backup controlfile" and then typed "CANCEL" after 10-20 redologs applied I still got an error that opening DB would get an error due to inconsistent datafile. When I ended backup mode on source DB and applied few of redologs after ending backup mode on source DB datafiles were consistent.....
    Thx a lot for answer in advance.

    Hello Hemant K Chitale ,
    thats clear. I probably did not express it clearly, so I will describe it once again:
    Teoreticall scenario 1:
    I put 'source" database to backup mode and start copy datafiles to "target" db. When copy of all datafiles is succesfully finished (lets say it 5:00AM), I don't issue "end backup" on source DB but I keep tablespaces in backup mode until 7:00AM. On target DB I will start recovery and apply redologs from source system.
    Question 1:Is it possible to recover database until time 6:00AM? At this time all datafiles were already succesfully copied, BUT source db was still in backup mode. Or will I be able to get target DB to consistent state only after 7:00AM (end backup issuied on source DB) and not in window 5:00AM-7:00AM?
    Teoreticall scenario 2 (small correction comparing to scenario1):
    I will put source DB to begin backup mode at 5:00AM on 20.february and let it in this state until 7:00AM on 20.february. On target DB I will restore backup from source DB performed day before (or few days before does not matter) that means on 19.february and start to apply redologs generated after this backup.
    Question 2: Will I be able to recover DB until 6:00AM on 20.february and open database after recovery until this time? Or wont I be able to recover and open DB witin window 20.february 5:00AM-7:00AM (source db in backup mode)
    Bear in mind this is just teoreticly (don't ask me why would you do it and why you don't do it this way etc...). I just want to understand how it really works ;)
    Thx a lot!

  • Database stuck in backup mode after unplanned restart.

    Hi All,
    Maybe someone can help i am looking to see if there is a Oracle paramater that will kill a backup if the system is restarted or stopped during a baclup.
    John

    There is no such parameter.
    If you are still using user managed backups (which
    you shouldn't)
    you'll need to recover your database when you abort a
    backup, or shutdown the database during backup.That is not correct.
    See documentation on the END BACKUP Clause:
    After a system failure, instance failure, or SHUTDOWN ABORT operation, Oracle Database does not know whether the files in online backup mode match the files at the time the system crashed. If you know the files are consistent, you can take either individual datafiles or all datafiles out of online backup mode. Doing so avoids media recovery of the files upon startup.
    * To take an individual datafile out of online backup mode, use the ALTER DATABASE DATAFILE ... END BACKUP statement. See database_file_clauses .
    * To take all datafiles in a tablespace out of online backup mode, use an ALTER TABLESPACE ... END BACKUP statement.

  • Where do changed data values goto if DB is in BACKUP mode for LONG PERIODs

    Where does oracle write if put the database in begin backup mode for LONG PERIODs. Lets say I issued a "ALTER DATABASE BEGIN BACKUP" command in a busy database and forgot about it for a long time.
    I understand that when the DB IS IN BEGIN BACKUP MODE, "the database copies whole changed data blocks into the redo stream." (Page 503 of 11.1 backup and recovery guide). But the redo stream is limited by the number of online redologs. After some time redologs also wont be sufficient for the changed data values after a begin backup is issued. I understand that there are archived redologs.
    Lets say there are 2 redolog groups in this database and Lets say 10 archive log files got generated since the ALTER DATABASE BEGIN BACKUP was issued.
    When i finally issue the "ALTER DATABASE END BACKUP" command, will Oracle sync the datafiles with the changed data blocks reading the data from these 10 archived log files ? What happens if i delete these archive redologs from the archive log destination. ??
    page 504 of 598 in the backup and recovery guide
    Caution : If you fail to take the tablespace out of backup mode,
    then Oracle Database continues to write copies of data blocks in
    this tablespace to the online redo logs, causing performance
    problems. Also, you receive an ORA-01149 error if you try to shut
    down the database with the tablespaces still in backup mode.
    it just says "performance problems", nothing more than that.*
    Any answers ? I am sure this question would have popped to some of you senior DBA people out there.

    user13076519 wrote:
    Where does oracle write if put the database in begin backup mode for LONG PERIODs. Lets say I issued a "ALTER DATABASE BEGIN BACKUP" command in a busy database and forgot about it for a long time. It writes just like it always does, plus it puts some extra in the redo log the [url http://oraclenz.com/2008/07/11/logging-or-nologging-that-is-the-question-part-ii/]first time a block is changed.
    >
    >
    I understand that when the DB IS IN BEGIN BACKUP MODE, "the database copies whole changed data blocks into the redo stream." (Page 503 of 11.1 backup and recovery guide). But the redo stream is limited by the number of online redologs. After some time redologs also wont be sufficient for the changed data values after a begin backup is issued. I understand that there are archived redologs. This appears to be a typo (incompleteness, really) in the backup and recovery guide.
    The redo stream is not limited by the number of of redo logs, only the volume of data. When a log fills up, it gets archived. If all the logs get filled up before the first one is finished archiving, the db will stall until the next redo becomes available. The only limit to archiving is disk space (and bandwidth if that is an issue, which it can be in some configurations).
    >
    Lets say there are 2 redolog groups in this database and Lets say 10 archive log files got generated since the ALTER DATABASE BEGIN BACKUP was issued.
    When i finally issue the "ALTER DATABASE END BACKUP" command, will Oracle sync the datafiles with the changed data blocks reading the data from these 10 archived log files ? What happens if i delete these archive redologs from the archive log destination. ??Archived logs are archived, Oracle only reads them in recovery. You do not understand archive logs, read the concepts manual.
    >
    page 504 of 598 in the backup and recovery guide
    Caution : If you fail to take the tablespace out of backup mode,
    then Oracle Database continues to write copies of data blocks in
    this tablespace to the online redo logs, causing performance
    problems. Also, you receive an ORA-01149 error if you try to shut
    down the database with the tablespaces still in backup mode.
    it just says "performance problems", nothing more than that.*Because it is overgeneralizing.
    >
    Any answers ? I am sure this question would have popped to some of you senior DBA people out there.Oh, you want to send me a gift for showing where in oracle it's documented? See [url http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:271815712711]here for something over a decade old.

  • Tablespace or Datafile in Backup mode

    Hi,
    Can anyone explain me what happen at the background when a tablespace or a datafile is in backup mode.
    Thanks in advance
    Regards
    Aruna
    Edited by: user11144654 on May 8, 2009 3:10 AM

    The tablespace is checkpointed, the checkpoint SCN marker in the datafile headers cease to increment with checkpoints, and full images of changed DB blocks are written to the redologs.
    Those three actions are all that is required to guarantee consistency once the file is restored and recovery is applied. By freezing the checkpoint SCN in the file headers, any subsequent recovery on that backup copy of the file will know that it must commence at that SCN. Having an old SCN in the file header tells recovery that the file is an old one, and that it should look for the redolog file containing that SCN, and apply recovery starting there. Note that checkpoints to datafiles in hot backup mode are not suppressed during the backup, only the incrementing of the main checkpoint SCN flag. A “hot backup checkpoint” SCN marker in the file header continues to increment as periodic or incremental checkpoints progress normally.
    There is a confusing side effect of having the checkpoint SCN artificially frozen at an SCN earlier than the true checkpointed SCN of the datafile. In the event of a system crash or a ‘shutdown abort’ during hot backup of a tablespace, the automatic crash recovery routine at startup will think that the files for that tablespace are quite out of date, and will actually suggest the application of old archived redologs in order to bring them back into sync with the rest of the database. It is unnecessary, in this case, to heed Oracle’s suggestion. With the database started up in mount mode, simply check v$backup and v$datafile to determine which datafiles were in backup mode at the time the database crashed. For each file in backup mode, issue an ‘alter database datafile '<file name>' end backup;’ This action will update the checkpoint SCN in the file headers to be the same as the hot backup checkpoint SCN (which is a true representation of the last SCN to which the datafile is truly checkpointed. Once this action is taken, it allows normal crash recovery to proceed during the ‘alter database open;’ command.
    By initially checkpointing the datafiles that comprise the tablespace and logging full block images to redo, Oracle guarantees that any blocks changed in the datafile while in hot backup mode will also be available in the redologs in case they are ever used for a recovery.
    It is well understood by much of the Oracle user community that during hot backup mode, a greater volume of redo is generated for changes to the tablespace being backed up than when the tablespace is not in backup mode. This is the result of the logging of full images of changed blocks in these tablespaces to the redologs. Normally, Oracle logs an entry in the redologs for every change in the database, but it does not log the whole image of the database block. By logging full images of changed DB blocks to the redologs during backup mode, Oracle eliminates the possibility of the backup containing irresolvable split blocks. To understand this reasoning, you must first understand what a split block is.
    Typically, Oracle database blocks are a multiple of O/S blocks.  For instance, most Unix filesystems have a default block size of 512 bytes, while Oracle’s default block size is 2k. This means that the filesystem stores data in 512 byte chunks, while Oracle performs reads and writes in 2k chunks, or multiples thereof. While backing up a datafile, your backup script makes a copy of the datafile from the filesystem, using O/S utilities such as copy, dd, cpio, or OCOPY.  As it is making this copy, it is reading in O/S-block sized increments. If the database writer happens to be writing a DB block into the datafile at the same time that your script is reading that block’s constituent O/S blocks, your backup copy of the DB block could contain some O/S blocks from before the database performed the write, and some from after. This would be a split block.
    By logging the full block image of the changed block to the redologs, it guarantees that in the event of a recovery, any split blocks that might be in the backup copy of the datafile will be resolved by overlaying them with the full legitimate image of the block from the redologs. Upon completion of a recovery, any blocks that got copied in a split state into the backup will have been resolved through application of full block images from the redologs.

  • Printing in ink backup mode on 7960

    Despite replacing all 3 ink cartridges with 3 brand new ones (which was costly), my 7960 printer continues to display the message "Printing in ink backup printing mode." I made sure to remove the protective tape and seated them solidly when I installed them. I continuedto get the message, so I reset the new cartridges and made sure that they are installed correctly. All of the cartridges are HP (not refills or off brands). Why is this happening? Also, how can I determine which cartridge is causing the problem? Thanks for any tips.

    Hello dsearer, and welcome to the HP Forums, I hope you enjoy your experience!
    I understand that you are having cartridge issues.  I would like to assist you with that.
    I would suggest performing a power reset on your printer.  Disconnect the power cord from the printer and the power outlet, then wait 60 seconds. After 60 seconds, plug the printer back in. Ensure you plug the printer directly to a wall outlet. Make sure to bypass any sort of surge protector or power bar.
    I would also recommend following through the steps in this document on a 'Printing In Ink-Backup Mode' Error Message Displays on the Computer.
    Good luck and please let me know the results of your troubleshooting steps. Thank you for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Trying to update iPod touch - stuck in backup mode

    I have a 2nd gen iPod touch and am trying to update the software, which iTunes is kind enough to remind me to do everytime I connect the iPod to my computer.  I have synched and backed up recently, or so I thought, before being able to download and install the update.  Now when I am trying to do the update it has synched again, but is stuck in backup mode without any signs of progress for the past hour.  It said it would take an hour or more to complete the update, but maybe they should reword it to say it'll take a day or more.
    The last time I tried to do the update and couldn't I finally downloaded an update to iTunes, hoping that would help but no such luck.  What am I doing wrong? 

    See Here for
    Unable to Update or Restore
    http://support.apple.com/kb/HT1808

  • Blocking session in hot backup mode?

    In 8.1.7.4 Some time While in hot backup mode, blocking session occuring by checkpoint session background process. Can we issue the alter system checkpoint command in this
    Situation ? how to handle this?

    best way is to try and see but checkpointing frequently wont help in my opinion, a better workaround may be ensuring you only place one tablepspace at a time in backup mode and bring the tablespace out of backup mode as soon as you have backed it up.

  • How to tell tablespace is in backup mode?

    Ive issued the command:
    alter tablespace example begin backupMy problem is that I can't find a table/view that shows the tablespace is now in backup mode. Is there somewhere I can find this information?
    Regards,
    Warren

    Hi,
    U can check from v$backup about the status of the tablespace which is under begin backup mode.

  • What exactly happens when datafile is put in backup mode ?

    Dear Friend,
    i want to know what exactly happens when a datafile is put in backup mode ?
    that is what happens between Begin Backup ........................... end backup
    with regards.

    When u start hot backup via 'alter tablespace begin backup', the tablespace headers are marked as such. The dirty data buffers that belong to the database files are written out to the files and the datafiles are check pointed. The headers are updated with SCN @ the time the backup commences. It is the data file headers that were not updated until the 'alter tablespace end backup' is issued.
    The database files still continue to be read and updated. Recovery will commence from the scn written at the commencement of the backup and it is the changes written to the redo\archive logs during the backup that are rolled forward during recovery
    Cheers,
    Bin

  • Db corrupted in begin backup mode

    hi all,
    This is part of my practice only.
    My db is 11.2.0.1.0 on linux. i kept my db in begin backup mode and started copy and forgot to end backup. taken controlfile backup like alter database backup controlfile to '/u01/app/oracle/orcl/control_bkp.ctl'.
    Now i deleted all db files, redo files, control files corrupted. (to perform complete db recovery).
    I started recovery. started in nomount and copied controlfiles from backup location to it's original location.
    and then issued >recover database using backup controlfile until cancel;
    given follwoing error.
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01195: online backup of file 1 need more recovery to be consistent
    ORA-01110: data file 1: '/u04/oracle/oradata/jt10g/system01.dbf'
    any suggestions please.
    thanks for you help..

    i can see from the link: https://forums.oracle.com/thread/634538 (MaranViswarayar replied) this type can't recovered. is it true.

Maybe you are looking for