What is an Oracle Service

Oracle services were a feature introduced in Oracle 10g. Their function is to simplify workload management by allowing you to group applications that share traits such as thresholds, priorities and attributes.

The Oracle database is presented as a service and so you always have at least one service running. It is good practice to create at least one more service for application workloads and not to use the default Oracle service as it cannot by changed and will always allow connections.

One instance of a RAC database can support multiplke services and one service can spoan multiple instances. One service can support many applications, one or even a subset of one appliation.

You can create a service to accommodate batch users and another to deal with online users. Alternatively, you could assign a service to handle a particular application, application type or parts of an application etc.

It is recommended that you use a service to connect applications to the database and you do this by specifying the service name in the application’s connection string.

The resource manager is tightly integrated with services and you can control how and when services can run in an instance with it. It also allows scheduler jobs to tun as a service which allows you greater flexibility about how and when they run.






Using files on a shared drive as disks for ASM (on RedHat Linux)

Firstly, you need to create files padded to the required disk size. So if you want 4 1Gb files you could execute the below commands on shared storage:

dd if=/dev/zero of=/SHAREDDISK/asmDisk1-1 bs=1024k count=1000

dd if=/dev/zero of=/SHAREDDISK/asmDisk1-2 bs=1024k count=1000

dd if=/dev/zero of=/SHAREDDISK/asmDisk1-3 bs=1024k count=1000

dd if=/dev/zero of=/SHAREDDISK/asmDisk1-4 bs=1024k count=1000

dd creates your file, ‘if’=/dev/zero gets null characters to populate the file with. ‘of=’ is the name of the file to create.

‘bs=1024k count=1000’ specifies the file size. This is 1000 times a 1024k byte size.


Next, you need your nodes to recognize your new files as a disk or device and you do this by attaching a loopback adapter:

On BOTH nodes

create a loopback to represent a disk

/sbin/losetup /dev/loop1 /SHAREDDISK/asmDisk1-1

/sbin/losetup /dev/loop2 /SHAREDDISK/asmDisk1-2

/sbin/losetup /dev/loop3 /SHAREDDISK/asmDisk1-3

/sbin/losetup /dev/loop4 /SHAREDDISK/asmDisk1-4

If you get a device busy message

ioctl: LOOP_SET_FD: Device or resource busy

delete the current device with:

/sbin/losetup -d /dev/loop1

And try again.


The next step is to create the actual ASM disks. This assumes that you have already installed the appropriate oracle ASM packages and kernel module.

On one node

Create your ASM disks:

 oracleasm createdisk DISK1 /dev/loop1

oracleasm createdisk DISK2 /dev/loop2

oracleasm createdisk DISK3 /dev/loop3

oracleasm createdisk DISK4 /dev/loop4

On both nodes:

oracleasm scandisks

oracleasm listdisks


Lastly, put the following lines into /etc/rc.local on both nodes so that the disks come back after a reboot.

/sbin/losetup /dev/loop1 /SHAREDDISK/asmDisk1-1

/sbin/losetup /dev/loop2 /SHAREDDISK/asmDisk1-2

/sbin/losetup /dev/loop3 /SHAREDDISK/asmDisk1-3

/sbin/losetup /dev/loop4 /SHAREDDISK/asmDisk1-4

oracleasm createdisk DISK1 /dev/loop1

oracleasm createdisk DISK2 /dev/loop2

oracleasm createdisk DISK3 /dev/loop3

oracleasm createdisk DISK4 /dev/loop4

/usr/sbin/oracleasm scandisks


This is because, at the point when scandisks is ran normally, your new disks will not be mounted so you need to force it to be done later.

Your new ASM disks should now be visible on all of your nodes.

Error PRVF-5472 during an Oracle Grid infrastructure install

This is a problem with the config of the NTP daemon (ntpd) which synchronizes time across the cluster.
The specific error is to do with the boot time behavior of the daemon and needing the ‘Slewing’ option enabled.

If you need to enable slewing, you can do it by typing ‘ntpd -x’, however, the grid installer requires it to be set up to start like that at boot time.
Again, this is an easy change:

vi /etc/sysconfig/ntpd

Alter the line:
OPTIONS=”-u ntp:ntp -p /var/run/ntpd.pid”
OPTIONS=”-x -u ntp:ntp -p /var/run/ntpd.pid”

# Drop root to id ‘ntp:ntp’ by default.
OPTIONS=”-x -u ntp:ntp -p /var/run/ntpd.pid”

# Set to ‘yes’ to sync hw clock after successful ntpdate

# Additional options for ntpdate

Then rerun the checks and that one should pass..