Ask the Expert

Using redo logs to restore to point of failure

Hi, I am migrating from Oracle 8i to 9i on a new server. The new instance is being set up to enable archiving. Archiving was not set up in the 8i instance.

The server will be backed up nightly, but the database will only be backed up on a biweekly basis. If we encounter a failure, I intend to use the archive logs to recover. Do I also need to apply the redo logs somehow in order to restore right up to the point of failure? If so, can I change the path to where the redo logs are written? I would like to put them on a separate drive just as I am putting the archive logs on a separate drive. Is this possible? Thanks very much for your assistance.

    Requires Free Membership to View

You will need to apply the archived redo logs in the order they were created. If you do need to restore, do not restore the control files unless you absolutely have to. The control files will know which online redo logs were created and their location. The control files become the guide to how to recover the transactions since the last backup.

You can put your online redo logs in another location. When I move my online redo logs, I find it useful to do the following:

  1. Query V$LOG to find an inactive group (SELECT group#,status FROM v$log).
  2. Drop an inactive group (ALTER DATABASE DROP LOGFILE GROUP x).
  3. Re-create the group in the new location (ALTER DATABASE ADD LOGFILE GROUP x ('/dir1/log1a.dbf','/dir2/log1b.dbf' size xxxM)).
  4. Continue with other inactive groups.
  5. Eventually, you'll want a group to become inactive, so switch the logfiles (ALTER SYSTEM SWITH LOGFILE).
The above steps help me move my online redo log files while the database is open.

This was first published in May 2007

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: