Oracle RAC is a cluster database with a shared cache architecture that overcomes the limitations of traditional shared-nothing and shared-disk approaches to provide highly scalable and available database solutions for business applications.

The evolution of RAC can be tracked back from Oracle 7, where it was called Oracle Parallel Server (OPS). But it was in Oracle 9i that RAC was introduced. It was not merely a name change from Oracle 7 to Oracle 9i. Oracle has changed almost everything. RAC supports even direct sharing of Oracle database blocks between two or more database instances. This sharing is the major change that can be tracked from OPS. In OPS blocks where not directly shared leaving one instance notifies another instance of a required database block and wait till the other instance hand overs the same after it has been written its content to the disk. This wait is totally absent in the new RAC design.What is OPS and its architecture?

Oracle has had the functionality to handle parallel servers since Version 7 with the help of OPS. OPS is a technique whereby multiple Oracle database instances share a single set of database files. In the architecture of OPS only a single instance was allowed to modify a block at any given point of time. An instance in order to write to a block uses a technique called block pinging.Each OPS instance creates locks in their own distributed lock area to manage consistency between multiple instances, which are called Parallel Cache Management (PCM) locks.

The responsibility of a PCM lock is to ensure that the instance reading a block gets a consistent image of the data in the block. An instance must acquire a PCM lock on a block before reading/modifying data in the block. When a block is requesting for a block and that block is currently being locked by another instance, then the holding instance must write the block back to disk before the requesting instance can read or edit the block. This way consistency is maintained.

Thus OPS would allow multiple Oracle instances to use same database, which will allow scalability to expand by simple addition of a server. Performance issues can be solved easily with this kind of architecture. But the performance of OPS was not up to the mark. It even required application level changes, functional data partitioning to prove it works.

What does RAC offer other than OPS?

With the advent of high speed interconnectivity Oracle now uses memory to memory transfer of data blocks at high speed (thanks to technology) which completely rubs out the use of disk as a transfer mechanism.

The major benefits of RAC are many, like Scalability, High availability, Transparency. Scalability is achieved through introduction of multiple RAC nodes to increase performance. High availability is meant by the process of one node talking over the load of other when it fails. By Transparency, Oracle server provides full transparency to underlying mechanisms from applications.

If you are unable to compile your reports or plls in Oracle 10g Version, due to the error like

PL SQL ERROR 201: SRW.___ must be declared, then check the existence of the following file and its privilege:

rwrun.jar in /Oracle10gAS/reports/jlib folder.

Where Oracle10gAS is the folder where 10g Application server is installed.

You will normally get this error only in UNIX/Linux flavors, because this is related to privilege rights. If you are getting this error in Windows also, then it is quietly possible that the file is missing.

Why did this happen? For experienced Oracle campaigners it is well known that _ is a wild card character. That is _ stands for any character. So your query yielded all the rows, which you did not want.

Now we modify the query to get the desired output as below:

Code:

select FIELD_100 from TABLE_100 where FIELD_100 like '%#_%' escape '#';

Now the output is as below:

Code:

FIELD_100 ------------ sample_data not_applicable

This is what you exactly wanted. There is no restriction to only use # character. You can use any character, including _ character.

Disclaimer

This blog contains things about technology that I jot about, keep for my records. Some articles in this blog are not owned by me. They are for my reference only. In older posts the original links may not be there, its not intentional. Thanks for understanding.