Assuming today is Monday, how would you use the DBMS_JOB
package to schedule the execution of a given procedure owned
by SCOTT to start Wednesday at 9AM and to run subsequently
every other day at 2AM.



Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a giv..

Answer / Rahul Shastri

To schedule the execution of a given procedure owned by SCOTT using DBMS_JOB, you can use the following PL/SQL block:

```plsql
DECLARE
job_number NUMBER;
BEGIN
dbms_job.submit(
job_name => 'SCOTT_PROC',
job_type => 'PL/SQL PROGRAM',
job_action => 'BEGIN SCOTT.PROCEDURE_NAME; END;',
start_date => TO_DATE('2022-03-02 09:00:00', 'YYYY-MM-DD HH24:MI:SS'),
repeat_interval => 'FREQ=DAILY; BYHOUR=48; BYMINUTE=0',
number => job_number
);
END;
```

Replace PROCEDURE_NAME with the name of the procedure you want to schedule.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB Administration Interview Questions

What are statistics, under what circumstances they go out of date, how do you update them?

1 Answers  


How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?

1 Answers  


How do you trace the traffic hitting a sql server? : sql server DBA

1 Answers  


how can you find out if a table can be redefined?

1 Answers   Oracle,


how can you enable flashback feature?

1 Answers   Oracle,


Why does Oracle not permit the use of PCTUSED with indexes?

1 Answers  


Draft one mock email requesting your non-technical management grant you downtime to (provide justification where applicable) complete the following tasks: (1) Generate statistics on a large table; (2) Generate an RDA – if you don't know what an RDA is please say so. (3) Rename datafiles.

1 Answers  


what is a crs resource?

1 Answers   Oracle,


wat is global index and local indes

1 Answers   Oracle,


Should you place Recovery Catalog in the Same DB? . Can you use RMAN without Recovery catalog

4 Answers  


What are the different authentication modes in sql server and how can you change authentication mode? : sql server DBA

1 Answers  


Is it possible to run 32 bit sql server 2000 on64bit windows platform.if how much memory is available to sql server?

1 Answers  


Categories