d-h-n.de
Blog about Oracle, Linux..

net service name, connect descriptor

June 28th, 2008 . by admin

net service name, connect descriptor in tnsnames.ora


EDU =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = NETA)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = edu)
    )
  )

 

EDU: is net service name
else: is connect descriptor

Note: Parameter names.default_domain
-is parameter in sqlnet.ora
-The value of this parameter is append to net service name if the net service name doesn’t already have a domain.


RAC on Windows(06): Check Before (PRE) Install Clusterware

June 27th, 2008 . by admin

-Power on 2 machines
-Ping Test

C:\Documents and Settings\Administrator>ping wrac1
Pinging wrac1.localdomain [192.168.1.10] with 32 bytes of data:
Reply from 192.168.1.10: bytes=32 time=3ms TTL=128
Reply from 192.168.1.10: bytes=32 time<1ms TTL=128
Reply from 192.168.1.10: bytes=32 time<1ms TTL=128
Reply from 192.168.1.10: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.1.10:
   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
   Minimum = 0ms, Maximum = 3ms, Average = 0ms

C:\Documents and Settings\Administrator>ping wrac1-priv
Pinging wrac1-priv.localdomain [10.10.10.10] with 32 bytes of data:
Reply from 10.10.10.10: bytes=32 time<1ms TTL=128
Reply from 10.10.10.10: bytes=32 time=1ms TTL=128
Reply from 10.10.10.10: bytes=32 time<1ms TTL=128
Reply from 10.10.10.10: bytes=32 time<1ms TTL=128
Ping statistics for 10.10.10.10:
   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
   Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\Documents and Settings\Administrator>ping wrac2
Pinging wrac2.localdomain [192.168.1.20] with 32 bytes of data:
Reply from 192.168.1.20: bytes=32 time=1ms TTL=128
Reply from 192.168.1.20: bytes=32 time<1ms TTL=128
Reply from 192.168.1.20: bytes=32 time<1ms TTL=128
Reply from 192.168.1.20: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.1.20:
   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
   Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\Documents and Settings\Administrator>ping wrac2-priv
Pinging wrac2-priv.localdomain [10.10.10.20] with 32 bytes of data:
Reply from 10.10.10.20: bytes=32 time<1ms TTL=128
Reply from 10.10.10.20: bytes=32 time<1ms TTL=128
Reply from 10.10.10.20: bytes=32 time<1ms TTL=128
Reply from 10.10.10.20: bytes=32 time<1ms TTL=128
Ping statistics for 10.10.10.20:
   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
   Minimum = 0ms, Maximum = 0ms, Average = 0ms
 

CLUVFY Introduction

HELP

runcluvfy -h

Liste stage

runcluvfy.bat stage -list

Liste component

runcluvfy.bat comp -list

Installation Verifications

runcluvfy.bat stage -pre crsinst -n wrac1.localdomain,wrac2.localdomain

Storage Verifications

runcluvfy.bat comp ssa -n wrac1.localdomain,wrac2.localdomain
runcluvfy.bat comp ssa -n wrac1.localdomain,wrac2.localdomain -verbose

Check nodes connectivity

runcluvfy.bat comp nodecon -n wrac1.localdomain,wrac2.localdomain

Connectivity Verifications

runcluvfy comp nodereach -n wrac1.localdomain,wrac2.localdomain

System Requirements Verifications

runcluvfy.bat comp sys -n wrac1.localdomain,wrac2.localdomain -p crs

 

Check PRE cluster instances

Z:\OSource\clusterware\cluvfy>runcluvfy.bat stage -pre crsinst -n wrac1.localdomain,wrac2.localdomain -verbose
The system cannot find the file specified.
Performing pre-checks for cluster services setup
Checking node reachability...
Check: Node reachability from node "WRAC1"
  Destination Node                      Reachable?
  ------------------------------------  ------------------------
  wrac1                                 yes
  wrac2                                 yes
  Result: Node reachability check passed from node "WRAC1".

Checking user equivalence...
Check: User equivalence for user "Administrator"
  Node Name                             Comment
  ------------------------------------  ------------------------
  wrac1                                 passed
  wrac2                                 passed
  Result: User equivalence check passed for user "Administrator".
  Checking administrative privileges...
  Checking node connectivity...

Interface information for node "wrac1"
  Interface Name                  IP Address                      Subnet
  ------------------------------  ------------------------------  ----------------
  PUBLIC                          192.168.1.10                    192.168.1.0
  PRIVATE                         10.10.10.10                     10.10.10.0

