Archiv für die Kategorie TOI
Flashback Part 2 11g Addendum
As mentioned before, we can query the content of a table from the past (since 9i with flashback query) and even reinstate the past content of that table (since 10g with flashback table to timestamp) by making additional use of before images stored in the undo tablespace. Of course, this is only possible as long as these before images in the undo tablespace are not overwritten by new ones.
A new feature of the 11g version is to safe the information from the before images for selected tables, thereby enabling a flashback query or flashback table to timestamp for these selected tables even years after their modification. That is called Total Recall and works like this:
SQL> create flashback archive fla1 tablespace tbs1 retention 10 year;
SQL> alter table hr.departments flashback archive fla1;
You will now be able to do a flashback query for the departments table in 10 years until today and to any time in between!
Starting the Observer in the background
One question that I get asked often in my Data Guard courses (also this week) is, how to start the observer for Fast-Start Failover in the background.
Many customers use a remote terminal emulation to manage their Data Guard configuration, so it would be a problem if it would be required to keep the window open on which they started the dgmgrl-shell for the observer. This is also not very well documented in our – apart from that very helpful – Online Documentation. On the Linux command line, it works like this:
nohup dgmgrl -silent sys/oracle@prima "start observer" &
This gives you a text file on your current directory called nohup.out on which you can do a tail -f later on, if you would like to see te actions of the observer. The Data Guard Observer is kind of quiet, it waits with messages until there is actually something to do. You can verify its presence with dgmgrl from the primary site with the command
DGMGRL> show configuration verbose
Configuration Name: myconf Enabled: YES Protection Mode: MaxAvailability Fast-Start Failover: ENABLED Databases: prima - Primary database physt - Physical standby database - Fast-Start Failover target
Fast-Start Failover Threshold: 30 seconds Observer: uhesse
Current status for "myconf": SUCCESS
Alternatively, you can query v$database like this:
SQL> select FS_FAILOVER_STATUS,FS_FAILOVER_OBSERVER_PRESENT,FS_FAILOVER_OBSERVER_HOST
from v$database;
Another Data Guard Class
Presently, I am teaching a 10g Data Guard course in Munich (Germany). Over the last quarters this has become one of my most frequent courses – which is quite a good thing because I really like the product and the course 🙂
I have uploaded a collection of Data Guard related Metalink Notes to the Downloads page that I start to distribute to my students with this class.
