Oracle cluster (RAC) startup and shutdown ____oracle

Source: Internet
Author: User

Oracle Cluster (RAC) startup and shutdown

The following points need to be noted when Oracle RAC starts and shuts down:

First, check the shared device

Second, automatically start RAC and check related processes

Third, manually start RAC

In the start-up process, it is best to detect CRS, ASM, and database logs.

First, check the shared device

In general, OCFS2 or RAW, which holds OCR and voting Disk, is automatically started. If they do not start, the RAC is certainly not going to start.

1.1 If using OCFS2, check the OCFS2 status

/ETC/INIT.D/O2CB status

Before mount,/ETC/INIT.D/O2CB status is displayed as checking O2CB heartbeat:not active.

Before you format and mount a file system, verify that O2CB is online on two nodes; O2CB Heartbeat not currently

Activity because the file system is not yet mounted. Mounts become active after they are mounted.

Mount-t Ocfs2-o DATAVOLUME/DEV/SDB1/U02/ORADATA/ORCL

1,2. If you use raw device.

[Root@raw1 ~]# cd/dev/raw/

[ROOT@RAW1 raw]# ls

RAW1 RAW2

Or:

[Root@raw1 init.d]#/etc/init.d/rawdevices Status

/dev/raw/raw1:bound to Major 8, minor 17

/dev/raw/raw2:bound to Major 8, minor 18

1.3. Check ASM

/etc/init.d/oracleasm Listdisks

Second, automatically start RAC and check related processes

When the RAC starts, processes such as CRS are started automatically:

[Root@rac1 init.d]# ls-l/etc/init.d/init.*

-r-xr-xr-x 1 root root 1951 Feb 22:38/etc/init.d/init.crs

-r-xr-xr-x 1 root root 4714 Feb 22:38/ETC/INIT.D/INIT.CRSD

-r-xr-xr-x 1 root root 35394 Feb 22:38/ETC/INIT.D/INIT.CSSD

-r-xr-xr-x 1 root root 3190 Feb 22:38/ETC/INIT.D/INIT.EVMD

We want to look at the status of CRS:

Normally, processes are online:

[Root@raw1 bin]#./crs_stat-t

Name Type Target State Host

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

Ora.raw.db Application Online Online RAW1

Ora.raw.raw.cs Application Online Online RAW1

ORA....AW1.SRV Application Online Online RAW1

ORA....AW2.SRV Application Online Online raw2

Ora....w1.inst Application Online Online RAW1

Ora....w2.inst Application Online Online raw2

Ora ..... Sm1.asm Application Online Online RAW1

Ora ..... W1.lsnr Application Online Online RAW1

ORA.RAW1.GSD Application Online Online RAW1

Ora.raw1.ons Application Online Online RAW1

ORA.RAW1.VIP Application Online Online RAW1

Ora ..... Sm2.asm Application Online Online raw2

Ora ..... W2.lsnr Application Online Online raw2

ORA.RAW2.GSD Application Online Online raw2

Ora.raw2.ons Application Online Online raw2

ORA.RAW2.VIP Application Online Online raw2

If the following conditions occur:

[Root@rac2 bin]#./crs_stat-t

Name Type Target State Host

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

ORA.RAC.DB Application ONLINE UNKNOWN Rac1

Ora....orcl.cs Application ONLINE UNKNOWN Rac1

ORA....AC1.SRV Application OFFLINE OFFLINE

ORA....AC2.SRV Application OFFLINE OFFLINE

Ora....c1.inst Application ONLINE UNKNOWN Rac1

Ora....c2.inst Application ONLINE UNKNOWN RAC2

Ora ..... Sm1.asm Application Online Online Rac1

Ora ..... C1.lsnr Application ONLINE UNKNOWN Rac1

ORA.RAC1.GSD Application ONLINE UNKNOWN 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 UNKNOWN RAC2

ORA.RAC2.GSD Application ONLINE UNKNOWN RAC2

Ora.rac2.ons Application Online Online RAC2

ORA.RAC2.VIP Application Online Online RAC2

Workaround:

1. View all process information with Crs_stat:

[Root@rac2 bin]#./crs_stat

Name=ora.rac.db

Type=application

Target=online

State=online on RAC2

Name=ora.rac1.listener_rac1.lsnr

Type=application

Target=online

State=unknown on Rac1

Name=ora.rac1.gsd

Type=application

Target=online

State=unknown on Rac1

