Oracle Database: DBMS_SCHEDULER and SQL

Test your knowledge of Oracle DBMS_SCHEDULER package for job scheduling, stored procedures, and SQL queries including views, functions, and aggregation.

20 Questions Published

Questions

Question 1 Multiple Choice (Multiple Answers)

Which two of the following statements are true?

  1. A view can be created before creating the base table
  2. A view cannot be created before creating the base table
  3. A view will become invalid if the base table's column referred to in the view is altered
  4. A view will become invalid if any column in the base table is altered
Question 2 Multiple Choice (Single Answer)

Which function can return a non-NULL value if passed a NULL argument?

  1. NULLIF
  2. LENGTH
  3. CONCAT
  4. INSTR
Question 3 Multiple Choice (Single Answer)

The following statement will raise an exception on which line?

  1. select dept_name, avg(all salary), count(*) “number of employees”
  2. where deptno = dept_no
  3. and count(*) > 5
  4. group by dept_name
Question 4 Multiple Choice (Single Answer)

Review the code segment. Which line has an error?

  1. INSERT INTO salaries VALUES (101, 23400, SYSDATE);
  2. UPDATE salaries
  3. AND effective_dt = SYSDATE
  4. There is no error
  5. WHERE empno = 333;
Question 5 Multiple Choice (Single Answer)

Which are not valid views under concept of scheduling ?

  1. All_scheduler_program_args
  2. dba_scheduler_job_run_details
  3. dba_scheduler_running_jobs
  4. dba_scheduler_program_args
  5. All the above
Question 6 Multiple Choice (Single Answer)

what is the view that provides all schedules ?

  1. all_scheduler_schedules
  2. all_scheduler_schedule
  3. all_schedule_schedules
  4. all the above
  5. None
Question 7 Multiple Choice (Single Answer)

To run a job every Tuesday at 11:24 What could use in the following ?

  1. FREQ=DAILY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
  2. FREQ=WEEKLY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
  3. FREQ=YEARLY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
  4. FREQ=YEAR; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
  5. A,B and C options
Question 8 Multiple Choice (Single Answer)

What funcion is used to kill a job scheduled in scheduler?

  1. kill
  2. kill_job
  3. stop_job
  4. stop
  5. None
Question 9 Multiple Choice (Single Answer)

which is invalid funcion of scheduler ?

  1. drop_job
  2. copy_job
  3. kill_job
  4. stop_job
  5. None
Question 10 Multiple Choice (Single Answer)

what should be program type of a program that is of 'STORED PROCEDURE' ?

  1. PLSQL_BLOCK
  2. EXECUTABLE
  3. STORED_PROCEDURE
  4. STORED_PROCEDURE_EXECUTABLE
  5. STORED_EXECUTABLE
Question 11 Multiple Choice (Single Answer)

What code modificaiton should be made to run the below code ? begin dbms_scheduler.create_job ( job_name => 'RUN_SHELL1', schedule_name => 'DEMO_SCHEDULE', job_type => 'EXECUTABLES', job_action => '/home/test/run_script.sh', enabled => true, comments => 'Run shell-script' ); end; /

  1. No change is required,job can be scheduled.
  2. Enabled option should be set to False.
  3. Job type should be changed to Executable
  4. Job type should be changed to Executable Block
  5. None
Question 12 Multiple Choice (Single Answer)

In which oracle verion scheduling concept is introduced ?

  1. Oracle 8
  2. Oracle 7
  3. Oracle 10g
  4. Oracle 9i
  5. None
Question 13 Multiple Choice (Single Answer)

what is the view that provides the job history ?

  1. all_scheduler_job_log_
  2. dba_scheduler_job_logs
  3. users_scheduler_job_log
  4. all the above
  5. None
Question 14 Multiple Choice (Single Answer)

Which package in plsql provides scheduling ?

  1. DBMS_SCHEDULER package
  2. DBMS_SCHEDULE package
  3. DBMS_JOB package
  4. Both A & C
  5. None
Question 15 Multiple Choice (Single Answer)

Which of the following are valid data dictionary views under the concept of the Oracle Scheduler (DBMS_SCHEDULER)?

  1. All_scheduler_program_args
  2. dba_scheduler_job_run_details
  3. dba_scheduler_running_jobs
  4. dba_scheduler_program_args
  5. All the above
Question 16 Multiple Choice (Single Answer)

what is the view that provides all schedules ?

  1. all_scheduler_schedules
  2. all_scheduler_schedule
  3. all_schedule_schedules
  4. all the above
  5. None
Question 17 Multiple Choice (Single Answer)

To run a job every Tuesday at 11:24 What could use in the following ?

  1. FREQ=DAILY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
  2. FREQ=WEEKLY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
  3. FREQ=YEARLY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
  4. FREQ=YEAR; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
  5. A,B and C options
Question 18 Multiple Choice (Single Answer)

What funcion is used to kill a job scheduled in scheduler?

  1. kill
  2. kill_job
  3. stop_job
  4. stop
  5. None
Question 19 Multiple Choice (Single Answer)

which is invalid funcion of scheduler ?

  1. drop_job
  2. copy_job
  3. kill_job
  4. stop_job
  5. None
Question 20 Multiple Choice (Single Answer)

what should be program type of a program that is of 'STORED PROCEDURE' ?

  1. PLSQL_BLOCK
  2. EXECUTABLE
  3. STORED_PROCEDURE
  4. STORED_PROCEDURE_EXECUTABLE
  5. STORED_EXECUTABLE