Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Auto run sql script when DB opens

651550Sep 10 2008 — edited Sep 10 2008
Is it possible to configure a DB so a given SQL script is run each time the database opens?

Thanks a lot in advance.
This post has been answered by 595286 on Sep 10 2008
Jump to Answer

Comments

595286
Answer
You can create an after startup trigger to run PL/SQL

Is it ok for you or do you really need to call a script stored on disk ?

http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/triggers.htm#i6061
Marked as Answer by 651550 · Sep 27 2020
347756
The trigger on system startup is a way of doing this. If you use the dbstartup and dbshutdown scripts, you could add a line in the script to execute your startup script.
Niall Litchfield
rafadc wrote:
Is it possible to configure a DB so a given SQL script is run each time the database opens?

Thanks a lot in advance.
Either include the script in a startup script for the database, dbstart on *nix you'd need to write your own on windows, or else move the code into a startup trigger.

Niall Litchfield
http://www.orawin.info/
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 8 2008
Added on Sep 10 2008
3 comments
646 views