Вы находитесь на странице: 1из 13

Oracle Class Wissem's Oracle and NOSQL Tips Tunisia's First Oracle, NOSQL Website

Wissem's Oracle and NOSQL Tips


HOME VIDEOS BOOKS ARTICLES REVIEWS WEBINAR FORUM FAQ NOSQL ABOUT ME BLOG

11g Oracle Flashback Data Archives


February 13th, 2011 | Posted in 11G, Blog, flashback | 5 Comments

Introduction With Oracle 11g, Oracle have improved the Flashback technologies and now its a solid part of the recovery solutions Oracle provides. Oracle flashback data archives provides the ability to track changes made on a table over its lifetime. Now, You can stop using your logging scripts built on previous versions of Oracle, and start using the flashback data archives.The flashback data archives can also be used for data analysis and within a decision support system (DSS) environment. In this article, we are going to setup the Oracle flashback data archives and then how it can be used. Before you start Any user concerned by the flashback data archives must have the flashback archive administer privilege granted.
Grant FLASHBACK ARCHIVE ADMINISTER to WISSEM;

Example In this example, we create the archive with a retention period of one day (in real world, this

retention period may be in term of months, even years). CAUTION Archives can get quite large. make sure you allocate enough space 1- We first create a flashback data tablespace. 2- We create a test table. 3- We enable the archive data on the test table.

Query the test table using the AS OF clause, specifying a timestamp prior to the delete timestamp. Then, just to verify that we are using the flashback data archive and not the content of the undo tablespace, we create a new tablespace, make it the default, switch it it the default tablespace and drop the old undo tablespace.

CAUTION If you turn off the data archives using alter table fb_data_archive no flashback archive, you will lose all the historical data for that table. The same happens if you drop or purge all the flash back data archives. Drop the flash back data archives:
Drop flashback archive default_flash_archive;

Purge all historical data from flash back data archive:


Alter flashback archive default_flash_archive PURGE ALL;

Note that when a table is in data archives mode, certain DDL statements may fail, especially the drop command;

<br /> SQL&amp;gt; alter table fb_data_archive add col number;<br /> Table altered.<br /> SQL&amp;gt; drop table fb_data_archive;<br /> drop table fb_data_archive<br /> *<br /> ERROR at line 1:<br /> &lt;strong&gt;ORA-55610: Invalid DDL statement on history-tracked table&lt;/strong&gt;<br /> SQL&amp;gt; truncate table fb_data_archive;<br /> Table truncated.<br /> SQL&amp;gt; alter table fb_data_archive rename to fb_data_archive_2;<br /> Table altered.<br /> SQL&amp;gt;<br />

To avoid this error, when dropping the table, you must first disable the flashback data archives on this table.
<br /> SQL&amp;gt; alter table fb_data_archive rename to fb_data_archive_2;<br /> Table altered.<br /> SQL&amp;gt; alter table fb_data_archive_2 no flashback archive;<br /> Table altered.<br /> SQL&amp;gt; drop table fb_data_archive_2;<br /> Table dropped.<br />

The Oracle Flashback data archive views To administer the flashback data archives, you can use one of following views; - DBA_FLASHBACK_ARCHIVE: All the flashback data archives information. - USER_FLASHBACK_ARCHIVE: Your flashback data archives information. - DBA_FLASHBACK_ARCHIVE_TS: All tablespaces related to the flashback data archives. - DBA_FLASHBACK_ARCHIVE_TABLES: All tables with data archives enabled. - USER_FLASHBACK_ARCHIVE_TABLES: Your tables with data archives enabled. Nice reading, Scridb filter

5 Comments to 11g Oracle Flashback Data Archives


1. Shamseer says: %A %B %e%q, %Y at %I:%M %p Nice documentation..Was indeed useful. Thanks for sharing

Regards Shamseer Reply


o

admin says: %A %B %e%q, %Y at %I:%M %p Cheers Reply

2.

pmarco says: %A %B %e%q, %Y at %I:%M %p Nice, clear & easy-to-read documentation. Thanks Reply
o

admin says: %A %B %e%q, %Y at %I:%M %p Gracias Saludos, Wissem Reply Voy a intentar de tradudicrlos en Espaol y Francs

3.

admin says: %A %B %e%q, %Y at %I:%M %p Pedro Marco Ortega says: Good extract. Simple, clear and easy-to-read. Thanks Reply

Leave a Comment

Name (required)

Mail (will not be published) (required)

Website

Submit Comment

1747

Blog's RSS Feed

Polls
which oracle topic interests you most?

