Wednesday, December 2, 2009

how to setup rac

As of Oracle 10gR2 (10.2.0.4 patch set) when RAC database is started with 'srvctl start database -d DBNAME', unfortunately, the associated database services do not startup automatially. Therefore, services must be started manually after the database startup. It could be painfull in some situations, like, when you have many databases running on RAC with daily or weekly cold backup schedule. When services are not up, clients unable to connect to the respective databsases, in case they use the service name to connect to the database.

A possible workaround is to write FAN server side callouts. You may download perl scripts, 'Start Services on Instance Up' from http://www.oracle.com/technology/sample_code/products/rac/index.html. Its a smaple perl script which can be used to as a FAN Server Side callout to start services when an instanes up event is received on the node. You need to put the scripts under $CRS_HOME/racg/usrco. The PDF contains the procedure how to deploy the scripts, setting permission and other stuff.

In 11g, When services are already started on some remote nodes, then the startup of the instance on the local node will autostart the services on it.

References:

ML 416178.1: After Srvctl Start Database, Database Services Will Not Start Up Automatically
http://www.oracle.com/technology/sample_code/products/rac/index.html

http://www.oracle.com/technology/products/database/clustering/pdf/twpracwkldmgmt.pdf

http://download-west.oracle.com/docs/cd/B19306_01/rac.102/b14197/hafeats.htm#sthref374



Happy reading,

how to setup rac by your self

Basic Requirements:
Have a PC with good configuration, at least 1GB of RAM and good amount of DISK space.

Possibility 1:
Mr. Howard J Roger at his web size DIZWELL INFORMATICS has written an excellent articel on 'Building a 10gR2 Laptop RAC on Windows'' in which he greately explained about installation and maintenance of RAC on a PC. Following link will take you the article.

http://www.dizwell.com/prod/node/25

Possibility 2:

If you feel installing Oracle RAC, VMWARE and other stuff would be little bit hectice, at least, for the biginner, then, don't worry, Oracle has a ready made solution for you.

Desktop Data Centers: Oracle-on-Linux VMware Tool Kits

Oracle, VMware, Red Hat and Novell have teamed up to provide everything you need to run a full Oracle Database 10g on Linux environment on your Windows desktop—including the operational infrastructure and step-by-step instructions on how to use Oracle Database 10g and Oracle Real Application Clusters.

Note: These kits are for evaluation and development purposes only. Oracle will not support any deployments of these packages.

Currently the test cases are available on RED HAT and NOVELL only.

http://www.oracle.com/technology/tech/linux/vmware/index.html

Good books (in my view) are:

Pro Oracle Database 10g RAC on Linux Hardcover by Julian Dyke
Oracle 10g RAC Grid, Services... Paperback by Murali Vallath
Oracle Database 10g Real Application... Paperback by K Gopalakrishnan

Blog which discuss about RAC stuff:

Mr. Kevin Closson maintain's a good blog discussing about RAC stuff. Wroth to add to favourites or book mark his blog.

http://kevinclosson.wordpress.com/

Few good articles on RAC.

Mr. Julian Dyke wrote couple of good articles on RAC. It can be downloaded from his site.

http://www.juliandyke.com/

HAVE FUN WITH RAC!!!!!

oracle 11g features

Starting in 11g, the ocrconfig command now supports manual backup option which enables you to perform ocr file backup at any time, rather than waiting for the default automatic backup (i.e. every 4 or more hrs) interval.

Using the ocrconfig -manualbackup option, you can perform the manual (binary) backup on demand.

The -showbackup option now includes auto and manual flags that you can optionally specify to view the auto/manual existing backup information.

http://download.oracle.com/docs/cd/B28359_01/rac.111/b28255/votocr.htm#i1012456


Happy Reading,

How to startup RAC database services automatically

As of Oracle 10gR2 (10.2.0.4 patch set) when RAC database is started with 'srvctl start database -d DBNAME', unfortunately, the associated database services do not startup automatially. Therefore, services must be started manually after the database startup. It could be painfull in some situations, like, when you have many databases running on RAC with daily or weekly cold backup schedule. When services are not up, clients unable to connect to the respective databsases, in case they use the service name to connect to the database.
A possible workaround is to write FAN server side callouts. You may download perl scripts, 'Start Services on Instance Up' from http://www.oracle.com/technology/sample_code/products/rac/index.html. Its a smaple perl script which can be used to as a FAN Server Side callout to start services when an instanes up event is received on the node. You need to put the scripts under $CRS_HOME/racg/usrco. The PDF contains the procedure how to deploy the scripts, setting permission and other stuff.
In 11g, When services are already started on some remote nodes, then the startup of the instance on the local node will autostart the services on it.
References:

ML 416178.1: After Srvctl Start Database, Database Services Will Not Start Up Automatically
http://www.oracle.com/technology/sample_code/products/rac/index.html
http://www.oracle.com/technology/products/database/clustering/pdf/twpracwkldmgmt.pdf
http://download-west.oracle.com/docs/cd/B19306_01/rac.102/b14197/hafeats.htm#sthref374

Happy reading,

oracle clusterware

Unlike the previous Oracle versions, beginning with Oracle 11gR2, Oracle Clusterware stack on all nodes in a cluster can be managed from any node using the following Clusterized (Cluster Aware) commands:

$ crsctl check cluster -all - to check the status of the Clusterware on all nodes
$ crsctl stop cluster -all - to stop the Oracle Clusterware stack on all nodes
$ crsctl start cluster -all - to start the Oracle Clusterware stack on all nodes