Interface information for node "wrac2"
  Interface Name                  IP Address                      Subnet
  ------------------------------  ------------------------------  ----------------
  PUBLIC                          192.168.1.20                    192.168.1.0
  PRIVATE                         10.10.10.20                     10.10.10.0

Check: Node connectivity of subnet "192.168.1.0"
  Source                          Destination                     Connected?
  ------------------------------  ------------------------------  ----------------
  wrac1:PUBLIC                    wrac2:PUBLIC                    yes
  Result: Node connectivity check passed for subnet "192.168.1.0" with node(s) wrac1,wrac2.
Check: Node connectivity of subnet "10.10.10.0"
  Source                          Destination                     Connected?
  ------------------------------  ------------------------------  ----------------
  wrac1:PRIVATE                   wrac2:PRIVATE                   yes
  Result: Node connectivity check passed for subnet "10.10.10.0" with node(s) wrac1,wrac2.
Suitable interfaces for the private interconnect on subnet "192.168.1.0":
  wrac1 PUBLIC:192.168.1.10
  wrac2 PUBLIC:192.168.1.20
Suitable interfaces for the private interconnect on subnet "10.10.10.0":
  wrac1 PRIVATE:10.10.10.10
  wrac2 PRIVATE:10.10.10.20
ERROR:
  Could not find a suitable set of interfaces for VIPs.
Result: Node connectivity check failed.

Checking system requirements for 'crs'...
Check: Operating system version
  Node Name     Available                 Required                  Comment
  ------------  ------------------------  ------------------------  ----------
  wrac1         Windows Server 2003       Windows Server 2003       passed
  wrac2         Windows Server 2003       Windows Server 2003       passed
  Result: Operating system version check passed.
Check: Total memory
  Node Name     Available                 Required                  Comment
  ------------  ------------------------  ------------------------  ----------
  wrac1         1023.25MB (1047812KB)     512MB (524288KB)          passed
  wrac2         1023.25MB (1047812KB)     512MB (524288KB)          passed
  Result: Total memory check passed.
Check: Swap space
  Node Name     Available                 Required                  Comment
  ------------  ------------------------  ------------------------  ----------
  wrac1         2.36GB (2474804KB)        1GB (1048576KB)           passed
  wrac2         2.36GB (2474804KB)        1GB (1048576KB)           passed
  Result: Swap space check passed.
Check: System architecture
  Node Name     Available                 Required                  Comment
  ------------  ------------------------  ------------------------  ----------
  wrac1         32-bit                    32-bit                    passed
  wrac2         32-bit                    32-bit                    passed
  Result: System architecture check passed.
Check: Free disk space in "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp" dir
  Node Name     Available                 Required                  Comment
  ------------  ------------------------  ------------------------  ----------
  wrac1         5.08GB (5330644KB)        400MB (409600KB)          passed
  wrac2         5.13GB (5380320KB)        400MB (409600KB)          passed
  Result: Free disk space check passed.
System requirement passed for 'crs'
Pre-check for cluster services setup was unsuccessful on all the nodes.

 

Check ssa shared storage accessibility

Z:\OSource\clusterware\cluvfy>runcluvfy.bat comp ssa -n wrac1.localdomain,wrac2.localdomain -verbose
The system cannot find the file specified.
Verifying shared storage accessibility
Checking shared storage accessibility...
Disk Partition                        Sharing Nodes (2 in count)
------------------------------------  ------------------------
\Device\Harddisk1\Partition1          wrac1 wrac2
Disk Partition                        Sharing Nodes (2 in count)
------------------------------------  ------------------------
\Device\Harddisk2\Partition1          wrac1 wrac2
Disk Partition                        Sharing Nodes (2 in count)
------------------------------------  ------------------------
\Device\Harddisk3\Partition1          wrac1 wrac2
Disk Partition                        Sharing Nodes (2 in count)
------------------------------------  ------------------------
\Device\Harddisk4\Partition1          wrac1 wrac2
Disk Partition                        Sharing Nodes (2 in count)
------------------------------------  ------------------------
\Device\Harddisk5\Partition1          wrac1 wrac2

Shared storage check was successful on nodes "wrac1,wrac2".
Verification of shared storage accessibility was successful.

RAC on Windows(05): Duplicate Node WRAC1 to WRAC2

June 26th, 2008 . by admin

 


– Copy directory \WRAC1 to \WRAC2

 


