How to execute a custom stored procedure at Oracle startup

Source: Internet
Author: User
Use the database trigger to correspond to the startup event

Create trigger log_routine after startup on Database
Begin
Exec yourproc;
End;

Appendix:
High score for help: Why cannot I trigger the startup trigger?
When I create a startup trigger, I just don't execute it. Who can help me? It's crazy.

Create Table Test (A varchar2 (50 ));

Create or replace trigger tri_temp after startup on Database
Begin
Insert into test (a) values ('OK ');
Commit;
End tri_temp;
/

thank you. I have done it. It is because the commit is written.
Create or replace trigger tri_temp after startup on database
begin
insert into test (a) values ('OK');
-- commit; -- remove commit. It's okay, TMD.
end tri_temp;
/
deploy the post immediately and add points.

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.