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
page8/9
A typeDocumentation
manual-guide.com > manual > Documentation
1   2   3   4   5   6   7   8   9

The Oracle TNS listener process should now be running on all nodes in the RAC cluster:

$ hostname

linux1
$ ps -ef | grep lsnr | grep -v 'grep' | grep -v 'ocfs' | awk '{print $9}'

LISTENER_LINUX1
=====================
$ hostname

linux2
$ ps -ef | grep lsnr | grep -v 'grep' | grep -v 'ocfs' | awk '{print $9}'

LISTENER_LINUX2



22. Create the Oracle Cluster Database

The database creation process should only be performed from one node in the cluster!

We will use the DBCA to create the clustered database.

Before executing the DBCA, make sure that $ORACLE_HOME and $PATH are set appropriately for the $ORACLE_BASE/product/10.1.0/db_1 environment.

You should also verify that all services we have installed up to this point (Oracle TNS listener, CRS processes, etc.) are running before attempting to start the clustered database creation process.

Creating the Clustered Database

To start the database creation process, run the following:

# xhost +

access control disabled, clients can connect from any host
# su - oracle

$ dbca &

Screen Name

Response

Welcome Screen

Select Oracle Real Application Clusters database.

Operations

Select Create a Database.

Node Selection

Click the Select All button to select all servers: linux1 and linux2.

Database Templates

Select Custom Database

Database Identification

Select:
   Global Database Name: orcl.idevelopment.info
   SID Prefix: orcl

I used idevelopment.info for the database domain. You may use any domain. Keep in mind that this domain does not have to be a valid DNS domain.

Management Option

Leave the default options here, which is to "Configure the Database with Enterprise Manager."

Database Credentials

I selected to Use the Same Password for All Accounts. Enter the password (twice) and make sure the password does not start with a digit number.

Storage Options

For this guide, we will select to use ASM.

Create ASM Instance

Other than supplying the SYS password I wanted to use for this instance, all other options I used were the defaults. This includes the default for all ASM parameters and then to use default parameter file (IFILE): {ORACLE_BASE}/admin/+ASM/pfile/init.ora.

You will then be prompted with a dialog box asking if you want to create and start the ASM instance. Select the OK button to acknowledge this dialog.

The OUI will now create and start the ASM instance on all nodes in the RAC cluster.

ASM Disk Groups

To start, click the Create New button. This will bring up the "Create Disk Group" window with the three volumes we configured earlier using ASMLib.

If the volumes we created earlier in this article do not show up in the "Select Member Disks" window:

ORCL:VOL1, ORCL:VOL2, and ORCL:VOL3

then click on the "Change Disk Discovery Path" button and input "ORCL:VOL*".

For the "Disk Group Name", I used the string ORCL_DATA1.

Select all of the ASM volumes in the "Select Member Disks" window. All three volumes should have a status of "PROVISIONED".

After verifying all values in this window are correct, click the OK button. This will present the "ASM Disk Group Creation" dialog.

When the ASM Disk Group Creation process is finished, you will be returned to the "ASM Disk Groups" windows. Select the checkbox next to the newly created Disk Group Name ORCL_DATA1 and click [Next] to continue.

Database File Locations

I selected to use the default, which is to use Oracle Managed Files:

Database Area: +ORCL_DATA1

Recovery Configuration

Using recovery options like Flash Recovery Area is out of scope for this article. I did not select any recovery options.

Database Content

I left all of the Database Components (and destination tablespaces) set to their default value.

Database Services

For this test configuration, click Add, and enter orcltest as the "Service Name." Leave both instances set to Preferred and for the "TAF Policy" select Basic.

Initialization Parameters

Change any parameters for your environment. I left them all at their default settings.

Database Storage

Change any parameters for your environment. I left them all at their default settings.

Creation Options

Keep the default option Create Database selected and click Finish to start the database creation process.

Click OK on the "Summary" screen.

You may receive an error message during the install.

End of Database Creation

At the end of the database creation, exit from the DBCA.

When exiting the DBCA, another dialog will come up indicating that it is starting all Oracle instances and HA service "orcltest". This may take several minutes to complete. When finished, all windows and dialog boxes will disappear.