Open file \WRAC2\WRAC1.vmx modify line:

displayName = "WRAC1"

to

displayName = "WRAC2"

 


Open file \WRAC2\WRAC1.vmx with VMWare Workstation

Click OK.
Power on WRAC2

 

Change the PUBLIC IP for WRAC2

 

Change the PRIVATE IP for WRAC2

 

Rename Computer for WRAC2
Power off or Restart WRAC1

 


RAC on Windows(04): Config Shared Disks

June 26th, 2008 . by admin

 

 

Posible Combination of File System for RAC

 
Software(*)
OCR+VotingDisk
Database files
NTFS_RAW_ASM
NTFS
RAW
ASM
NTFS_RAW_RAW
NTFS
RAW
RAW
NTFS_OCFS_OCFS
NTFS
OCFS
OCFS
OCFS_OCFS_OCFS
OCFS
OCFS
OCFS

Software(*): Oracle Database Home, Cluster Home, ASM software

We use here the combination NTFS_RAW_ASM, also
– all database software, clusterware software should be install in local c:\
– OCR, VotingDisk should be in RAW Disks
– all database file should be in ASM
 

 

Overview all shared disks:

Filename
File size
Function
OCR.vmdk
120MB
OCR – Oracle Cluster Registry
VotingDisk.cmdk
120MB
Voting Disk
ASM1.vmdk
2GB
ASM disk 1
ASM2.vmdk
2GB
ASM disk 2
ASM3.vmdk
2GB
ASM disk 3

 


Using vmware-vdiskmanager.exe (location in C:\Program Files\VMware\VMware Workstation)
to create the folowing disks:

cd "C:\Program Files\VMware\VMware Workstation"
vmware-vdiskmanager.exe -c -s 120Mb -a lsilogic -t 4 M:\VM2\WSharedDisks\OCR.vmdk
vmware-vdiskmanager.exe -c -s 120Mb -a lsilogic -t 4 M:\VM2\WSharedDisks\VotingDisk.vmdk
vmware-vdiskmanager.exe -c -s 2Gb -a lsilogic -t 4 M:\VM2\WSharedDisks\ASM1.vmdk
vmware-vdiskmanager.exe -c -s 2Gb -a lsilogic -t 4 M:\VM2\WSharedDisks\ASM2.vmdk
vmware-vdiskmanager.exe -c -s 2Gb -a lsilogic -t 4 M:\VM2\WSharedDisks\ASM3.vmdk

 

note: What is Parameter -t 4 ?
Disk types of VMWare:

 0                   : single growable virtual disk
 1                   : growable virtual disk split in 2GB files
 2                   : preallocated virtual disk
 3                   : preallocated virtual disk split in 2GB files
 4                   : preallocated ESX-type virtual disk
 5                   : compressed disk optimized for streaming

Disk type 4 is NEW in VMWare workstation 6.5 Beta and VMWare Server 2.0 Beta.
Disk type 2 (preallocated virtual disk) dont’work !
You get the error, when install Clusterware
..service OracleCSService in improper PENDING state, err(0)
..service OracleCSService in improper PENDING state, err(997)

 


and here the result: all shared are created in a separated folder WSharedDisks !
 

Next, open file WRAC1\WRAC1.vmx with notepad and insert following :

disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"

scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsi1.sharedBus = "VIRTUAL"

scsi1:0.present = "TRUE"
scsi1:0.fileName = "M:\VM2\WSharedDisks\OCR.vmdk"
scsi1:0.mode = "independent-persistent"
scsi1:0.deviceType = "disk"

scsi1:1.present = "TRUE"
scsi1:1.fileName = "M:\VM2\WSharedDisks\VotingDisk.vmdk"
scsi1:1.mode = "independent-persistent"
scsi1:1.deviceType = "disk"

scsi1:2.present = "TRUE"
scsi1:2.fileName = "M:\VM2\WSharedDisks\ASM1.vmdk"
scsi1:2.mode = "independent-persistent"
scsi1:2.deviceType = "disk"

scsi1:3.present = "TRUE"
scsi1:3.fileName = "M:\VM2\WSharedDisks\ASM2.vmdk"
scsi1:3.mode = "independent-persistent"
scsi1:3.deviceType = "disk"

scsi1:4.present = "TRUE"
scsi1:4.fileName = "M:\VM2\WSharedDisks\ASM3.vmdk"
scsi1:4.mode = "independent-persistent"
scsi1:4.deviceType = "disk"

Reopen VMWare and the result: all shared disks are connected

