Learn how to set up and configure an Oracle rac 10




Download 0.57 Mb.
NameLearn how to set up and configure an Oracle rac 10
page9/9
A typeDocumentation
manual-guide.com > manual > Documentation
1   2   3   4   5   6   7   8   9

All ASM disk that belong to the 'ORCL_DATA1' disk group

SELECT path

FROM v$asm_disk

WHERE group_number IN (select group_number

from v$asm_diskgroup

where name = 'ORCL_DATA1');


PATH

----------------------------------

ORCL:VOL1

ORCL:VOL2

ORCL:VOL3
26. Starting & Stopping the Cluster

At this point, we've installed and configured Oracle RAC 10g entirely and have a fully functional clustered database.

After all the work done up to this point, you may well ask, "OK, so how do I start and stop services?" If you have followed the instructions in this guide, all services—including CRS, all Oracle instances, Enterprise Manager Database Console, and so on—should start automatically on each reboot of the Linux nodes.

There are times, however, when you might want to shut down a node and manually start it back up. Or you may find that Enterprise Manager is not running and need to start it. This section provides the commands (using SRVCTL) responsible for starting and stopping the cluster environment.

Ensure that you are logged in as the oracle UNIX user. We will runn all commands in this section from linux1:

# su - oracle
$ hostname

linux1

Stopping the Oracle RAC 10g Environment

The first step is to stop the Oracle instance. When the instance (and related services) is down, then bring down the ASM instance. Finally, shut down the node applications (Virtual IP, GSD, TNS Listener, and ONS).

$ export ORACLE_SID=orcl1

$ emctl stop dbconsole

$ srvctl stop instance -d orcl -i orcl1

$ srvctl stop asm -n linux1

$ srvctl stop nodeapps -n linux1

Starting the Oracle RAC 10g Environment

The first step is to start the node applications (Virtual IP, GSD, TNS Listener, and ONS). When the node applications are successfully started, then bring up the ASM instance. Finally, bring up the Oracle instance (and related services) and the Enterprise Manager Database console.

$ export ORACLE_SID=orcl1

$ srvctl start nodeapps -n linux1

$ srvctl start asm -n linux1

$ srvctl start instance -d orcl -i orcl1

$ emctl start dbconsole

Start/Stop All Instances with SRVCTL

Start/stop all the instances and their enabled services. I have included this step just for fun as a way to bring down all instances!

$ srvctl start database -d orcl
$ srvctl stop database -d orcl
27. Managing Transparent Application Failover

It is not uncommon for businesses to demand 99.99% (or even 99.999%) availability for their enterprise applications. Think about what it would take to ensure a downtime of no more than .5 hours or even no downtime during the year. To answer many of these high-availability requirements, businesses are investing in mechanisms that provide for automatic failover when one participating system fails. When considering the availability of the Oracle database, Oracle RAC 10g provides a superior solution with its advanced failover mechanisms. Oracle RAC 10g includes the required components that all work within a clustered configuration responsible for providing continuous availability; when one of the participating systems fail within the cluster, the users are automatically migrated to the other available systems.

A major component of Oracle RAC 10g that is responsible for failover processing is the Transparent Application Failover (TAF) option. All database connections (and processes) that lose connections are reconnected to another node within the cluster. The failover is completely transparent to the user.

This final section provides a short demonstration on how TAF works in Oracle RAC 10g. Please note that a complete discussion of failover in Oracle RAC 10g would require an article in itself; my intention here is to present only a brief overview.

One important note is that TAF happens automatically within the OCI libraries. Thus your application (client) code does not need to change in order to take advantage of TAF. Certain configuration steps, however, will need to be done on the Oracle TNS file tnsnames.ora. (Keep in mind that as of this writing, the Java thin client will not be able to participate in TAF because it never reads tnsnames.ora.)

Setup the tnsnames.ora File

Before demonstrating TAF, we need to verify that a valid entry exists in the tnsnames.ora file on a non-RAC client machine (if you have a Windows machine lying around). Ensure that you have the Oracle RDBMS software installed. (Actually, you only need a client install of the Oracle software.)