Real Application clusters on 11g

Oracle Database 11g Release 1 (11.1) New Features in Oracle Real Application Clusters
This section describes the Oracle Database 11g release 1 (11.1) features for Oracle RAC administration and deployment.
Oracle Clusterware administration content moved to a separate book
Oracle Clusterware administration is now documented in a separate book.
Oracle cloning procedures for ASM and Oracle RAC Databases
A new chapter provides step-by-step procedures for cloning Oracle Automatic Storage Management (ASM) and Oracle RAC homes to quickly extend ASM and Oracle RAC environments to additional nodes with the same configuration.
Parallel execution processes run on database instances according to service placement
Parallel execution is now aware of the service definition and automatically takes on the appropriate PARALLEL_INSTANCE_GROUPS setting, making it unnecessary to explicitly set the PARALLEL_INSTANCE_GROUPS initialization parameter for an Oracle RAC database. Thus, if you execute a SQL statement in parallel, then the default behavior is for Oracle to run the parallel processes only on the instances that offer the service that you used to connect to the database.
Extending ASM to Nodes Running Single-Instance or Oracle RAC Databases
Using the Database Configuration Assistant (DBCA), you can now add a new ASM instance to a node that is running either a single-instance database or an Oracle RAC database instance.
OCI Runtime Connection Load Balancing
OCI session pools have a new feature called Runtime Connection Load Balancing. OCI session pools are now integrated with the Oracle RAC load balancing advisory to provide load balancing at the time the application gets the connection from the session pool.
Enhanced support for XA transactions in Oracle RAC environments
An XA transaction can now span Oracle RAC instances, allowing any application that uses XA to take full advantage of the Oracle RAC environment. This feature allows the units of work performed across these Oracle RAC instances to share resources and act as a single transaction.
Automatic Database Diagnostics Monitor (ADDM) enhancements for Oracle RAC and Enterprise Manager support
ADDM has been enhanced to provide comprehensive clusterwide performance diagnostic and tuning advice. This enhanced mode of ADDM, called ADDM for Oracle Real Application Clusters, analyzes an Oracle RAC database cluster and reports on issues that are affecting the entire cluster as well as those affecting individual instances.
This feature is particularly helpful in tuning global resources such as I/O and interconnect traffic, making Oracle RAC database management easier and more precise.
In addition, Oracle Enterprise Manager supports ADDM enhancements for Oracle RAC:
ADDM database-wide analysis for Oracle RAC.
oTargeted ADDM analysis is available for several granularity levels, such as the cluster database, database instance, or for specific targets such as SQL, sessions, services, modules, actions, clients, or wait classes.
ASM preferred mirror read
This feature is useful in extended clusters where remote nodes have asymmetric access with respect to performance. This leads to better storage utilization and lower network loading.ASM in Oracle Database 10g always reads the primary copy of a mirrored extent set. In Oracle Database 11g, when you configure ASM failure groups it might be more efficient for a node to read from a failure group extent that is closest to the node, even if it is a secondary extent. You can do this by configuring preferred read failure groups.

oracle RAC

Relative to the single-instance Oracle database, Oracle RAC adds additional complexity that can become overwhelming without investment in appropriate training and management tools. While database automation makes sense for single-instance databases, it becomes even more necessary for clustered databases because of their increased complexity.

Oracle Real Application Clusters (RAC), introduced with Oracle9i, is the successor to Oracle Parallel Server. However it required an external clusterware (known as vendor clusterware like Veritas or Sun Cluster) for most of the Unix flavors (except for Linux and Windows where Oracle provided free clusterware called Cluster Ready Services or CRS). By Oracle 10g, Oracle's clusterware product was available for all operating systems. With the release of Oracle Database 10g Release 2 (10.2), Cluster Ready Services was renamed to Oracle Clusterware. When using Oracle 10g or higher, Oracle Clusterware is the only clusterware that you need for most platforms on which Oracle RAC operates (except for Tru cluster, in which case you need vendor clusterware). You can still use clusterware from other vendors if the clusterware is certified for Oracle RAC.

In RAC the node performing the write-transaction must take ownership of the relevant area of the database: typically this involves a request across the cluster interconnection (local IP network) to transfer the data-block ownership from another node to the one wishing to do the write. This takes a relatively long time (from few milliseconds to tens of milliseconds) compared to single database-node using in-memory operations. For many types of applications, the time spent coordinating block access across systems is low relative to the many operations on the system, and RAC will scale comparably to a single system. Also, high read-transactional databases (such as data-warehousing applications) work very well under RAC, as no need for ownership-transfer exists. (Oracle 11g has made many enhancements in this area and performs a lot better than earlier versions for read-only workloads[citation needed].)

The overhead on the resource mastering (or ownership-transfer) is very minimal when you have less than three nodes, as the request for any resource in the cluster can be obtained in a maximum of three hops (owner-master-requestor). This makes Oracle RAC horizontally scalable with many nodes. Application vendors (such as SAP) use Oracle RAC to demonstrate the scalability of their application. Most of the biggest OLTP benchmarks are on Oracle RAC. Oracle RAC 11g supports up to 100 nodes[4].

For some applications, RAC may require careful application-partitioning to enhance performance. An application which scales linearly on an SMP machine may scale linearly under RAC. However, if the application cannot scale linearly on SMP, it will not scale when ported to RAC. In short the application scalability is based on how well the application scales in a single instance.