Manage Learn to apply best practices and optimize your operations.

How to set up a job for an SQL query in Oracle 10g Grid Control

Oracle expert Brian Peasland explains when and how to set up a job in Oracle to run an SQL statement.

Regarding Oracle 10g Grid Control, is there a way to run adhoc SQL within Grid without having to set up a job to execute it?
The term "adhoc" means designed for the specific purposes of that specific task at that specific time. If you want to run a SQL statement at a regular interval, then the query is not considered "adhoc".

Oracle's preferred method of running SQL statements at a regularly scheduled time is to set up a job. In Oracle 10g+, you can use the DBMS_SCHEDULER package for this task.

Alternatively, you can set up a batch program or shell script which uses SQL*Plus to run the SQL statement. Once the program or script is created, it can be scheduled with Windows task scheduler or from cron in Unix/Linux.

Dig Deeper on Oracle database administration

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.