Oracle data guard Oracle RAC Oracle performance tuning Oracle installation PL/SQL or SQL Oracle enterprise manager ASM / Storage RMAN, backup and recovery View Results

Polls Archive

00638436378402

UTF-8

Search

FAQ
How do I access the video tutorials? Once you've purchased a subscription or bought a video, you can access the online training videos through the Videos menu. Once you subscribed or paid on demand, you will get your password by E-mail.
You are already subscribed? Click here! Your are not a member yet? Register now here!

How much does it cost to buy one video ? 4.99 $ (USD) if you choose "Buy Now". How much does it cost see all the videos and have an unlimited access to the content of oracle-class.com ? Monthly billing of 10 $ (USD) for the subscribers. Which Payment method can I use ? Paypal. How many videos do you upload per month on oracle-class.com? From 5 to 10 videos. Duration of the videos? From 35 minutes to 1 hour. How many articles do you submit per month on oracle-class.com ? More than 10 articles. What is the content of the videos? 1- General Oracle database administration in 10g and 11g, 2- RMAN backup and recovery, 3- Database performance, 4- Oracle Dataguard, 5- Oracle Real Application Clusters, (Oracle RAC)

6- PL SQL programming. 7- Oracle Certifications ; OCA and OCP. 8- Secure the Oracle database. How do I download the source file? or I am trying to watch the stream, but I keep getting an error? Try right-clicking the download link and choosing the Save Link as option What are the system requirements for the videos? Tested with Firefox Mozilla and Google Chrome browsers. How can I end my subscription? You can unsubscribe at any time by sending an e-mail to admin@oracle-class.com How do I contact your Customer Care or Technical Support departments? For questions concerning technical support, changes to your subscription, or other troubleshooting issues, contact us using the "contact us" button on oracle-class.com web page.

Important : Your email address will not be shared with any third parties for any reason. We take all reasonable precautions to protect your privacy. Please feel free to contact us if you have any concerns.

Oracle Class twitts

wissem EL KHLIFI
orawiss @coskan In my first day work, I remember started with 4 nodes RAC 11gR2 patching ... :D 14 minutes ago reply retweet favorite Trace Materialized views; http://t.co/Vs7aCnR 20 hours ago reply retweet favorite @eddieawad Nice Thanks :) 4 days ago reply retweet favorite

Major New Undocumented Partitioning Feature in Oracle Database 11g Release 2: http://t.co/7yi0jGF 5 days ago reply retweet favorite

days ago reply retweet favorite

RAC 11gR2 ORA-00245: control file backup operation failed http://t.co/nMAC3nh 5

RAC 11.2.0.2 Patch 12311357 11.2.0.2.2 GI Patch Set Update and... http://wp.me/p1hlba-xs 6 days ago reply retweet favorite RAC 11.2.0.2 Patch 12311357 11.2.0.2.2 GI Patch Set Update and mutex patch 4 Nodes on Redhat Linux http://t.co/GjCRTAB 6 days ago reply retweet favorite sqlplus -prelim: If you cannot login to the database, for instance due to ORA-00020 maximum number of processes ... http://bit.ly/mi6D6O 6 days ago reply retweet

favorite favorite

11g reconfigure DB console http://wp.me/p1hlba-xn 9 days ago reply retweet 11g reconfigure DB console http://t.co/m9tdsiK 9 days ago reply retweet favorite

Oracle 11g R1/R2 Real Application Clusters Essentials Book review http://wp.me/p1hlba-xe 11 days ago reply retweet favorite

reply retweet favorite retweet favorite

11gR2 RMAN incremental updated backup demo http://t.co/uae0O8d 12 days ago Just blogged about another ASM bug clash http://t.co/wgUqQE5 12 days ago reply

My Case for Agile Methods by Cary Millsap - Recorded Webinar now available at http://goo.gl/BQig7 16 days ago reply retweet favorite Recording of "My Case for Agile Methods" by @CaryMillsap is available http://bit.ly/kdCPeI #agile #redgate 16 days ago reply retweet favorite

reply retweet favorite

RAC 11gR2 ORA-29540 class does not exist error http://t.co/wSyJjmD 17 days ago

Jonathan Lewis's Turkish Oracle Users Group (#troug) conference presentation video about two table join http://bit.ly/ll9bCn 17 days ago reply retweet favorite @sjaffarhussain in otn forum there are many questions! maybe spend time there; teach and learn 17 days ago reply retweet favorite

days ago reply retweet favorite retweet favorite

Electronic music ... listen to Moderat remixes ... NASTY! I love german electro!!!! 18 11gR2 Oracle Restart error : CRS-0259 http://t.co/hUAq9V5 18 days ago reply http://t.co/xR0ZV26 21 days ago reply retweet favorite

