Oracle 11g new feature-detailed description of installation and configuration of Oracle restart Database

Source: Internet
Author: User

 
Oracle restart improves the availability of your single-instance Oracle database. oracle restart automatically restarts the database instance, the Automatic Storage Management (ASM) instance, the listener, and other components after a hardware or software failure
Or whenever your database host computer restarts. Server Control (srvctl) is the command line interface to manage Oracle processes that are managed by Oracle restart on a standalone server.
 
This feature provides improved reliability and automatic management of a single-instance Oracle Database and the management of any process or application running on the database server.

Oracle restart is a new feature introduced by Oracle 11g. It uses clusterware to provide high availability protection for a single instance.
In Oracle 11g R2, the restart database depends on the grid infrastructure architecture. Before installing the database software, you must first install the grid infrastructure software.
Oracle restart database can use the srvctl crsctl and other tools provided by clusterware to manage the database. When the server or process ends abnormally, grid infrastructure will
Automatic Restart to provide high availability protection.
This document describes how to install and configure an Oracle 11g R2 restart database:

OS: Oracle Enterprise Linux 5.6
Grid infrastructure 11.2.0.3.0
Oracle Database 11.2.0.3.0

Grid --- p10404530_112030_linux_3of7.zip
Oracle --- p10404530_112030_linux_1of7.zip
Oracle --- p10404530_112030_linuxtimely f7.zip

1. Check whether the physical memory meets the installation requirements.
[Root @ ASM server] # grep memtotal/proc/meminfo
Memtotal: 2229472 KB

2. Check whether the swap space meets the installation requirements.
[Root @ ASM server] # grep swaptotal/proc/meminfo
Swaptotal: 4292600 KB

[Root @ ASM server] # Free
Total used free shared buffers cached
Mem: 2229472 229844 1999628 0 18628 159852
-/+ Buffers/cache: 51364 2178108
Swap: 4292600 0 4292600

3. Check the processor architecture
[Root @ ASM server] # uname-m
I686

4. Check whether/tmp space meets the installation requirements.
[Root @ ASM server] # DF-H/tmp
Filesystem size used avail use % mounted on
/Dev/mapper/VolGroup00-LogVol00
16g 2.9G 12g 20%/

5. Check whether the disk space meets the installation requirements.
[Root @ ASM server] # DF-H
Filesystem size used avail use % mounted on
/Dev/mapper/VolGroup00-LogVol00
16g 2.9G 12g 20%/
/Dev/sda1 99 m 35 m 59 m 38%/boot
Tmpfs 1.1G 0 1.1G 0%/dev/SHM
/Dev/HDC 3.0g 3.0g 0 100%/mnt/CDROM

