I want to fire a query on the table on one particular time, say Sunday 12:00 P.M. Does an SQL table trigger execute this kind of stored query?

    Requires Free Membership to View

You may schedule a procedure to run at any time using the DBMS_JOB supplied package. Simply write a procedure to do what you want and then schedule it to run using the DBMS_JOB.SUBMIT procedure. Besides reading up on the DBMS_JOB package in the Oracle Supplied Packages Reference, there's a great article at: http://www.pinnaclepublishing.com/OP/OPmag.nsf/0/C31F87A073306A72852568F00065982B.

If, however, you are wanting to simply run a query (just a SELECT statement) to spool out a report to a file, then you can use your operating system's scheduling mechanisms (for instance, cron) to cause it to start a SQL*Plus session and run a script (.sql) that contains your query. A good cron overview can be found at: http://www.unixgeeks.org/security/newbie/unix/cron-1.html.

For More Information


This was first published in October 2002

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.