steps oracle 11g installation guide & asm & rac
TRANSCRIPT
Oracle 11g installation guide prepared by chowdary
This is a 16 step Oracle 11g installation guide that covers a typical installation scenario with screenshots.
1. Select installation method
Following two installation methods are available:
Basic Installation – Choose this to perform the full Oracle Database 11g installation with standard configuration options. You can use only file system for storage in this option.
Advanced Installation – This gives your full control over the installation, including the ability to choose Automatic Storage Management. Select this option as shown below.
Fig - Select Installation Method
2. Specify Inventory directory and credentials
Enter the following information:
Enter the inventory directory: /u01/app/oraInventory Specify operating system group name: oinstall
Oracle 11g installation guide prepared by chowdary
Fig - Specify Inventory directory and credentials
3. Select Installation Type
Following three installation types are available:
Enterprise Edition – Select this option. Standard Edition Custom
Fig - Select Installation Type
Oracle 11g installation guide prepared by chowdary
4. Specify Install Location
Enter the following information:
Oracle Base: /u01/app/oracle Name: Oracle_Home Path: /u01/app/oracle/product/11.1.0
Fig - Select Install Location
5. Product-Specific Prerequisite Checks
In this screen, the Installer verifies that your environment meets all of the minimum requirements for installing and configuring the products that you have chosen to install. You must manually verify and confirm the items that are flagged with warnings and items that require manual checks.
6. Select Configuration Option
Following three configuration options are available:
Create a Database – select this option Configure Automatic Storage Management (ASM) Install software
Oracle 11g installation guide prepared by chowdary
Fig - select configuration option
7. Select a database configurationFollowing three database configuration options are available.
General purpose/Transaction processing – select this option Data warehouse Advanced
Fig – select Database Configuration
8. Specify Database Configuration
Oracle 11g installation guide prepared by chowdary
Enter the following information:
Global Database Name: devdb.example.com. An Oracle database is uniquely identified by a Global Database Name, typically of the form “name.domain”
SID: devdb
9. Specify Database Configuration Details
There are four different tabs in this screen as shown below:
Memory Tab o Select the check-box to Enable Automatic Memory Managemento Drag the bar to allocate the memory. This will automatically
allocate memory size for SGA and PGA depending on the total database memory allocated.
Character Sets Tab. Following three character set options are given in this tab.
o Use the defaulto Use Unicode (AL32UTF8)o Choose from the list of character sets. Select Database
Character Set as Unicode standard UTF-8AL32UTF8 – Select this option.
Security Tab – Just leave the defaults in this tab.
Sample Schema Tab – Just leave the defaults in this tab.
Oracle 11g installation guide prepared by chowdary
Fig - Select Database Config Details with Memory Tab
10. Select Database Management Option
Following two management options are available:
Use Grid Control for Database Management o Management Service: Choose an agent.
Use Database Control for Database Management- Select this option. o Select the check-box to Enable Email Notificationso Outgoing mail (SMTP) Server:o Email Address:
Oracle 11g installation guide prepared by chowdary
Fig - Select Database Management Option
11. Specify Database Storage Option
Following two storage options are available:
File System – Select this option. o Specify Database File location: /u01/app/oracle/oradata/
Automatic Storage Management. ASM simplifies database storage administration and optimizes database layout for I/O performance.
12. Specify Backup and Recovery Option
Enable automated backup as shown below. If you’ve configured ASM, you can choose to store the automated backups on ASM. If not, select File System option.
Oracle 11g installation guide prepared by chowdary
Fig - Specify Backup and Recovery Options
13. Specify database schema password
Enter the password for sys, system, sysman, dbsnmp schemas. You have the option of either using the same passwords or different password for all the accounts in this screen.
14. Privileged Operating System Groups
Enter the following information in this screen:
Database Administrator (OSDBA) Group: dba Database Operator (OSOPER) Group: dba ASM administrator (OSASM) Group: dba
15. Oracle Configuration Manager Registration
You can associate your configuration information with your metalink account as shown below.
Oracle 11g installation guide prepared by chowdary
Fig - Oracle Configuration Manager Registration
16. Final Summary Screen
This will display a summary of all the installation option you’ve selected so far. Click on Install to complete the installation.
Fig - Installation Summary Screen
Oracle 11g installation guide prepared by chowdary
The automatic Storage Management (ASM) Pocket Reference Guide
ASM Diskgroups
Create diskgroup
CREATE DISKGROUP disk_group_1 NORMAL REDUNDANCYFAILGROUP failure_group_1 DISK '/devices/diska1' NAME diska1,'/devices/diska2' NAME diska2,FAILGROUP failure_group_2 DISK '/devices/diskb1' NAME diskb1,'/devices/diskb2' NAME diskb2;
Drop disk groups
DROP DISKGROUP DATA INCLUDING CONTENTS;
Add disks
ALTER DISKGROUP DATA ADD DISK '/dev/sda3;
Drop a disk
ALTER DISKGROUP DATA DROP DISK DATA_0001;
Resize all disks in a disk group
ALTER DISKGROUP DATA RESIZE ALL SIZE 100G;
UNDROP DISKS clause of the ALTER DISKGROUP
ALTER DISKGROUP DATA UNDROP DISKS;
Rebalance diskgroup
Oracle 11g installation guide prepared by chowdary
ALTER DISKGROUP DATA REBALANCE POWER 5;
Check Diskgroup
alter diskgroup data check;
alter diskgroup data check norepair;
Diskgroup Metadata Backup
md_backup -b asm_backup.mdb.txt-g data,fra
ASM Specific Init.ora Parameters
.cluster_database= true
.asm_diskstring = ‘/dev/sd*1’
.instance_type=asm
.shared_pool_size=100M
.large_pool_size = 80M
.db_cache_size=60M
.asm_diskgroups = ‘DATA’,’FRA’
.processes=128
Initialize ASM for non-RAC
./localconfig add
Manually start CSSD (non-RAC)
/etc/init.d/init.cssd start
Manually stop CSSD (non-RAC)
Oracle 11g installation guide prepared by chowdary
/etc/init.d/init.cssd stop
Resetting CSS to new Oracle Home
localconfig reset /apps/oracle/product/11.1.0/ASM
ASM Dictionary Viewsv$asm_aliasLists all aliases in all currently mounted diskgroups v$asm_clientLists all the databases currently accessing the diskgroups v$asm_diskLists all the disks discovered by the ASM instance v$asm_diskgroupLists all the diskgroups discovered by the ASM instance v$asm_fileLists all files that belong to diskgroups mounted by the ASM instance v$asm_operationReports information about current active operations. Rebalance activity is reported in this view v$asm_templateLists all the templates currently mounted by the ASM instance v$asm_diskgroup_statsame as v$asm_diskgroup but does discover new diskgroups. Use this view instead of v$asm_diskgroup v$asm_disk_statsame as v$asm_disk but does not discover new disks. Use this view instead of v$asm_disk
srvctl commandsADD
srvctl add asm -n rac3 -i +ASM3 -o /opt/oracle/app/product/10.2/asm
ENABLE
srvctl enable asm -n rac3 -i +ASM3
DISABLE
srvctl disable asm -n rac3 -i +ASM3
START
srvctl start asm -n rac3
STOP
Oracle 11g installation guide prepared by chowdary
srvctl stop asm -n rac3
CONFIG
srvctl config asm –n rac1
REMOVE
srvctl remove asm –n rac1
STATUS
srvctl status asmsrvctl status asm –n rac1
MODIFY
srvctl modify asm –o -n rac1
ASMLIB commands (as root)
/etc/init.d/oracleasm start/etc/init.d/oracleasm stop/etc/init.d/oracleasm restart/etc/init.d/oracleasm configure/etc/init.d/oracleasm status/etc/init.d/oracleasm enable/etc/init.d/oracleasm disable/etc/init.d/oracleasm listdisks/etc/init.d/oracleasm deletedisk/etc/init.d/oracleasm scandisks/etc/init.d/oracleasm querydisk /dev/sdd1/etc/init.d/oracleasm createdisk VOL1 /dev/sdb1/etc/init.d/oracleasm renamedisk /dev/sdb1 VOL1
Asmcmd CommandscdChanges the current directory to the specified directory duDisplays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively findLists the paths of all occurrences of the specified name (with
Oracle 11g installation guide prepared by chowdary
wildcards) under the specified directory ls +data/testdbLists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups lsctLists information about current ASM clients lsdgLists all disk groups and their attributes mkaliasCreates an alias for a system-generated filename mkdirCreates ASM directories pwdDisplays the path of the current ASM directory rm / rm -fDeletes the specified ASM files or directories rmaliasDeletes the specified alias, retaining the file that the alias points to lsdskLists disks visible to ASM md_backupCreates a backup of all of the mounted disk groups md_restoreRestores disk groups from a backup mkaliasCreates an alias for system-generated filenames remapRepairs a range of physical blocks on a disk cpCopies files into and out of ASM:
ASM diskgroup to OS file system OS file system to ASM diskgroup ASM diskgroup to another ASM diskgroup on the same server ASM disk group to ASM diskgroup on a remote server
The Official Real Application Clusters (RAC) Pocket Reference Guide
Cluster Verification (cluvfy)
Post-checks for hardware and operating system setup
runcluvfy.sh stage -post hwos -n node1,node2
Pre-checks for cluster services setup
Oracle 11g installation guide prepared by chowdary
runcluvfy.sh stage -pre crsinst -n rac1,rac2
Check Node Reachability
runcluvfy.sh comp nodereach -n rac1,rac2 -srcnode rac1
Shared Storage Check
sh runcluvfy.sh comp ssa -n rac1,rac2
Post-checks for cluster services setup
cluvfy stage -post crsinst -n rac1,rac2
Verify Cluster Integrity
cluvfy comp clu -n rac1,rac2 -verbose
Verify Cluster Manager Integrity
cluvfy comp clumgr -n rac1,rac2 -verbose
Verify Node Applications
cluvfy comp nodeapp -n rac1,rac2 -verbose
Verify CRS Integrity
cluvfy comp crs -n rac1,rac2 -verbose
Verify OCR Integrity
cluvfy comp ocr -n rac1,rac2 -verbose
Precheck for Database Configuration
Oracle 11g installation guide prepared by chowdary
cluvfy stage -pre dbcfg -n rac1,rac2 -d /u01/app/oracle/product/10.2.0/DB -verbose
Precheck for Database Installation
cluvfy stage -pre dbinst -n rac1,rac2 -verbose
Precheck for Database Installation
cluvfy stage -pre dbinst -n rac1,rac2 -verbose
Verify OCR Integrity
cluvfy comp ocr -n all
CRS Tracing
Export ORA_CRSDEBUG_ALL= 1 to 5 Check logs @ $ORA_CRS_HOME/log/node
See Metalink Note: 357808.1 for details
Enable the tracing for the resources running:
# crsctl debug log res "ora.VISK.VISK1.inst:5"# crsctl debug log res "ora.VISK.VISK2.inst:5"
Increase the tracing for crsd threads:
# crsctl debug log crs CRSRES:5# crsctl debug log crs CRSAPP:5# crsctl debug log crs CRSEVT:5
CRS commands
Stop CRS (as root)
crsctl start crs - 10gR2 /etc/init.d/init.crs start crs - 10gR1
Oracle 11g installation guide prepared by chowdary
Stop CRS (as root)
crsctl stop crs – 10gR2 /etc/init.d/init.crs stop crs - 10gR1
Disable CRS
/etc/init.d/init.crs disable
Check CRS
crsctl check crs
Check CSSD - crsctl check cssd Check CRSD - crsctl check crsd Check EVM - crsctl check evmd
Query Voting Disks
crsctl query css votedisk
Query Software Version
crsctl query crs softwareversion
Query Active Version
crsctl query crs activeversion
List Modules
crsctl lsmodules crs crsctl lsmodules evm
Start / Stop Resources
crs_start resource-name -all (all resource) crs_stop resource-name -all (all resource)
Diagnostic Collection - $ORA_CRS_HOME/diagcollection.pl
Level 1: Configuration info (OCR and init scripts) Level 2: Logs and traces
Oracle 11g installation guide prepared by chowdary
Level 3: Core files
Additional CRS command:
crs_relocate //change where resource is active
srvctl commands
ADD
# srvctl add database -d VISK -o /apps/oracle/product/10.2.0/RACDB# srvctl add instance -d VISK -i VISK1 -n rac1
CONFIG (information)
# srvctl config# srvctl config -v# srvctl config database -d VISK# srvctl config database -d VISK -a# srvctl config nodeapps -a -g -s -l -n rac1# srvctl config listener -n rac1# srvctl config service -d VISK# srvctl config service -d VISK -s "VISK_RAC" –a
Export
Ocrconfig –export /tmp/dba/exp_ocr.dmp –s online
START / STOP
# srvctl stop database -d VISK# srvctl stop database -d VISK -o abort# srvctl stop instance -d VISK -i VISK1# srvctl stop listener -b rac1 -l VISK_RAC1# srvctl stop listener -b rac1 -l VISK_RAC2
Oracle 11g installation guide prepared by chowdary
# srvctl start nodeapps –n RAC1# srvctl stop nodeapps – n RAC2
STATUS
# srvctl status database -d VISK# srvctl status instance -d VISK -i "VISK1,VISK2" -v# srvctl status nodeapps -n rac1
Tracing
export SRVM_TRACE=true
OCR commands
# ocrdump ocr_cluster_dump # ocrdump -stdout -keyname SYSTEM.css.misscount# ocrdump -stdout -xml # Change OCR Backup Location: ocrconfig -backuploc <directory name># Show OCR Backup: ocrconfig -showbackup# Check integrity of OCR: ocrcheck# Restore the OCR: ocrconfig –restore <filename>
Determine OCR Location
cat /etc/oracle/ocr.lococrconfig_loc=/dev/raw/raw1ocrmirrorconfig_loc=/dev/raw/raw2local_only=FALSE
Recommendation: Mirror the OCR disk
ocrconfig -replace ocr file_or_disk ocrconfig -replace ocrmirror file_or_disk
Oracle 11g installation guide prepared by chowdary
oifcfg commands
oifcfg iflist oifcfg iflist -p -n oifcfg getif -type public oifcfg getif oifcfg getif -n rac2 oifcfg getif -if eth2
Additional commands List Nodes: olsnodes -n View Available Raw Devices: raw -qa Look for CRS processes: ps –ef |egrep –i "crs|css|evm|d.bin"
Add RAC gv$ views
@$ORACLE_HOME/rdbms/admin/catclust.sql
RAC Specific Init.ora Parameters
*.cluster_database_instances= 2*.cluster_database= trueVISK1.instance_number= 1VISK2.instance_number= 2VISK1.thread= 1VISK2.thread= 2VISK1.undo_tablespace= 'UNDO_RBS1'VISK2.undo_tablespace= 'UNDO_RBS2'VISK1.local_listener= VISK_L1VISK2.local_listener= VISK_L2VISK1.remote_listener= VISK_R1VISK2.remote_listener= VISK_R2VISK1.log_archive_format= VISK1_%t_%s_%r.arcVISK2.log_archive_format= VISK2_%t_%s_%r.arc
Voting Disks
Backup - dd if=/dev/raw/raw11 of=/home/oracle/votingdisk.bkup Restore - dd if=/home/oracle/votingdisk.bkup of=/dev/raw/raw11
Recommendation: Have a minimum three voting disks for RAC survivability
Rolling Upgrade
Oracle 11g installation guide prepared by chowdary
./runInstaller -updateNodeList "CLUSTER_NODES=rac1" -local ORACLE_HOME=/apps/oracle/product/10.2.0/CRS
Recommended kernel parameters - /etc/sysctl.conf
net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1net.core.rmem_default = 262144net.core.rmem_max = 262144net.core.wmem_default = 262144net.core.wmem_max = 262144kernel.shmmax = 2147483648 #depends on total RAMkernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000
Setup User Equivalence1. ssh-keygen –t rsa #Take all defaults2. cd $HOME/.ssh3. cat id_rsa.pub #Copy the contents of the output4. # ssh to remote host as oracle5. cd .ssh6. vi authorized_keys #paste contents of id_rsa.pub
Note:
Repeat for all the nodes including local node Make sure that the group permissions are not writeable
Oracle Clusterware 11g Upgrade Considerations
1. Make sure that you have enough space for the OCR2. OCR space utilization doubles during the upgrade
Relevant Logfiles OS - /var/log/messages CRS - $ORA_CRS_HOME/log/node-name/crsd/node.log
Oracle 11g installation guide prepared by chowdary
CSS - $ORA_CRS_HOME/log/node-name/cssd/ocssd.log EVM - $ORA_CRS_HOME/log/node-name/evmn/evm.log RACG - $ORA_CRS_HOME/log/node-name/racg/ora.node1.ons.log VIP Tracing – edit $ORA_CRS_HOME/bin/racgrwrap _USR_ORA_DEBUG=1 to 10
#Bounce Nodeapps