You get the message: Clustering is not support for VMWare Workstation. But ignore it!

 

Check again: all shared disks should be Independent and Persistent

 

Now: The disks must be setup.
– Power on WRAC1
-Start Computer Management
-Start Disk Management
-Dialog Welcome to Initialize and Convert Wizard. Click Next

 

Dialog Select Disk to Initalize. Choice all 5 disks. Click Next

 

Dialog Disks to Convert. Default all disks unchecked. Click Next

Dialog Completing the Initalize and Convert Wizard. Click Finish
 

The result: all shared should be Basic.
We must now create new partition in every disks. Right click on the Disk 1. Click New Partition..

Dialog Welcome to New Partition Wizard. Click Next

 

Dialog New Partition Wizard. Select Partition Type. Choice Extended partition. Click Next

 

Partition size. Default. Click next

 

Click Finish to finish the New Partition Wizard

 

Result: Disk1 is a Basic disk and has a partition type extended
Right click, Choice New Logical Drive to create the a drive!

 

Dialog New Partition Wizard. Welcome. Click Next

 

Select Partition Type. Choice Logical drive. Click Next

 

Specify Partition Size. Default. Click Next

 

Assign Drive Letter or Path. Select Do not assign a driver letter or drive path. Click Next

 

 

Dialog Format Partition. Choice Do not format partition. Click Next

 

 

Click Finish to finish the New partition wizard

 

 

Result: Finish set up disk 1.
– Disk 1 is a basic disk,
-partition typ extended
– has a logical drive,
– unformatted,
– has no drive letter
It is a ready shared disk!

 

 

Next: repeat all steps to set up disk2, disk3, disk4, disk5

Result: all shared disks setup finish!

All shared get color blue (logical drive) over green (extended partition)


RAC on Windows(03): Config Nodes WRAC1, WRAC2; Config Network

June 26th, 2008 . by admin
-We need 2 Machines (Servers or Nodes).
-Config first only one machine, the another server is a copy of the first
 

Machine: WRAC1

 PUBLIC: 192.168.1.10
 VIP: 192.168.1.11
 PRIVATE: 10.10.10.10

 

Machine: WRAC2

 PUBLIC: 192.168.1.20
 VIP: 192.168.1.21
 PRIVATE: 10.10.10.20
 
Note:

  1. Every Machine needs 2 NIC with static IP
  2. PUBLIC and VIP should on a same subnet
  3. PRIVATE on another extra subnet
  4. PUBLIC should be bridged neworking
  5. PRIVATE should be host-only networking
  6. PUBLIC register in DNS and hosts file, also config with static IP
  7. VIP regiter only in hosts file, also just with entry on hosts file
  8. VIP is only available after install Clusterware


1.Rename Computer name as WRAC1
 


Edit hosts file c:\windows\system32\drives\etc\hosts

127.0.0.1      localhost.localdomain    localhost
# Public
192.168.1.10   wrac1.localdomain        wrac1
192.168.1.20   wrac2.localdomain        wrac2
# Private
10.10.10.10    wrac1-priv.localdomain   wrac1-priv
10.10.10.20    wrac2-priv.localdomain   wrac2-priv
# Virtual
192.168.1.11   wrac1-vip.localdomain    wrac1-vip
192.168.1.21   wrac2-vip.localdomain    wrac2-vip
          

Right click over the icon and rename NICs
-Bridged Network as PUBLIC
-The other NIC is PRIVATE.

Note: rename of NICs are not required for RAC. Just only for overview

Click Menu Advanced -> Advanced Settings . Place PUBLIC as the first before PRIVATE.
Also Priority PUBLIC before PRIVATE

 

Specify IP and Subnet mask for NIC PUBLIC

 

Specify IP and Subnet mask for NIC PRIVATE

 

Use regedit to disable DHCP Media Sense
Location: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
add
Value Name: DisableDHCPMediaSense
Data Type: REG_DWORD -Boolean
Value: 1

about DisableDHCPMediaSense see:
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/94173.mspx?mfr=true)
 

 

Use diskpart to Enable auto mount

 

 


RAC on Windows(02): Create virtual machine, Install W2k3

June 25th, 2008 . by admin

 


1.Start New Virtual Machine Wizard.
-Click Menu File -> New -> Virtual Maschine or press Ctrl+N
-Choice ‘Custom (advanced)’

 


2.Virtual Machine Hardware Compatibility
-Choice Platform ‘Workstation 6.5′
 

