1. Oracle Clusterware
=========================
Rac database has been installed with 2 node RAC clusteraware. The hardware details are as shown in the H/W Details. Installation of RAC has been carried out with the “oracle “as UNIX user account as oracle clusterware.
Oracle Clusterware HOME CRS_HOME=/oracle/product/11.1.0/db_1
Following Devices are used for OCR and Voting Disks
LUN No Device Name
OCR 1 5 /dev/rhdisk7
OCR 2 6 /dev/rhdisk8
Voting Disk 1 9 /dev/rhdisk11
Voting Disk 2 10 /dev/rhdisk12
Voting Disk 3 11 /dev/rhdisk13
To check the status of CRS services (i.e. Clusterware services) execute the following command, in command prompt.
$/oracle/product/11.1.0/db_1/bin/crsctl check crs
To stop CRS services (i.e. Clusterware services) login as root user account, execute the following command in command prompt.
#/oracle/product/11.1.0/db_1/bin/crsctl stop crs
To stop CRS services (i.e. Clusterware services) login as root user account, execute the following command in command prompt.
#/oracle/product/11.1.0/db_1/bin/crsctl start crs
To check with all the services which are registered with Clusterware services execute following command.
$/oracle/product/11.1.0/db_1/bin/crs_stat –t
The Above command shows all the services are registered with crs. This includes ASM instance and its listener, RAC Database and its Listener on each node of RAC database and its status.
All the crs related trace and log file will be generated in there respective home on each node
e.g. /oracle/product/11.1.0/db_1/log on each node.
For RAC database to store the datafile ASM technology has been adopted.
2 . ASM Instance
==============
An ASM instance is built on the same technology as an Oracle Database instance. An ASM instance has a System Global Area (SGA) and background processes that are similar to those of Oracle Database. However, because ASM performs fewer tasks than
a database, an ASM SGA is much smaller than a database SGA. In addition, ASM has a minimal performance effect on a server. ASM instances mount disk groups to make ASM files available to database instances; ASM instances do not mount databases. ASM metadata is the information that ASM uses to control a disk group and the metadata resides within the disk group. ASM metadata includes the following information
1. The disks that belong to a disk group
2. The amount of space that is available in a disk group
3. The filenames of the files in a disk group
4. The location of disk group datafile data extents
5. A redo log that records information about atomically changing data blocks
ASM software is installed with UNIX user id “oracle “as software owner, which is having the sysasm privileges. Below path is the ASM home.
ASM HOME=/oracleproduct/11.1.0/db_1
There are two ASM instances are created namely +ASM1 and +ASM2 on each Node.
ASM Instance +ASM1 on 192.168.118.170 (db1)
ASM Instance +ASM2 on 192.168.118.171(db2)
To connect to the ASM instance or asmcmd we need to set ORACLE_HOME and ORACLE_SID environment variable, which are specific to ASM Instance.
Login as oracle set the environment variable.
To shutdown the ASM instance on NODE 1.
$export ORACLE_HOME==/oracleproduct/11.1.0/db_1
$export ORACLE_SID=+ASM1
$sqlplus “/as sysasm”
$sqlplus>> shutdown immediate
$exit
$sqlplus “/as sysasm” which will connect to idle instance as sys asm privileges.
$sqlplus>>startup
Connecting to the ASMCMD command utility.
$export ORACLE_HOME==/oracleproduct/11.1.0/db_1
$export ORACLE_SID=+ASM1
$asmcmd
$asmcmd>> ls –lart
The above command will show the available disk group in the ASM.
Each group will be preceded with “+” sign where + is as root, + directory we cannot create any folder.
Following are the disk group created.
+ DATA
+CTRLREDO
+ASMSPFILE
+ARCHGROUP1
ASM disk group created manually using the following command.
CREATE DISKGROUP DATA EXTERNAL REDUNDANCY
DISK ‘/dev/rhdisk3′ size 1142350M,’/dev/rhdisk4’ size 1142350M, ‘/dev/rhdisk5’ size 1142350M;
CREATE DISKGROUP ARCHGROUP1 EXTERNAL REDUNDANCY
DISK ‘/dev/rhdisk6’ size 558070M;
CREATE DISKGROUP CTRLREDO EXTERNAL REDUNDANCY DISK ‘/dev/rhdisk10’ size 284670M;
CREATE DISKGROUP ASMSPFILE EXTERNAL REDUNDANCY DISK ‘/dev/rhdisk14’ size 300M;
Sqlplus>>select group_number, NAME, TOTAL_MB, FREE_MB, STATE from v$asm_diskgroup
Sqlplus>> select GROUP_NUMBER, DISK_NUMBER, OS_MB, TOTAL_MB,
FREE_MB, NAME, PATH from V$ASM_DISK;
3. RAC DATBASE
======================
RAC database has been installed with UNIX user id “oracle” and database version being used is Oracle 11g.
The GLOBAL name of the database id PRODFCJ, which is having two instance namely PROD1 and PROD2 on NODE1 and NODE2 respectively.
Currently each instance on NODE having the MAX_MEMORY_TARGET=42 GB, which is set to due to using automatic memory management , which is strongly recommend by Oracle for Oracle 11g. If required we can configure the conventional pools size.
RAC database files are stored in the ASM storage technology. The first group is used for all the details is +DATAGROUP+1 and Mirrored files are stored +CTRLREDO. Common spfile for the two instance is used to stored in the +DATA/prodfcj/spfileprod. +ARCHGROUP1 group will be used for to store archive files. +ASMSPFILE group is used to store the ASM spfile.
Currently RAC DATABSE having 3 mirrored control files, one is stored in the +DATA disk and other two mirrored copy are stored in +CTRLREDO disk group.
RAC Database PRODFCJ is having 8 online redo log group of size 1GB, each group having 3 online redo log members. Mirrored log member are created on +CTRLREDO diskgroup.
Following are the statement sued to add the Online REDO log group and member
Adding the online redo group.
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 5 (‘+DATA′,’+CTRLREDO’,’+CTRLREDO’) SIZE 1024M;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 6 (‘+DATA′,’+CTRLREDO’,’+CTRLREDO’) SIZE 1024m;
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 7 (‘+DATA′,’+CTRLREDO’,’+CTRLREDO’) SIZE 1024M;
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 8 (‘+DATA′,’+CTRLREDO’,’+CTRLREDO’) SIZE 1024m;
Adding member to existing on line redo group.
ALTER DATABASE ADD LOGFILE MEMBER ‘+CTRLREDO’,’+CTRLREDO’ TO GROUP 1;
ALTER DATABASE ADD LOGFILE MEMBER ‘+CTRLREDO’,’+CTRLREDO’ TO GROUP 2;
ALTER DATABASE ADD LOGFILE MEMBER ‘+CTRLREDO’,’+CTRLREDO’ TO GROUP 3;
ALTER DATABASE ADD LOGFILE MEMBER ‘+CTRLREDO’,’+CTRLREDO’ TO GROUP 4;
While adding the online redo member size will not be specified it will created with same size for which group it is being added.
Tablespace Creation.
Following statements were used to create the tablespace and add datafiles in the database which are in line with ORACLE standart
ADDING FILES to SYSTEM TABLESPACE in ASM
ALTER TABLESPACE SYSTEM ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE SYSTEM ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE SYSTEM ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ADDING DATAFILES UNDO TABLESPACE
ALTER TABLESPACE UNDOTBS1 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS1 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS1 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS2 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS2 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS2 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ADDING DATAFILES TEMP TABLESPACE.
alter tablespace temp add tempfile ‘+DATA’ size 4096M;
alter tablespace temp add tempfile ‘+DATA’ size 4096M;
alter tablespace temp add tempfile ‘+DATA’ size 4096M;
=========================
Rac database has been installed with 2 node RAC clusteraware. The hardware details are as shown in the H/W Details. Installation of RAC has been carried out with the “oracle “as UNIX user account as oracle clusterware.
Oracle Clusterware HOME CRS_HOME=/oracle/product/11.1.0/db_1
Following Devices are used for OCR and Voting Disks
LUN No Device Name
OCR 1 5 /dev/rhdisk7
OCR 2 6 /dev/rhdisk8
Voting Disk 1 9 /dev/rhdisk11
Voting Disk 2 10 /dev/rhdisk12
Voting Disk 3 11 /dev/rhdisk13
To check the status of CRS services (i.e. Clusterware services) execute the following command, in command prompt.
$/oracle/product/11.1.0/db_1/bin/crsctl check crs
To stop CRS services (i.e. Clusterware services) login as root user account, execute the following command in command prompt.
#/oracle/product/11.1.0/db_1/bin/crsctl stop crs
To stop CRS services (i.e. Clusterware services) login as root user account, execute the following command in command prompt.
#/oracle/product/11.1.0/db_1/bin/crsctl start crs
To check with all the services which are registered with Clusterware services execute following command.
$/oracle/product/11.1.0/db_1/bin/crs_stat –t
The Above command shows all the services are registered with crs. This includes ASM instance and its listener, RAC Database and its Listener on each node of RAC database and its status.
All the crs related trace and log file will be generated in there respective home on each node
e.g. /oracle/product/11.1.0/db_1/log on each node.
For RAC database to store the datafile ASM technology has been adopted.
2 . ASM Instance
==============
An ASM instance is built on the same technology as an Oracle Database instance. An ASM instance has a System Global Area (SGA) and background processes that are similar to those of Oracle Database. However, because ASM performs fewer tasks than
a database, an ASM SGA is much smaller than a database SGA. In addition, ASM has a minimal performance effect on a server. ASM instances mount disk groups to make ASM files available to database instances; ASM instances do not mount databases. ASM metadata is the information that ASM uses to control a disk group and the metadata resides within the disk group. ASM metadata includes the following information
1. The disks that belong to a disk group
2. The amount of space that is available in a disk group
3. The filenames of the files in a disk group
4. The location of disk group datafile data extents
5. A redo log that records information about atomically changing data blocks
ASM software is installed with UNIX user id “oracle “as software owner, which is having the sysasm privileges. Below path is the ASM home.
ASM HOME=/oracleproduct/11.1.0/db_1
There are two ASM instances are created namely +ASM1 and +ASM2 on each Node.
ASM Instance +ASM1 on 192.168.118.170 (db1)
ASM Instance +ASM2 on 192.168.118.171(db2)
To connect to the ASM instance or asmcmd we need to set ORACLE_HOME and ORACLE_SID environment variable, which are specific to ASM Instance.
Login as oracle set the environment variable.
To shutdown the ASM instance on NODE 1.
$export ORACLE_HOME==/oracleproduct/11.1.0/db_1
$export ORACLE_SID=+ASM1
$sqlplus “/as sysasm”
$sqlplus>> shutdown immediate
$exit
$sqlplus “/as sysasm” which will connect to idle instance as sys asm privileges.
$sqlplus>>startup
Connecting to the ASMCMD command utility.
$export ORACLE_HOME==/oracleproduct/11.1.0/db_1
$export ORACLE_SID=+ASM1
$asmcmd
$asmcmd>> ls –lart
The above command will show the available disk group in the ASM.
Each group will be preceded with “+” sign where + is as root, + directory we cannot create any folder.
Following are the disk group created.
+ DATA
+CTRLREDO
+ASMSPFILE
+ARCHGROUP1
ASM disk group created manually using the following command.
CREATE DISKGROUP DATA EXTERNAL REDUNDANCY
DISK ‘/dev/rhdisk3′ size 1142350M,’/dev/rhdisk4’ size 1142350M, ‘/dev/rhdisk5’ size 1142350M;
CREATE DISKGROUP ARCHGROUP1 EXTERNAL REDUNDANCY
DISK ‘/dev/rhdisk6’ size 558070M;
CREATE DISKGROUP CTRLREDO EXTERNAL REDUNDANCY DISK ‘/dev/rhdisk10’ size 284670M;
CREATE DISKGROUP ASMSPFILE EXTERNAL REDUNDANCY DISK ‘/dev/rhdisk14’ size 300M;
Sqlplus>>select group_number, NAME, TOTAL_MB, FREE_MB, STATE from v$asm_diskgroup
Sqlplus>> select GROUP_NUMBER, DISK_NUMBER, OS_MB, TOTAL_MB,
FREE_MB, NAME, PATH from V$ASM_DISK;
3. RAC DATBASE
======================
RAC database has been installed with UNIX user id “oracle” and database version being used is Oracle 11g.
The GLOBAL name of the database id PRODFCJ, which is having two instance namely PROD1 and PROD2 on NODE1 and NODE2 respectively.
Currently each instance on NODE having the MAX_MEMORY_TARGET=42 GB, which is set to due to using automatic memory management , which is strongly recommend by Oracle for Oracle 11g. If required we can configure the conventional pools size.
RAC database files are stored in the ASM storage technology. The first group is used for all the details is +DATAGROUP+1 and Mirrored files are stored +CTRLREDO. Common spfile for the two instance is used to stored in the +DATA/prodfcj/spfileprod. +ARCHGROUP1 group will be used for to store archive files. +ASMSPFILE group is used to store the ASM spfile.
Currently RAC DATABSE having 3 mirrored control files, one is stored in the +DATA disk and other two mirrored copy are stored in +CTRLREDO disk group.
RAC Database PRODFCJ is having 8 online redo log group of size 1GB, each group having 3 online redo log members. Mirrored log member are created on +CTRLREDO diskgroup.
Following are the statement sued to add the Online REDO log group and member
Adding the online redo group.
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 5 (‘+DATA′,’+CTRLREDO’,’+CTRLREDO’) SIZE 1024M;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 6 (‘+DATA′,’+CTRLREDO’,’+CTRLREDO’) SIZE 1024m;
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 7 (‘+DATA′,’+CTRLREDO’,’+CTRLREDO’) SIZE 1024M;
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 8 (‘+DATA′,’+CTRLREDO’,’+CTRLREDO’) SIZE 1024m;
Adding member to existing on line redo group.
ALTER DATABASE ADD LOGFILE MEMBER ‘+CTRLREDO’,’+CTRLREDO’ TO GROUP 1;
ALTER DATABASE ADD LOGFILE MEMBER ‘+CTRLREDO’,’+CTRLREDO’ TO GROUP 2;
ALTER DATABASE ADD LOGFILE MEMBER ‘+CTRLREDO’,’+CTRLREDO’ TO GROUP 3;
ALTER DATABASE ADD LOGFILE MEMBER ‘+CTRLREDO’,’+CTRLREDO’ TO GROUP 4;
While adding the online redo member size will not be specified it will created with same size for which group it is being added.
Tablespace Creation.
Following statements were used to create the tablespace and add datafiles in the database which are in line with ORACLE standart
ADDING FILES to SYSTEM TABLESPACE in ASM
ALTER TABLESPACE SYSTEM ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE SYSTEM ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE SYSTEM ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ADDING DATAFILES UNDO TABLESPACE
ALTER TABLESPACE UNDOTBS1 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS1 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS1 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS2 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS2 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ALTER TABLESPACE UNDOTBS2 ADD DATAFILE ‘+DATA’ size 200M autoextend on maxsize 4096M;
ADDING DATAFILES TEMP TABLESPACE.
alter tablespace temp add tempfile ‘+DATA’ size 4096M;
alter tablespace temp add tempfile ‘+DATA’ size 4096M;
alter tablespace temp add tempfile ‘+DATA’ size 4096M;
----------------All of the blogs are for my own reference only---------------------
No comments:
Post a Comment