Re: flashback queries

Re: flashback queries

 

  

Do the following Execerise to know about working of flash back query..


Note : in 9.2 we can flash back only DML operation. but in 10g we can flash
back table and database also.

Flash back query save you in following Three scenario.

--->Erroneous or malicious DROP TABLE statements
--->Erroneous or malicious update, delete or insert transactions
--->Erroneous or malicious batch job or wide-spread application errors


Pre-Requisit Configuration .

SQL> show parameter UNDO;

NAME TYPE VALUE
------------------ -------------- -----------
undo_management string AUTO
undo_retention integer 900
undo_suppress_errors boolean TRUE
undo_tablespace string UNDO_TBSPC


Previaligies to flash back user.. Here we will use scott user.

FLASHBACK privilege to the user for all or a subset of objects
Execute privileges on the dbms_flashback package

grant FLASHBACK ON SCOTT.EMP TO SCOTT;
GRANT EXECUTE ON DBMS_FLASHBACK TO SCOTT;

/*PRACTICAL*/
SQL> select DBMS_FLASHBACK. GET_SYSTEM_CHANGE_NUMBER from dual;

GET_SYSTEM_CHANGE_NUMBER
------------------------
69518472

SQL> INSERT INTO EMP_MAIN SELECT * FROM EMP_MAIN AS OF SCN 69518465;

15 rows created.






----- Original Message -----
From: "Gray Geoff "
<oracledba-ezmlmshield-x54840052.[Email address protected]
To: "LazyDBA Discussion" <[Email address protected]
Sent: Thursday, March 03, 2005 11:13 AM
Subject: flashback queries


> .. make that flashback queries
>
>
>
> Does anyone what determines how far back a flashback query can go?
>
> Regards,
>
> Geoff
>
> Geoff Gray
> technical consultant
> energy and utilities
> logicacmg
>
>
>
>
>
>
> This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
>
>
> --------
> website: http://www.LazyDBA.com
> Please don't reply to RTFM questions
> Oracle documentation is here: http://tahiti.oracle.com
> To unsubscribe: see http://www.lazydba.com/unsubscribe.html
> To subscribe: see http://www.lazydba.com
> By using this list you agree to these
terms:http://www.lazydba.com/legal.html
>
>



Oracle LazyDBA home page