Home » SQL & PL/SQL » SQL & PL/SQL » How to recover a trigger
How to recover a trigger [message #247615] Tue, 26 June 2007 09:57 Go to next message
shaseeb
Messages: 113
Registered: April 2007
Location: Madison, WI
Senior Member
Hi,

I dropped a trigger by mistake. How can I recover it? I don't have RMAN running, only exports. I am running Oracle 10g on Win. Will flashback work?

Thanks.
Re: How to recover a trigger [message #247617 is a reply to message #247615] Tue, 26 June 2007 09:59 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Not anymore, probably.

You should be able to retrieve it from your source code repository..
Re: How to recover a trigger [message #247622 is a reply to message #247615] Tue, 26 June 2007 10:10 Go to previous messageGo to next message
shaseeb
Messages: 113
Registered: April 2007
Location: Madison, WI
Senior Member
Where is the source code repository?
Re: How to recover a trigger [message #247625 is a reply to message #247615] Tue, 26 June 2007 10:26 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Try flashback query on sys.trigger$; maybe it is still in your undo segments.

Regards
Michel
Re: How to recover a trigger [message #247642 is a reply to message #247615] Tue, 26 June 2007 11:21 Go to previous messageGo to next message
shaseeb
Messages: 113
Registered: April 2007
Location: Madison, WI
Senior Member
I got it by doing an import and getting the DDL for the trigger by using the SHOW=y parameter.

Thank you
Re: How to recover a trigger [message #247646 is a reply to message #247642] Tue, 26 June 2007 11:35 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Now save all your source somewhere.

Regards
Michel
Re: How to recover a trigger [message #247651 is a reply to message #247615] Tue, 26 June 2007 12:14 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
And once you save it you will have a source code repository
Re: How to recover a trigger [message #247657 is a reply to message #247615] Tue, 26 June 2007 12:39 Go to previous messageGo to next message
shaseeb
Messages: 113
Registered: April 2007
Location: Madison, WI
Senior Member
Gotcha!

Thanks everyone
Re: How to recover a trigger [message #247667 is a reply to message #247657] Tue, 26 June 2007 13:34 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Oracle XE 10g has a recycle bin. If you dropped the table having the trigger - then you could get it back that way. TOAD is one way to access the recycle bin.
Previous Topic: Deadlock on delete from same table
Next Topic: ORA-01008 Error
Goto Forum:
  


Current Time: Sun Dec 11 04:18:19 CST 2016

Total time taken to generate the page: 0.17409 seconds