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.
Questions
Which two of the following statements are true?
- A view can be created before creating the base table
- A view cannot be created before creating the base table
- A view will become invalid if the base table's column referred to in the view is altered
- A view will become invalid if any column in the base table is altered
Which function can return a non-NULL value if passed a NULL argument?
- NULLIF
- LENGTH
- CONCAT
- INSTR
The following statement will raise an exception on which line?
- select dept_name, avg(all salary), count(*) “number of employees”
- where deptno = dept_no
- and count(*) > 5
- group by dept_name
Review the code segment. Which line has an error?
- INSERT INTO salaries VALUES (101, 23400, SYSDATE);
- UPDATE salaries
- AND effective_dt = SYSDATE
- There is no error
- WHERE empno = 333;
Which are not valid views under concept of scheduling ?
- All_scheduler_program_args
- dba_scheduler_job_run_details
- dba_scheduler_running_jobs
- dba_scheduler_program_args
- All the above
what is the view that provides all schedules ?
- all_scheduler_schedules
- all_scheduler_schedule
- all_schedule_schedules
- all the above
- None
To run a job every Tuesday at 11:24 What could use in the following ?
- FREQ=DAILY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
- FREQ=WEEKLY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
- FREQ=YEARLY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
- FREQ=YEAR; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
- A,B and C options
What funcion is used to kill a job scheduled in scheduler?
- kill
- kill_job
- stop_job
- stop
- None
which is invalid funcion of scheduler ?
- drop_job
- copy_job
- kill_job
- stop_job
- None
what should be program type of a program that is of 'STORED PROCEDURE' ?
- PLSQL_BLOCK
- EXECUTABLE
- STORED_PROCEDURE
- STORED_PROCEDURE_EXECUTABLE
- STORED_EXECUTABLE
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; /
- No change is required,job can be scheduled.
- Enabled option should be set to False.
- Job type should be changed to Executable
- Job type should be changed to Executable Block
- None
In which oracle verion scheduling concept is introduced ?
- Oracle 8
- Oracle 7
- Oracle 10g
- Oracle 9i
- None
what is the view that provides the job history ?
- all_scheduler_job_log_
- dba_scheduler_job_logs
- users_scheduler_job_log
- all the above
- None
Which package in plsql provides scheduling ?
- DBMS_SCHEDULER package
- DBMS_SCHEDULE package
- DBMS_JOB package
- Both A & C
- None
Which of the following are valid data dictionary views under the concept of the Oracle Scheduler (DBMS_SCHEDULER)?
- All_scheduler_program_args
- dba_scheduler_job_run_details
- dba_scheduler_running_jobs
- dba_scheduler_program_args
- All the above
what is the view that provides all schedules ?
- all_scheduler_schedules
- all_scheduler_schedule
- all_schedule_schedules
- all the above
- None
To run a job every Tuesday at 11:24 What could use in the following ?
- FREQ=DAILY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
- FREQ=WEEKLY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
- FREQ=YEARLY; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
- FREQ=YEAR; BYDAY=TUE; BYHOUR=11; BYMINUTE=24;
- A,B and C options
What funcion is used to kill a job scheduled in scheduler?
- kill
- kill_job
- stop_job
- stop
- None
which is invalid funcion of scheduler ?
- drop_job
- copy_job
- kill_job
- stop_job
- None
what should be program type of a program that is of 'STORED PROCEDURE' ?
- PLSQL_BLOCK
- EXECUTABLE
- STORED_PROCEDURE
- STORED_PROCEDURE_EXECUTABLE
- STORED_EXECUTABLE