Log Switch in Hot backup
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Log Switch in Hot backup

  1. #1
    Join Date
    May 2000
    Location
    India
    Posts
    18
    Hi,
    Can any one explain the reasons for performing log switch in hot backup, before putting the tablespace in backup mode and copyinh the corresponding data files. by using:
    ALTER TABLESPACE BEGIN BACKUP;
    .....
    ALTER TABLESPACE END BACKUP;

    Will be there be any problem, if I don't perform log switch before backing the datafiles?

    Thanks in advance.
    Thanks,
    Bhaskara


  2. #2
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,591
    One reason could be that if during the back stage/mode, if a desk crash or failure occurs, you can bring the db back in time just before the alter tablspc test begin backup; command!(by using the archive logs ofcourse).

    Tarry

    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  3. #3
    Join Date
    Aug 2001
    Location
    chennai,bangalore
    Posts
    840
    When u put ur tablespace in hotback up mode,oracle will perform a checkpoint by writing all the modified blocks in the database buffer cache into the datafiles,advancing the SCN in the logfiles and datafile ,after this initial checkpoint,no further checkpoints will be written to datafiles.So the changes will be written to logfiles generating more redo till u end the backup.So i guess it really does not cause any issue if you dont switch logile.If at all u switch logfile before you take hotback up u will be writing into a fresh redolofile.

    I hope i am write on this point.please correct me if i am wrong.

    regards
    anandkl
    anandkl

  4. #4
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,591
    Anand,
    you're right about the begin and endback up mode of the tablespace and how oracle stops chkpointing.
    He's aking about log switching, so that the info can also be written to the offline redologs.(just in case!)

    Cheers!!!

    Tarry
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  5. #5
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    In simple terms : -

    Usually people switch logs after the end backup to make sure they have all the redo generated during the backup.

    Switching redo logs prior as well will not hurt. If you intend on NOT keeping the archives generated before the backup, then you should definetly do the switch.
    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

  6. #6
    Join Date
    May 2002
    Posts
    22
    Hi bhas,

    FYI,

    for more detail information..
    refer to a book from Osborne
    "Oracle 8 OCP Exam Guide"

    chapter 14 "Backup and Recovery Options with Archiving"

    I can send you need the html file.
    let's eat fish!

  7. #7
    Join Date
    Apr 2002
    Location
    Phoenix, AZ
    Posts
    175
    explicit Log switch is not necessary but usually a practice to flush out the last few entries in the logs to Archives.

    It will not matter anyway in databases with a log of continuous update activity.

  8. #8
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,591
    Originally posted by imron95
    Hi bhas,

    FYI,

    for more detail information..
    refer to a book from Osborne
    "Oracle 8 OCP Exam Guide"

    chapter 14 "Backup and Recovery Options with Archiving"

    I can send you need the html file.
    I would advise against strengthening my fundamentals with exam prep books.
    Pick up a good book like that of tom kyte or others.......

    And ofcourse there's always enough on the net.........

    Cheers!
    Tarry

    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width