During the creation of the clustered database in this guide, we created a new service that will be used for testing TAF named ORCLTEST. It provides all the necessary configuration parameters for load balancing and failover. You can copy the contents of this entry to the %ORACLE_HOME%\network\admin\tnsnames.ora file on the client machine (my Windows laptop is being used in this example) in order to connect to the new Oracle clustered database:

...

ORCLTEST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = vip-linux1)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = vip-linux2)(PORT = 1521))

(LOAD_BALANCE = yes)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcltest.idevelopment.info)

(FAILOVER_MODE =

(TYPE = SELECT)

(METHOD = BASIC)

(RETRIES = 180)

(DELAY = 5)

)

)

)

...

SQL Query to Check the Session's Failover Information

The following SQL query can be used to check a session's failover type, failover method, and if a failover has occurred. We will be using this query throughout this example.

COLUMN instance_name FORMAT a13

COLUMN host_name FORMAT a9

COLUMN failover_method FORMAT a15

COLUMN failed_over FORMAT a11
SELECT

instance_name

, host_name

, NULL AS failover_type

, NULL AS failover_method

, NULL AS failed_over

FROM v$instance

UNION

SELECT

NULL

, NULL

, failover_type

, failover_method

, failed_over

FROM v$session

WHERE username = 'SYSTEM';

TAF Demo

From a Windows machine (or other non-RAC client machine), login to the clustered database using the orcltest service as the SYSTEM user:

C:\> sqlplus system/manager@orcltest
COLUMN instance_name FORMAT a13

COLUMN host_name FORMAT a9

COLUMN failover_method FORMAT a15

COLUMN failed_over FORMAT a11
SELECT

instance_name

, host_name

, NULL AS failover_type

, NULL AS failover_method

, NULL AS failed_over

FROM v$instance

UNION

SELECT

NULL

, NULL

, failover_type

, failover_method

, failed_over

FROM v$session

WHERE username = 'SYSTEM';

INSTANCE_NAME HOST_NAME FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER

------------- --------- ------------- --------------- -----------

orcl1 linux1

SELECT BASIC NO

DO NOT logout of the above SQL*Plus session!

Now that we have run the query (above), we should now shutdown the instance orcl1 on linux1 using the abort option. To perform this operation, we can use the srvctl command-line utility as follows:

# su - oracle

$ srvctl status database -d orcl

Instance orcl1 is running on node linux1

Instance orcl2 is running on node linux2
$ srvctl stop instance -d orcl -i orcl1 -o abort
$ srvctl status database -d orcl

Instance orcl1 is not running on node linux1

Instance orcl2 is running on node linux2

Now let's go back to our SQL session and rerun the SQL statement in the buffer:

COLUMN instance_name FORMAT a13

COLUMN host_name FORMAT a9

COLUMN failover_method FORMAT a15

COLUMN failed_over FORMAT a11
SELECT

instance_name

, host_name

, NULL AS failover_type

, NULL AS failover_method

, NULL AS failed_over

FROM v$instance

UNION

SELECT

NULL

, NULL

, failover_type

, failover_method

, failed_over

FROM v$session

WHERE username = 'SYSTEM';
INSTANCE_NAME HOST_NAME FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER

------------- --------- ------------- --------------- -----------

orcl2 linux2

SELECT BASIC YES
SQL> exit

From the above demonstration, we can see that the above session has now been failed over to instance orcl2 on linux2.

28. Conclusion

Ideally this guide has provided an economical solution to setting up and configuring an inexpensive Oracle RAC 10g cluster using White Box Enterprise Linux (or Red Hat Enterprise Linux 3) and FireWire technology. The RAC solution presented here can be put together for around US$1,800 and will provide the DBA with a fully functional development Oracle RAC cluster.

Remember, although this solution should be stable enough for testing and development, it should never be considered for a production environment.

29. Acknowledgements

An article of this magnitude and complexity is generally not the work of one person alone. Although I was able to author and successfully demonstrate the validity of the components that make up this configuration, there are several other individuals that deserve credit in making this article a success.

