Flash back of Oracle Database

Source: Internet
Author: User

Oracle Database flash back oracle uses 10 Gb. When operating the database a few days ago, it was suddenly found that every time a table is deleted, a system generated table will be generated, the table is just deleted, but the table name is changed to a system field. It is preliminarily determined that it is a new technology from oracle. Deleting a table is not discarded immediately, I have never encountered this situation when I used 9i. Although the new technology is more user-friendly, it is sometimes inconvenient. I am here to raise 10 questions for this part. 1. How can I create an extra table with the same structure? This is because the new technology referenced by oracle starting from 9i, called flashback, is enabled by default from 10 Gb. The dropped table will not be deleted, and it will be stored in the recycle bin, oracle assigns a name generated by the system. The name is usually 30 characters long and can only be queried. This allows you to conveniently cancel tables and databases that have been accidentally deleted. 2. How do I perform physical deletion? You can use drop table tablename purge; to delete a table physically. 3. How can I restore a deleted table? Use flashback table tablename to before drop; to restore data. 4. How do I delete a single table in the recycle bin?

    purge table test_drop; 

 

5. I deleted many tables at a time. I don't want to delete one table at a time. How can I delete them? You can run the clear recycle bin command: purge recyclebin; 6. How do I view tables in the recycle bin? Use show recyclebin; To View table 7 in the current recycle bin, how can I check whether the current flash back is enabled? You can use select flashback_on from v $ database; to check whether flashback is enabled. 8. How do I disable flashback?
1. Shut down the database SQL> shutdown immediate; 2. Start the database in the mount mode SQL> startup mount; SQL> alter database flashback off;

 

9 how to start flashback?
1. shut down Database SQL> shutdown immediate; 2. start the database in the mount mode SQL> startup mount 3. SQL> archive log listSQL> alter database archivelog; SQL> alter database open 4. set the format of archived logs SQL> alter system set log_archive_format = 'arc % s % t % r. log'scope = spfile; 5. set the path for storing archived logs: SQL> alter system set log_archive_dest = '+ data/arcl' scope = spfile; SQL> shutdown immediateSQL> startup 6. forcibly switch the archive date to SQL> alter system switch logfile; 7. cancel archiving SQL> alter database noarchivelog;

 

10 how to flash back to the database?
1. shut down Database SQL> shutdown immediate; 2. start SQL> startup mountSQL> flashback database to timestamp (to_date ('2017-03-11 16:58:23 ', 'yyyy-mm-dd hh24: mi: ss '); SQL> alter database open;

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.