6. Check the operating system version.
[Root @ ASM server] # Cat/proc/version
Linux version 2.6.18-238. el5pae (mockbuild@ca-build10.us.oracle.com) (GCC version 4.1.2 20080704 (Red Hat 4.1.2-48) #1 SMP Tue Jan 4 15:50:36 est 2011

[Root @ ASM server] # lsb_release-ID
Distributor ID: enterpriseenterpriseserver
Description: Enterprise Linux Server Release 5.6 (Carthage)

[Root @ ASM server] # uname-R
2.6.18-238. el5pae

7. Check whether the required RPM package is installed.
Rpm-Q binutils-2.17.50.0.6
Rpm-Q compat-libstdc ++-33-3.2.3
Rpm-Q elfutils-libelf-0.125
Rpm-Q elfutils-libelf-devel-0.125
Rpm-Q elfutils-libelf-devel-static-0.125
Rpm-Q gcc-4.1.2
Rpm-Q gcc-C ++-4.1.2
Rpm-Q glibc-2.5-24
Rpm-Q glibc-common-2.5
Rpm-Q glibc-devel-2.5
Rpm-Q glibc-headers-2.5
Rpm-Q kernel-headers-2.6.18
Rpm-Q ksh-20060214
Rpm-Q libaio-0.3.106
Rpm-Q libaio-devel-0.3.106
Rpm-Q libgcc-4.1.2
Rpm-Q libgomp-4.1.2
Rpm-Q libstdc ++-4.1.2
Rpm-Q libstdc ++ devel-4.1.2
Rpm-Q make-3.81
Rpm-Q sysstat-7.0.2
Rpm-Q unixODBC-2.2.11-7.1.i386.rpm
Rpm-Q unixODBC-devel-2.2.11-7.1.i386.rpm

8. Modify UDP/tcp Kernel Parameters
[Root @ ASM server] # Cat/proc/sys/NET/IPv4/ip_local_port_range
32768 61000
[Root @ ASM server] # echo 9000 65500>/proc/sys/NET/IPv4/ip_local_port_range

9. Modify the/etc/hosts file
VI/etc/hosts
# Do not remove the following line, or various programs
# That require Network functionality will fail.
127.0.0.1 localhost. localdomain localhost
: 1 localhost6.localdomain6 localhost6
192.168.8.160 restart.oracle.com restart
~
10. create the required directories and users and groups

Groupadd oinstall
Groupadd DBA
Groupadd rule
Groupadd asmadmin
Groupadd asmdba
Groupadd asmoper
Useradd-G oinstall-G dBA, asmdba, asmadmin, asmoper Grid
Useradd-G oinstall-G dBA, role, asmdba Oracle
Echo-N Oracle | passwd -- stdin Grid
Echo-N Oracle | passwd -- stdin Oracle

Mkdir-P/u01/11.2.0/Grid
Mkdir-P/u01/APP/Grid
Mkdir-P/u01/APP/Oracle

Chown grid: oinstall/u01/APP/Grid
Chown grid: oinstall/u01/11.2.0/Grid

Chown-r ORACLE: oinstall/u01/APP/Oracle
Chmod-r 775/u01
Chown-r grid: oinstall/u01

11. Configure Linux Kernel Parameter restrictions

Sed-I's/kernel. shmmax/# kernel. shmmax/G'/etc/sysctl. conf
Sed-I's/kernel. Shmall/# kernel. Shmall/G'/etc/sysctl. conf

Cat>/etc/sysctl. conf <EOF
FS. AIO-max-Nr = 1048576
FS. File-max = 6815744
Kernel. Shmall = 2097152
Kernel. shmmax = 4294967295
Kernel. shmmni = 4096
Kernel. SEM = 250 32000 100 128
Net. ipv4.ip _ local_port_range = 9000 65500
Net. Core. rmem_default = 262144
Net. Core. rmem_max = 4194304
Net. Core. wmem_default = 262144
Net. Core. wmem_max = 1048576
EOF

/Sbin/sysctl-P

12. Restrictions on Oracle software and grid Software Installation

Cat>/etc/security/limits. conf <EOF

Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240

Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536
Grid soft stack 10240

EOF

Cat>/etc/profile <EOF

If [\ $ user = "oracle"] | [\ $ user = "Grid"]; then
If [\ $ shell = "/bin/KSh"]; then
Ulimit-P 16384
Ulimit-N 65536
Else ulimit-u 16384-N 65536

Fi

Umask 022
Fi

#############################
Export Path = \ $ path:/u01/11.2.0/GRID/bin
# Color of grep
Alias grep = 'grep -- color = auto'
EOF

Cat>/etc/profile <EOF

Cat>/etc/profile <EOF

Export TMP =/tmp;
Export tmpdir =\$ TMP;
Export oracle_hostname = restart.oracle.com;
Export crs_base =/u01/APP/grid;
Export crs_home =/u01/11.2.0/grid;
Export nls_date_format = "YY-mm-dd hh24: MI: SS ";
Export Path = \ $ crs_home/bin: \ $ path;
# Export nls_lang = american_america.zhs16gbk;
Export nls_lang = american_america.al32utf8;
 
EOF

13. Configure grid user environment variables
Cat>/home/GRID/. bash_profile <EOF

Export TMP =/tmp;
Export tmpdir = $ TMP;
Export oracle_hostname = restart.oracle.com;
# Export oracle_sid = + ASM;
Export oracle_base =/u01/APP/grid;
Export ORACLE_HOME =/u01/11.2.0/grid;
Export nls_date_format = "YY-mm-dd hh24: MI: SS ";
Export Path = $ ORACLE_HOME/bin: $ ORACLE_HOME/opatch: $ path;
# Export nls_lang = american_america.zhs16gbk;
Export nls_lang = american_america.al32utf8;
Export display = 192.168.8.100: 0.0
 
EOF

14. Configure Oracle user environment variables
Cat>/home/Oracle/. bash_profile <EOF

Export TMP =/tmp;
Export tmpdir = $ TMP;
Export oracle_hostname = restart.oracle.com;
Export oracle_base =/u01/APP/Oracle;
Export ORACLE_HOME = $ oracle_base/product/11.2.0/db_1;
Export oracle_unqname = restart;
Export oracle_sid = restart;
Export oracle_term = xterm;
Export Path =/usr/sbin: $ path;
Export Path =/bin:/opatch:/usr/Kerberos/sbin:/usr/Kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin: /bin:/usr/sbin:/usr/bin:/u01/APP/11.2.0/GRID/bin:/root/bin;
Export Path = $ ORACLE_HOME/bin: $ path
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib;
Export classpath = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib;
Export nls_date_format = "yyyy-mm-dd hh24: MI: SS ";
# Export nls_lang = american_america.zhs16gbk;
Export nls_lang = american_america.al32utf8;
Export display = 192.168.8.100: 0.0

EOF

2. start installing grid Software

1. decompress the grid software with the grid user
[Grid @ ASM soft] $ unzip p10404530_112030_linux_3of7.zip
[Grid @ ASM grid] $ ls
Doc install readme.html response RPM runcluvfy. Sh runinstaller sshsetup stage welcome.html

[Grid @ restart grid] $./runinstaller
Starting Oracle universal installer...

Checking temp space: must be greater than 120 mb. Actual 11437 MB passed
Checking swap space: must be greater than 150 mb. Actual 4191 MB passed
Checking monitor: Must be configured to display at least 256 colors. Actual 16777216 passed
Preparing to launch Oracle universal installer from/tmp/OraInstall2013-02-08_10-59-57PM. Please wait... [grid @ restart grid] $

2. Select "Skip Software Update" on the displayed graphic interface, and click "Next"

3. There are four options in the following interface. to install and configure restart datbase, you can select "Configure Oracle grid infrastructure for a standalone server"
And "Install grid infrastructure software only"
The difference between the two lies in that the former must be supported by ASM to store OCR files, while the latter can use a file system to store OCR files.
You must also note that when configuring restart database, the grid user must belong to the DBA group.
In the previous experiment, I have configured the standalone server option. Here I choose to install only the grid software.

4. Select English and simplified Chinese

5. perform the following operations by default (ensure that the environment variables of the previous grid users are correctly set)

6. When the installation Progress reaches 94%, use the root user to execute the following two scripts in sequence:
/U01/APP/orainventory/orainstroot. Sh
/U01/11.2.0/GRID/root. Sh

[Root @ restart ~] #/U01/APP/orainventory/orainstroot. Sh
Changing permissions of/u01/APP/orainventory.
Adding read, write permissions for group.
Removing read, write, execute permissions for world.

Changing groupname of/u01/APP/orainventory to oinstall.
The execution of the script is complete.

[Root @ restart ~] #/U01/11.2.0/GRID/root. Sh
Padding Ming root user operation for Oracle 11g

The following environment variables are set:
Oracle_owner = Grid
ORACLE_HOME =/u01/11.2.0/Grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to/usr/local/bin...
Copying oraenv to/usr/local/bin...
Copying coraenv to/usr/local/bin...

Creating/etc/oratab file...
Entries will be added to the/etc/oratab file as needed
Database Configuration assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be saved med.

To configure grid infrastructure for a stand-alone server run the following command as the root user:
/U01/11.2.0/GRID/perl/bin/perl-I/u01/11.2.0/GRID/perl/lib-I/u01/11.2.0/GRID/CRS/install/u01/11.2.0 /GRID/CRS/install/roothas. PL

To configure grid infrastructure for a cluster execute the following command:
/U01/11.2.0/GRID/CRS/config. Sh
This command launches the grid infrastructure Configuration Wizard. The Wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.

7. Configure the stand-alone server according to the prompt that multiple root. Sh commands are executed.

[Root @ restart ~] #/U01/11.2.0/GRID/perl/bin/perl-I/u01/11.2.0/GRID/perl/lib-I/u01/11.2.0/GRID/CRS/install/u01/ 11.2.0/GRID/CRS/install/roothas. PL
Using configuration parameter file:/u01/11.2.0/GRID/CRS/install/crsconfig_params
Creating trace directory
User ignored prerequisites during installation
Local add Mode
Creating OCR keys for user 'grid', privgrp 'oinstall '..
Operation successful.
Local only mode
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root '..
Operation successful.
CRS-4664: node restart successfully pinned.
Adding clusterware entries to inittab

Restart 2013/02/08 23:27:59/u01/11.2.0/GRID/CDATA/restart/backup_20130208_232759.olr
Successfully configured Oracle grid infrastructure for a standalone Server

8. Check the status of stand-alone server

[Root @ restart ~] # Crsctl check has
CRS-4638: Oracle High Availability services is online
[Root @ restart ~] # Crsctl check CSS
CRS-4530: communications failure contacting cluster synchronization services daemon
[Root @ restart ~] # Crsctl check EVM
CRS-4533: event manager is online.

The stand-alone server does not have the cluster and CRS parameters. Because ASM is not configured, CSS is not started.

9. Check the OCR File
[Root @ restart ~] # Cat/etc/Oracle/OCR. Loc
Ocrconfig_loc =/u01/11.2.0/GRID/CDATA/localhost/local. OCR
Local_only = true

[Root @ restart ~] # Ocrcheck
Status of Oracle cluster registry is as follows:
Version: 3
Total Space (Kbytes): 262120
Used space (Kbytes): 152
Available space (Kbytes): 261968
ID: 1741811272
Device/File Name:/u01/11.2.0/GRID/CDATA/localhost/local. OCR
Device/file integrity check succeeded

Device/File Not Configured

Device/File Not Configured

Device/File Not Configured

Device/File Not Configured

Cluster registry integrity check succeeded

Logical upload uption check succeeded

10. After the grid software is installed, use the Oracle user to install the database software (steps are omitted. Be sure to install only the database software)

11. Use the grid user to run the netca configuration listener. The grid must belong to the DBA group before it can be executed.

12. Run dbca to create a database. The database is automatically registered to the grid software. We can use srvctl to manage the database.
When a database process is accidentally terminated or the server is restarted, the grid automatically restarts the process or database, which is completed by adding the ohasd process to the/etc/inittab file.
Note: If you use sqlplus to shut down a database instance, the restart database will not restart automatically even if it is shutdown abort.

13. Verify the high availability of the restart database after installation.

[Grid @ restart ~] $ Crsctl status resource-T
--------------------------------------------------------------------------------
Name target State server state_details
--------------------------------------------------------------------------------
Local resources
--------------------------------------------------------------------------------
Ora. listener. lsnr
Online online restart
Ora. ONS
Offline offline restart
--------------------------------------------------------------------------------
Cluster resources
--------------------------------------------------------------------------------
Ora.css d
1 offline
Ora. diskmon
1 offline
Ora. evmd
1 online restart
Ora. Prod. DB
1 online restart open

Accidental termination of listener

[Root @ restart soft] # ps-Ef | grep listener | grep-V grep
Grid 14142 1 0? 00:00:00/u01/11.2.0/GRID/bin/tnslsnr listener-inherit
[Root @ restart soft] # Kill-9 14142

[Root @ restart soft] # ps-Ef | grep listener | grep-V grep
[Root @ restart soft] # ps-Ef | grep listener | grep-V grep
[Root @ restart soft] # ps-Ef | grep listener | grep-V grep
[Root @ restart soft] # ps-Ef | grep listener | grep-V grep
[Root @ restart soft] # ps-Ef | grep listener | grep-V grep
Grid 20408 1 0 00:34? 00:00:00/u01/11.2.0/GRID/bin/tnslsnr listener-inherit

We found that after the listener process is killed, the listener will automatically restart.

Accidental termination of database Processes
[Root @ restart soft] # ps-Ef | grep pmon | grep-V grep
Oracle 16104 1 0? 00:00:00 ora_pmon_prod
[Root @ restart soft] # Kill-9 16104

[Root @ restart soft] # ps-Ef | grep pmon | grep-V grep
[Root @ restart soft] # ps-Ef | grep pmon | grep-V grep
[Root @ restart soft] # ps-Ef | grep pmon | grep-V grep
[Root @ restart soft] # ps-Ef | grep pmon | grep-V grep
[Root @ restart soft] # ps-Ef | grep pmon | grep-V grep
Oracle 20783 1 0? 00:00:00 ora_pmon_prod

In addition, we can also use the srvctl cluster management tool to manage the restart database. Of course, there are some differences with the RAC environment. Please try it by yourself

This article is original to me. If you need to reprint it, please indicate the source in the form of a link; otherwise, you will be held legally responsible.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.