3. Guess Operating Sytem Installation
Choice ‘Installer disc’

 

4.Choice ‘Windows Server 2003 ENterprise Edition’

 

5. Input product key User/Paword

 

6. Input the name of the virtual machine and location

 

7. Choice number of processors One or Two

 

8. Specify memory size of guess machine

 

9. Choice Use bridged networking for the first NIC.
The second NIC can later add as Host-Only
 

10. Choice SCSI Adapters: ‘LSI Logic’

11. Choice create new virtual disks

 

12. Select SCSI for disk type

 

13. Choice disk size 8GB. The disk here is the local disk for oracle database software. Config for shared disk later..

 

14. Specify the file name of the disks. Disk on VMWare is just a file!

 

15. Summary. Overview of the virtual machine. Click Finish

And when we power on, the W2K3 install process start automatic


RAC on Windows(01): Overview

June 17th, 2008 . by admin

Hardware

  1. -PC with 2 CPUs: Intel 4300 1.8GHz
  2. -RAM: 3GB
  3. -HDD: 20GB

Software

  1. VMWare Workstation 6.5 Beta Build 91182
    Downloaded file: VMware-workstation-e.x.p-91182.exe
  2. Windows Server 2003 Service Pack 1
  3. Oracle Database Release 10.2.0.1.0 for Windows
  4. Oracle Clusterware Release 2 (10.2.0.1.0)
    http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
    Downloaded file: 10201_clusterware_win32.zip (180,991,643 bytes) (cksum – 2014448067)

Steps:

  1. RAC on Windows(01): Overview
  2. RAC on Windows(02): Create virtual machine, Install W2k3
  3. RAC on Windows(03): Config Nodes WRAC1, WRAC2; Config Network
  4. RAC on Windows(04): Config Shared Disks
  5. RAC on Windows(05): Duplicate Node WRAC1 to WRAC2
  6. RAC on Windows(06): Check Before (PRE) Install Clusterware
  7. RAC on Windows(07): Install CRS, Check After (POST) Install Clusterware
  8. RAC on Windows(08): Install Database software and Create ASM
  9. RAC on Windows(09): Create Database
  10. RAC on Windows(10): Checks after Install

 


Install VMWare Tools on Centos

June 13th, 2008 . by admin

TODO:
Boot Linux, logon root

# cd /tmp
# tar zxpf /media/VMware\ Tools/VMwareTools-e.x.p-91182.tar.gz
# cd vmware-tools-distrib/
# ./vmware-install.pl

Press Enter to accept all default values..


RAC with VMWare Workstation?

June 12th, 2008 . by admin

-not posible with VMWare Workstation 5, 6. See the following error
-posible with VWare Workstation 6.5 Beta or VMWare Server 2.0 Beta
-is ONLY posible when using Disk type 4: "preallocated ESX-type virtual disk".
-Disk type 4 is NEW in VWare Workstation 6.5 Beta and VMWare Server 2.0 Beta
(see C:\Program Files\VMware\VMware Workstation>vmware-vdiskmanager Help screen)
-"Clustering is not supported for VMWare Workstation" -> this Warning can ignored
 

-Error when RAC using VMWare 6 (with disk type 2: "preallocated virtual disk")

Output generated from configuration assistant "Oracle Clusterware Configuration Assistant":
Command = C:\WINDOWS\system32\cmd /c call C:\oracle\product\10.2.0\crs/install/crssetup.config.bat
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'administrator', privgrp ''..
Operation successful.
Now formatting voting device: \\.\votedsk1
Format of 1 voting devices complete.
Step 1:  checking status of CRS cluster
Step 2:  creating directories (C:\oracle\product\10.2.0\crs)
Step 3:  configuring OCR repository
Step 4:  configuring safe mode for CRS stack
Step 5:  Starting up CRS stack on all nodes
rac1                  service OracleCSService in improper PENDING state, err(0)
rac2                  service OracleCSService in improper PENDING state, err(997)
Configuration assistant "Oracle Clusterware Configuration Assistant" failed
-----------------------------------------------------------------------------
The "C:\oracle\product\10.2.0\crs\cfgtoollogs/configToolFailedCommands"
script contains all commands that failed, were skipped or were cancelled.
This file may be used to run these configuration assistants outside of OUI.
Note that you may have to update this script with passwords (if any) before executing the same.
-----------------------------------------------------------------------------
 

Checking CRS, RAC

June 12th, 2008 . by admin

Start CRS

