Use Backup to restore Oracle triggers ____oracle

Source: Internet
Author: User

After the system upgrade, one of the features is not normal, colleagues want to look at the upgrade before the stored procedures. The first thought is the flashback function, unfortunately, the flashback encountered a ORA-01555 error.

SELECT * from Dba_triggers as of TIMESTAMP to_timestamp (' 2014-06-19 05:25:00 ', ' yyyy-mm-dd hh24:mi:ss ')

WHERE OWNER = ' xxx ' and trigger_name = ' tri_ins_feedback ';

Fortunately there is a daily use of EXPDP generated metadata backup.

The advantage of the meta backup is that the backup speed is faster and the space used is relatively small. The disadvantage is that there is no data.

The previous Meta-data backup has not been used, this time it is finally used, otherwise it will take a long time to copy a huge backup to the test environment.

This time, the IMPDP in Oracle is used to restore the metadata of the database to the specified SQL file. The desired trigger was found from the SQL file.

It took nearly 10 minutes to develop the demand from development to find the appropriate trigger.

The Sqlfile function in the Import command IMPDP of the Oracle data pump enables the ability to export the DDL statements to the specified file without importing the data files to the database.

IMPDP testuser/testbj directory=dpumpdir dumpfile=metadata_2014-06-18_01.dmp sqlfile=meta_expdp.sql ENCRYPTION_ Password=password

After the DDL statements are imported into the SQL file, we can search the exported files through the editor to find what we need.

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.