First, I would like to thank Werner Puschitz for his outstanding work on "Installing Oracle Database 10g with Real Application Clusters (RAC) on Red Hat Enterprise Linux Advanced Server 3." This article, along with several others he has authored, provided information on Oracle RAC 10g that could not be found in any other Oracle documentation. Without his hard work and research into issues like configuring and installing the hangcheck-timer kernel module, properly configuring Unix shared memory, and configuring ASMLib, this guide may have never come to fruition. If you are interested in examining technical articles on Linux internals and in-depth Oracle configurations written by Werner Puschitz, please visit his excellent website at www.puschitz.com.

Next I would like to thank Wim Coekaerts, Manish Singh, and the entire team at Oracle's Linux Projects Development Group. The professionals in this group made the job of upgrading the Linux kernel to support IEEE1394 devices with multiple logins (and several other significant modifications) a seamless task. The group provides a pre-compiled kernel for Red Hat Enterprise Linux 3.0 (which also works with White Box Enterprise Linux) along with many other useful tools and documentation at oss.oracle.com.

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

Jeffrey Hunter (www.idevelopment.info) has been a senior DBA and software engineer for over 11 years. He is an Oracle Certified Professional, Java Development Certified Professional, and author and currently works for The DBA Zone, Inc.. Jeff's work includes advanced performance tuning, Java programming, capacity planning, database security, and physical/logical database design in Unix, Linux, and Windows NT environments. Jeff's other interests include mathematical encryption theory, programming language processors (compilers and interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux.




1   2   3   4   5   6   7   8   9

Related:

Learn how to set up and configure an Oracle rac 10 iconSet call options When you first sign in to Lync, you’ll be guided...

Learn how to set up and configure an Oracle rac 10 iconObjectives In this episode you will: Learn about adverbs of frequency....

Learn how to set up and configure an Oracle rac 10 iconPartners in 17 Categories Recognized at Oracle OpenWorld for Excellence...

Learn how to set up and configure an Oracle rac 10 iconFull life cycle development, implementation and support with expertise...

Learn how to set up and configure an Oracle rac 10 iconIdc white Paper sponsored by Oracle Corporation, "Oracle e-business...

Learn how to set up and configure an Oracle rac 10 iconOracle® e-business Suite, Siebel crm, PeopleSoft Enterprise and jd...

Learn how to set up and configure an Oracle rac 10 iconPhp version: 17 set foreign key checks=0; set sql mode="no auto value...

Learn how to set up and configure an Oracle rac 10 iconThe student will learn about reading instruction from birth to secondary...

Learn how to set up and configure an Oracle rac 10 iconDG102sh console Command Set(set coding, set h323, and show)

Learn how to set up and configure an Oracle rac 10 iconResearch into an Intermediate Accounting level practice set was conducted....

Learn how to set up and configure an Oracle rac 10 iconAbstract This integration is a part of Siebel Integrations between...

Learn how to set up and configure an Oracle rac 10 iconTo set up the fw-1884 in Cubase or Nuendo 3 To set up the fw-1884 in Mackie Emulation protocol 3

Learn how to set up and configure an Oracle rac 10 iconDownload and installation: Configure the initial scan

Learn how to set up and configure an Oracle rac 10 iconHow to configure timeGuardian/QuickBooks for direct integration

Learn how to set up and configure an Oracle rac 10 iconConfigure the cics environment for the Debug Tool

Learn how to set up and configure an Oracle rac 10 iconPart 2: Configure ssh access to the Switches

Learn how to set up and configure an Oracle rac 10 iconOracle® SuperCluster T5-8

Learn how to set up and configure an Oracle rac 10 iconOracle® SuperCluster M6-32

Learn how to set up and configure an Oracle rac 10 iconMacBook-Pro-de-Martin-Ortuno: libusb 9 martinortuno$./configure

Learn how to set up and configure an Oracle rac 10 iconLearning to drive -how do you want to learn?




manual




When copying material provide a link © 2017
contacts
manual-guide.com
search