Operating System - HP-UX
1751943 Members
4904 Online
108783 Solutions
New Discussion юеВ

Rollback Segments VS. Redo Logs

 
SOLVED
Go to solution
Derek Baxter_1
Occasional Advisor

Rollback Segments VS. Redo Logs

I am just a little confused so someone please correct me if i am wrong. The Rollback Segments are used during the daily processing and allow you to rollback anything you do before you commit. The Redo logs store everything that is done and pass it to an archive server(if on) in case of a database failure. If some can correct me or add a little more detail I would greatly appreciate it.
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: Rollback Segments VS. Redo Logs

Redo Logs

Oracle maintains logs of all transactions against hte database. These transactions are recorded in files caled online redo log files. These logs are used to recover the database's transactions in their proper order in the event of a database crash. The redo log information is stored external to the databases datafiles.

Each Oracle database will maintain two or more onlien redo log files. When the log is filled, the database goes on to the next one.

If the database is running in archvielog mode then the database will make a copy of the online redo log files before overwriting them. These are called archvie logs.

Rollback segments allow users to udo transactions they have made against a database. This function is available for update, insert, delte transactions. It is not available for changes to database objects such as alter table commands.

Hope this helps.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Derek Baxter_1
Occasional Advisor

Re: Rollback Segments VS. Redo Logs

Ok that makes sense. Now the if you are in archive mode then the Redo logs stay active until they are copied to the external storage and they can not be over written until then. We do not have archive mode on but our redo logs stay active even after it moves on the the next one. Any idea on why that would be.
Steven E. Protter
Exalted Contributor

Re: Rollback Segments VS. Redo Logs

Lets say you have three online redo logs.

log1
log2
log3

When the database is started it will start writing transactions to log1.

when log1 is full it will start writing to log2

when log3 is full it will then erase log1 and start writing there.

If its in archivelog mode, it will first copy off the contents of log1 to an external file and then erase log1 and start writing.

Thats the way its supposed to work. I would look at your init.ora file if its not behaving as expected.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Derek Baxter_1
Occasional Advisor

Re: Rollback Segments VS. Redo Logs

that sounds right. So if everything starts to hang and 1 and 2 are both active it is just deleting out 1 and will not continue until that is done.
Yogeeraj_1
Honored Contributor

Re: Rollback Segments VS. Redo Logs

Dear Derek,

Just a few words of caution and some guidelines.

You cannot HOT backup a noarchivelog mode database.

With NOARCHIVELOG mode, YOU must be prepared to lose data at some point, it is inevitable.


In order to backup (without RMAN) you will follow the steps in:

http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76993/toc.htm

which is the backup and recovery guide. It covers what structures you must backup in chapter 1. Basically you will need to

o shutdown normal
o copy the datafiles, control files, init.ora files
o startup

You do not want or need the online redo log files, when you restore, you'll be doing an "open resetlogs" which will recreate them.

Make SURE you test these backups by restoring them and seeing that everything you need is there. Make sure that as you add datafiles to the database, your backup routine will pick them up.

hope this helps!
regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)