Name=ora.rac2.listener_rac2.lsnr

Type=application

Target=online

State=unknown on RAC2

... ...

2. For the offline process, we can manually launch it directly

[Root@rac2 bin]#./crs_start ora.rac.orcl.rac1.srv

Attempting to start ' ora.rac.orcl.rac1.srv ' ' Rac1 '

Start of ' ora.rac.orcl.rac1.srv ' on ' Rac1 ' succeeded.

3. For the unknown process, we can stop it first, at start.

[Root@rac2 bin]#./crs_stop ORA.RAC2.GSD

Attempting to stop ' ora.rac2.gsd ' ' Rac2 '

Stop ' Ora.rac2.gsd ' on ' Rac2 ' succeeded.

[Root@rac2 bin]#./crs_start ORA.RAC2.GSD

Attempting to start ' ora.rac2.gsd ' ' Rac2 '

Start of ' ora.rac2.gsd ' on ' Rac2 ' succeeded.

4. If crs_stop cannot be completed, Crs_start cannot start the process, we have 2 methods to solve:

4.1) is to use the Crs_stop-f parameter to turn off the unknown service in CRS and then start all services with Crs_start-f (plus a-f parameter). To be executed on two nodes respectively;

[Oracle@rac2 ~]$ crs_start-f Ora.ora9i.ora9i2.inst

Attempting to start ' ora.ora9i.ora9i2.inst ' ' Rac2 '

Start of ' ora.ora9i.ora9i2.inst ' on ' Rac2 ' succeeded.

[Oracle@rac2 ~]$ crs_stop-f ora.ora9i.db

Attempting to stop ' ora.ora9i.db ' ' Rac2 '

Stop ' ora.ora9i.db ' on ' Rac2 ' succeeded.

4.2 Convert to root with/etc/init.d/init.crs stop first disable CRS, then use/ETC/INIT.D/INIT.CRS start to enable CRS, and when CRS is enabled, a series of services for CRS will automatically start. Note that this method needs to be performed on both nodes;

5. You can use the command to start and close related processes at once

[Root@rac2 bin]#./crs_stop-all

[Root@rac2 bin]#./crs_start-all

Third, manually start RAC

In general, all services start automatically every time the node is started, and if you need to shut down or start a node, as shown below

Stop RAC:

Emctl Stop Dbconsole

Srvctl Stop instance-d raw-i raw1

Srvctl Stop instance-d raw-i raw2

Srvctl Stop Asm-n RAW1

Srvctl Stop Asm-n RAW2

Srvctl Stop Nodeapps-n RAW1

Srvctl Stop Nodeapps-n RAW2

Start RAC:

Just the opposite of the steps above

Srvctl Start Nodeapps-n raw1

Srvctl Start Nodeapps-n raw2

Srvctl Start Asm-n raw1

Srvctl Start Asm-n raw2

Srvctl Start instance-d raw-i raw2

Srvctl Start instance-d orcl-i raw1

Emctl Start Dbconsole

Use SRVCTL to start/stop all instances and their enabled services.

Srvctl Start database-d ORCL

Srvctl Stop database-d ORCL

Note: CRS Resource includes GSD (Global serveice Daemon), ONS (Oracle Notification service), VIP, Database, Instance, and Service. These resources are divided into 2 categories:

Gsd,ons,vip and Listener belong to Noteapps class

Database,instance and service belong to Database-related Resource class.

In the process of start-up, it is best to detect the log of CRS, ASM and database:

CRS LOG:

[Oracle@rac1 ~]$ tail-f/u01/app/oracle/product/10.2.0/crs_1/log/rac1/alertrac1.log

[Oracle@rac2 ~]$ tail-f/u01/app/oracle/product/10.2.0/crs_1/log/rac2/alertrac2.log

ASM LOG:

[Oracle@rac1 ~]$ tail-f/u01/app/oracle/admin/+asm/bdump/alert_+asm1.log

[Oracle@rac2 ~]$ tail-f/u01/app/oracle/admin/+asm/bdump/alert_+asm2.log

Database log:

[Oracle@rac1 ~]$ tail-f/u01/app/oracle/admin/ora9i/bdump/alert_ora9i1.log

[Oracle@rac2 ~]$ tail-f/u01/app/oracle/admin/ora9i/bdump/alert_ora9i2.log

Note: The tail-f command can be used to monitor the growth of files being written by another process.

Related Article

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.