crsctl start crs

Stop CRS

C:\>crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.

Check CRS’s status

C:\>crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

Display status of all services

C:\oracle\product\10.2.0\crs\BIN>crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....B1.inst application    ONLINE    ONLINE    rac1
ora....B2.inst application    ONLINE    ONLINE    rac2
ora.RACDB.db   application    ONLINE    ONLINE    rac1
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2   

Start/stop nodeapps

srvctl stop nodeapps  -n <node name>

Start/stop ASM

srvctl start asm -n <node name>
srvctl stop asm -n <node name>

Start/stop a database (all nodes)

srvctl start database -d <database name>
srvctl stop database -d <database name>

Start/stop an individual instance

srvctl start instance -d <database name> -i <instance name>
srvctl stop instance -d <database name> -i <instance name>
before:

SQL> SELECT * FROM v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
  1 RAC1:racdb1
  2 RAC2:racdb2
C:\>srvctl stop instance -d racdb -i racdb2

after:

SQL> SELECT * FROM v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
  1 RAC1:racdb1

restart:

C:\>srvctl start instance -d racdb -i racdb2
SQL> SELECT * FROM v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
  1 RAC1:racdb1
  2 RAC2:racdb2

Locate the voting disk

crsctl query css votedisk

C:\>crsctl query css votedisk
  0.     0    \\.\votedsk1
located 1 votedisk(s).

Display OCR (Oracle Cluster Registry) information

C:\>ocrcheck
Status of Oracle Cluster Registry is as follows :
Version                  :          2
Total space (kbytes)     :     113568
Used space (kbytes)      :       3784
Available space (kbytes) :     109784
ID                       : 1907135343
Device/File Name         : \\.\ocrcfg
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded

Check Status of RAC

C:\>srvctl config database -d RACDB
rac1 RACDB1 C:\oracle\product\10.2.0\db_1
rac2 RACDB2 C:\oracle\product\10.2.0\db_1
C:\>srvctl status database -d RACDB
Instance RACDB1 is running on node rac1
Instance RACDB2 is running on node rac2

Display instances

SQL> SELECT * FROM v$active_instances;
INST_NUMBER INST_NAME
----------- ------------------------------------------------------------
  1 RAC1:racdb1
  2 RAC2:racdb2
SQL> show parameter cluster_database
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cluster_database                     boolean     TRUE
cluster_database_instances           integer     2
SQL> select instance_name, status, startup_time, instance_role from gv$instance;
INSTANCE_NAME    STATUS       STARTUP_T INSTANCE_ROLE
---------------- ------------ --------- ------------------
racdb1           OPEN         12-JUN-08 PRIMARY_INSTANCE
racdb2           OPEN         12-JUN-08 PRIMARY_INSTANCE

Check the VIP config

C:\>srvctl config nodeapps -h
Usage: srvctl config nodeapps -n <node_name> [-a] [-g] [-o] [-s] [-l]
-n <node>           Node name
-a                  Display VIP configuration
-g                  Display GSD configuration
-s                  Display ONS daemon configuration
-l                  Display listener configuration
-h                  Print usage
C:\>srvctl config nodeapps -n rac1 -a
VIP exists.: /rac1-vip.localdomain/192.168.1.111/255.255.255.0/PUBLIC
C:\>srvctl config nodeapps -n rac1 -a -g -s -l
VIP exists.: /rac1-vip.localdomain/192.168.1.111/255.255.255.0/PUBLIC
GSD exists.
ONS daemon exists.
Listener exists.
C:\>srvctl status nodeapps -n rac2
VIP is running on node: rac2
GSD is running on node: rac2
Listener is running on node: rac2
ONS daemon is running on node: rac2

Change the VIP address, subnetmask or interface

srvctl stop nodeapps -n <node1>
srvctl stop nodeapps -n <node2>
srvctl modify nodeapps -n <node1> -A <ip_address>/<net mask>/<interface>
srvctl modify nodeapps -n <node2> -A <ip_address>/<net mask>/<interface>
srvctl start nodeapps -n <node1>
srvctl start nodeapps -n <node2>

To prevent a database starting at boot time

srvctl disable database -d <database name>

Change the private interconnect subnet

First find the interface which is in use as the interconnect – run as root from the crs home:

oifcfg getif

Make a note of the interface name (eth1 in the following example), then
run the following:

oifcfg delif -global eth1
oifcfg setif -global eth1/<your new subnet>:cluster_interconnect

« Previous Entries