ago reply retweet favorite

Listening to Trentemoller remixes! Best rmx of all ... Perfect sounds ... nasty!! 22 days

You have nix* systems, you want to use PL SQL Developer, don't worry, use wine to install it :) 24 days ago reply retweet favorite @sjaffarhussain redhat 5 25 days ago reply retweet favorite @sjaffarhussain Strange, I didn't made them down before applying patch in DBH in one my RAC! I have 2 other RAC to patch them next week. 25 days ago reply

retweet favorite

retweet favorite favorite

@sjaffarhussain Hi jaffar, you fixed the pathc DBH issue? and how? 25 days ago reply @sjaffarhussain You ran the opatch with root user? 26 days ago reply retweet

@sjaffarhussain If I remember well, there still up and running. I used ./opatch auto /opt/patches/ to patch both GI and DBH. 26 days ago reply retweet favorite

days ago reply retweet favorite

@sjaffarhussain no at all. I have also installed mutex patch after and All went ok :) 26 @sjaffarhussain I did 27 days ago reply retweet favorite Join the conversation

Recent Posts

Trace Materialized views; RAC 11gR2 ORA-00245: control file backup operation failed RAC 11.2.0.2 Patch 12311357 11.2.0.2.2 GI Patch Set Update and mutex patch 4 Nodes on Redhat Linux 11g reconfigure DB console 11gR2 RMAN incremental updated backup demo

Oracle 11g R1/R2 Real Application Clusters Essentials Book review RAC 11gR2 ORA-29540 class does not exist error 11gR2 Oracle Restart errors : CRS-0259, CRS-2680, CRS-5802 RMAN backup into more than one location Datapump; Import using query 11g, Cold backup using RMAN and detached job 11gR2 RAC run ADDM report 11gR2 RAC CRS-2632 Error NOSQL: Hypertable Installation 11gR2 ASM Inside story Part5 (Read database file from OS) Active Session History (ASH) tool 11gR2 ASM Inside story Part4 (ASM Preferred Read Failure Group) 11g ASM Inside story Part3 (Export Datapump) 10g vs 11g add a column with not null default value 11gR2 ASM Inside story Part2 (Diskgroup restore) 11gR2 ASM Inside story Part1 (including grid infrastructure installation) 11g Data Recovery Advisor DRA Oracle Enterprise Manager Grid Control Installation 11g Failed with SEVERE: Exception: java.net.BindException: Address already in use: JVM_Bind 11g Oracle Flashback Data Archives Oracle Enterprise Manager Grid Control Installation 11g Release 1 (11.1.0.1.0) on fedora Linux 14 ORA-00918 ANSI Join Bug in 11.2.0.1 fixed in 11.2.0.2 11gR2 Physical Data Guard Setup project, with Active Data Guard option How to fix EXCEPTION in chrow processing code: -14551 msg: ORA-14551: cannot perform a DML operation inside a query in 11.2.0.1 version How to fix ORA-979: not a GROUP BY expression in 11.2.0.1 version Managing Resources; Real World Example Oracle Exchange partition Example Dealing with block corruption Duplicate an Oracle 11gR2 Using RMAN Step by Step clone of an Oracle 11g using RMAN Analyse this; Learning from the optimizer Track the row change time About Me Why Oracle ? Uploading data into an external file To fast clone my Oracle DB Tip ; DML error capture Step By Step Logminer Step by Step clone of an Oracle 10g using RMAN Result cache ; A great performance tip of 11g Pl Sql Tips Oracle Support Audit Oracle Optimizer; Index hint usage limits Millions of records into an Oracle Database

Incomplete Database Recovery in 10g and 11g Databases How to manually use Sql Tunning Advisor How to check available partition How do I manage my Oracle Database How do I fix ORA-01455 error on 11g Release 2 oracle database ? Forecasting Tablespace Find out who is locking my account Fast delete- Best practice Disconnect session or Kill session DBA Sql Tips DataGuard : Step-by-Step Instructions for Creating a Physical Standby Database Data Pump in 11g ; New parameters Convert money into words using PL SQL function, Commit vs Checkpoint Alternative statement, rewrite query Adequate Size of redolog Upgrade Oracle database from 10.2.x.0 to 10.2.x.3 Get an estimated result

Copyright Oracle Class Wissem's Oracle and NOSQL Tips Tunisia's First Oracle, NOSQL Website is proudly powered by Oracle-TNS.com Wissem EL KHLIFI

Contact

Вам также может понравиться