When the DBCA has completed, you will have a fully functional Oracle RAC cluster running!

Creating the orcltest Service

During the creation of the Oracle clustered database, we added a service named orcltest that will be used to connect to the database with TAF enabled. During several of my installs, the service was added to the tnsnames.ora, but was never updated as a service for each Oracle instance.

Use the following to verify the orcltest service was successfully added:

SQL> show parameter service
NAME TYPE VALUE

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

service_names string orcl.idevelopment.info, orcltest

If the only service defined was for orcl.idevelopment.info, then you will need to manually add the service to both instances:

SQL> show parameter service
NAME TYPE VALUE

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

service_names string orcl.idevelopment.info
SQL> alter system set service_names =

2 'orcl.idevelopment.info, orcltest.idevelopment.info' scope=both;
23. Verify the TNS Networking Files

Ensure that the TNS networking files are configured on all nodes in the cluster!

listener.ora

We already covered how to create a TNS listener configuration file (listener.ora) for a clustered environment in Section 21. The listener.ora file should be properly configured and no modifications should be needed.

For clarity, I have included a copy of the listener.ora file from my node linux1 in this guide's support files. I've also included a copy of my tnsnames.ora file that was configured by Oracle and can be used for testing the Transparent Application Failover (TAF). This file should already be configured on each node in the RAC cluster.

You can include any of these entries on other client machines that need access to the clustered database.

Connecting to Clustered Database From an External Client

This is an optional step, but I like to perform it in order to verify my TNS files are configured correctly. Use another machine (i.e. a Windows machine connected to the network) that has Oracle installed (either 9i or 10g) and add the TNS entries (in the tnsnames.ora) from either of the nodes in the cluster that were created for the clustered database.

Then try to connect to the clustered database using all available service names defined in the tnsnames.ora file:

C:\> sqlplus system/manager@orcl2

C:\> sqlplus system/manager@orcl1

C:\> sqlplus system/manager@orcltest

C:\> sqlplus system/manager@orcl
24. Creating/Altering Tablespaces

When creating the clustered database, we left all tablespaces set to their default size. If you are using a large drive for the shared storage, you may want to make a sizable testing database.

Below are several optional SQL commands for modifying and creating all tablespaces for the test database. Please keep in mind that the database file names (OMF files) used in this example may differ from what Oracle creates for your environment.

$ sqlplus "/ as sysdba"
SQL> create user scott identified by tiger default tablespace users;

SQL> grant dba, resource, connect to scott;
SQL> alter database datafile '+ORCL_DATA1/orcl/datafile/users.264.1' resize 1024m;

SQL> alter tablespace users add datafile '+ORCL_DATA1' size 1024m autoextend off;
SQL> create tablespace indx datafile '+ORCL_DATA1' size 1024m

2 autoextend on next 50m maxsize unlimited

3 extent management local autoallocate

4 segment space management auto;
SQL> alter database datafile '+ORCL_DATA1/orcl/datafile/system.259.1' resize 800m;
SQL> alter database datafile '+ORCL_DATA1/orcl/datafile/sysaux.261.1' resize 500m;
SQL> alter tablespace undotbs1 add datafile '+ORCL_DATA1' size 1024m

2 autoextend on next 50m maxsize 2048m;
SQL> alter tablespace undotbs2 add datafile '+ORCL_DATA1' size 1024m

2 autoextend on next 50m maxsize 2048m;
SQL> alter database tempfile '+ORCL_DATA1/orcl/tempfile/temp.262.1' resize 1024m;

Here is a snapshot of the tablespaces I have defined for my test database environment:

Status Tablespace Name TS Type Ext. Mgt. Seg. Mgt. Tablespace Size Used (in bytes) Pct. Used

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

ONLINE INDX PERMANENT LOCAL AUTO 1,073,741,824 65,536 0

ONLINE SYSAUX PERMANENT LOCAL AUTO 524,288,000 227,803,136 43

ONLINE SYSTEM PERMANENT LOCAL MANUAL 838,860,800 449,380,352 54

ONLINE UNDOTBS1 UNDO LOCAL MANUAL 1,283,457,024 184,745,984 14

ONLINE UNDOTBS2 UNDO LOCAL MANUAL 1,283,457,024 4,194,304 0

