Showing posts with label Oracle 11g. Show all posts
Showing posts with label Oracle 11g. Show all posts

Tuesday, 13 October 2015

Enable Scheduler Job Execution - Oracle 11g

A tester approached me today to enable job execution on a reporting database.
I knew what to do but couldn't navigate the package easily so I thought I should share... Oracle provides the dbms_scheduler package for achieving this.

Run scipt below on the oracle server to enable jobs.

exec  dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED','FALSE');

To disable you can run

exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED','TRUE');

However, If you are you are using dbms_jobs you can enbale job execution by setting job_queue_processes parameter to a value higher than zero.

Do keep in mind the TRUE/FALSE paradox here, as it might be a little confusing.


Hope this helps!

Kehinde.

ASM Disks Permissions (HP-UX)

On a fateful day permissions of ASM disks in a production database were changed after the system administrator added new disks on the server. The process of adding the new disks led to all the disk permissions changing to bin:sys. Because I did not set up the database, I did not know the correct ownership/permissions for the disks and had to do some permutations before eventually getting it right.
In such a situation this command kfod disks=all would come in handy. It would run with both ASM and database instance down. See sample output below;

testsvr:/home/grid$kfod disks=all

--------------------------------------------------
Disk    Size   Path               User   Group
======= ====== ================== ====== =========
1:      1024Mb /dev/rdisk/disk10  grid   asmadmin
2:      1024Mb /dev/rdisk/disk15  grid   asmadmin
3:      2622Mb /dev/rdisk/disk11  grid   asmadmin
4:      2560Mb /dev/rdisk/disk12  grid   asmadmin
--------------------------------------------------
ORACLE_SID ORACLE_HOME

==================================================

For system administrators presenting new disks during which they might be installing new devices they should use "insf –ed" instead of "insf –e". The latter command usually resets the permission/ownership of all the disks.


Hope this helps!

Kehinde.