ONLINE USERS PERMANENT LOCAL AUTO 2,147,483,648 131,072 0

ONLINE TEMP TEMPORARY LOCAL MANUAL 1,073,741,824 22,020,096 2

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

avg 16

sum 8,225,030,144 888,340,480
7 rows selected.
25. Verify the RAC Cluster/Database Configuration

The following RAC verification checks should be performed on all nodes in the cluster! For this guide, we will perform these checks only from linux1.

This section provides several srvctl commands and SQL queries you can use to validate your Oracle RAC 10g configuration.

There are five node-level tasks defined for SRVCTL:

  • Adding and deleting node-level applications

  • Setting and unsetting the environment for node-level applications

  • Administering node applications

  • Administering ASM instances

  • Starting and stopping a group of programs that includes virtual IP addresses, listeners, Oracle Notification Services, and Oracle Enterprise Manager agents (for maintenance purposes).

Status of all instances and services

$ srvctl status database -d orcl

Instance orcl1 is running on node linux1

Instance orcl2 is running on node linux2

Status of a single instance

$ srvctl status instance -d orcl -i orcl2

Instance orcl2 is running on node linux2

Status of a named service globally across the database

$ srvctl status service -d orcl -s orcltest

Service orcltest is running on instance(s) orcl2, orcl1

Status of node applications on a particular node

$ srvctl status nodeapps -n linux1

VIP is running on node: linux1

GSD is running on node: linux1

Listener is running on node: linux1

ONS daemon is running on node: linux1

Status of an ASM instance

$ srvctl status asm -n linux1

ASM instance +ASM1 is running on node linux1.

List all configured databases

$ srvctl config database

orcl

Display configuration for our RAC database

$ srvctl config database -d orcl

linux1 orcl1 /u01/app/oracle/product/10.1.0/db_1

linux2 orcl2 /u01/app/oracle/product/10.1.0/db_1

Display all services for the specified cluster database

$ srvctl config service -d orcl

orcltest PREF: orcl2 orcl1 AVAIL:

Display the configuration for node applications - (VIP, GSD, ONS, Listener)

$ srvctl config nodeapps -n linux1 -a -g -s -l

VIP exists.: /vip-linux1/192.168.1.200/255.255.255.0/eth0:eth1

GSD exists.

ONS daemon exists.

Listener exists.

Display the configuration for the ASM instance(s)

$ srvctl config asm -n linux1

+ASM1 /u01/app/oracle/product/10.1.0/db_1
All running instances in the cluster

SELECT

inst_id

, instance_number inst_no

, instance_name inst_name

, parallel

, status

, database_status db_status

, active_state state

, host_name host

FROM gv$instance

ORDER BY inst_id;
INST_ID INST_NO INST_NAME PAR STATUS DB_STATUS STATE HOST

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

1 1 orcl1 YES OPEN ACTIVE NORMAL linux1

2 2 orcl2 YES OPEN ACTIVE NORMAL linux2

All data files which are in the disk group

select name from v$datafile

union

select member from v$logfile

union

select name from v$controlfile

union

select name from v$tempfile;
NAME

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

+ORCL_DATA1/orcl/controlfile/current.256.1

+ORCL_DATA1/orcl/datafile/indx.269.1

+ORCL_DATA1/orcl/datafile/sysaux.261.1

+ORCL_DATA1/orcl/datafile/system.259.1

+ORCL_DATA1/orcl/datafile/undotbs1.260.1

+ORCL_DATA1/orcl/datafile/undotbs1.270.1

+ORCL_DATA1/orcl/datafile/undotbs2.263.1

+ORCL_DATA1/orcl/datafile/undotbs2.271.1

+ORCL_DATA1/orcl/datafile/users.264.1

+ORCL_DATA1/orcl/datafile/users.268.1

+ORCL_DATA1/orcl/onlinelog/group_1.257.1

+ORCL_DATA1/orcl/onlinelog/group_2.258.1

+ORCL_DATA1/orcl/onlinelog/group_3.265.1

+ORCL_DATA1/orcl/onlinelog/group_4.266.1

+ORCL_DATA1/orcl/tempfile/temp.262.1
15 rows selected.
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