Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation Oracle11gR2 RAC One Node-Test one

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Chapter VI, testing

6.1 View rac one node information

Node 1

Grid@node1:~ > srvctl config database-d ORACLE

Database unique name: ORACLE

Database name: ORACLE

Oracle home: / u01/app/oracle/product/11.2.0/dbhome_1

Oracle user: oracle

Spfile: + DATA/ORACLE/spfileORACLE.ora

Domain:

Start options: open

Stop options: immediate

Database role:PRIMARY

Management policy: AUTOMATIC

Server pools: ORACLE

Database instances:

Disk Groups: DATA,FRA

Mount point paths:

Services: ORACLESER

Type: RACOneNode

Online relocation timeout: 30

Instance name prefix: ORACLE

Candidate servers:node1,node2

Database is administrator managed

Grid@node1:~ > crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.FRA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.LISTENER.lsnr

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.OCR_VOTE.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.asm

ONLINE ONLINE node1 Started

ONLINE ONLINE node2 Started

Ora.gsd

OFFLINEOFFLINE node1

OFFLINEOFFLINE node2

Ora.net1.network

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.ons

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.registry.acfs

ONLINE ONLINE node1

ONLINE ONLINE node2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE node2

Ora.cvu

1 ONLINE ONLINE node2

Ora.node1.vip

1 ONLINE ONLINE node1

Ora.node2.vip

1 ONLINE ONLINE node2

Ora.oc4j

1 ONLINE ONLINE node2

Ora.oracle.db

1 ONLINE ONLINE node1 Open

Ora.oracle.oracleser.svc

1 ONLINE ONLINE node1

Ora.scan1.vip

1 ONLINE ONLINE node2

Grid@node1:~ > srvctl status database-d ORACLE

Instance ORACLE_1 is running on node node1

Online relocation: INACTIVE

Grid@node1:~ >

Oracle@node1:~ > sqlplus / nolog

SQL*Plus: Release 11.2.0.4.0 Production on Mon May 25 18:01:492015

Copyright (c) 1982, 2013, Oracle. All rights reserved.

SQL > conn / as sysdba

Connected.

SQL > show parameter cluster_database

NAME TYPE VALUE

Cluster_database boolean TRUE

Cluster_database_instances integer 2

SQL > show parameter name

NAME TYPE VALUE

Cell_offloadgroup_name string

Db_file_name_convert string

Db_name string ORACLE

Db_unique_name string ORACLE

Global_names boolean FALSE

Instance_name string ORACLE_1

Lock_name_space string

Log_file_name_convert string

Processor_group_name string

Service_names string ORACLESER

SQL >

Node 2

Grid@node2:~ > srvctl config database-d ORACLE

Database unique name: ORACLE

Database name: ORACLE

Oracle home: / u01/app/oracle/product/11.2.0/dbhome_1

Oracle user: oracle

Spfile: + DATA/ORACLE/spfileORACLE.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: ORACLE

Database instances:

Disk Groups: DATA,FRA

Mount point paths:

Services: ORACLESER

Type: RACOneNode

Online relocation timeout: 30

Instance name prefix: ORACLE

Candidate servers:node1,node2

Database is administrator managed

Grid@node2:~ > crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.FRA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.LISTENER.lsnr

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.OCR_VOTE.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.asm

ONLINE ONLINE node1 Started

ONLINE ONLINE node2 Started

Ora.gsd

OFFLINEOFFLINE node1

OFFLINEOFFLINE node2

Ora.net1.network

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.ons

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.registry.acfs

ONLINE ONLINE node1

ONLINE ONLINE node2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE node2

Ora.cvu

1 ONLINE ONLINE node2

Ora.node1.vip

1 ONLINE ONLINE node1

Ora.node2.vip

1 ONLINE ONLINE node2

Ora.oc4j

1 ONLINE ONLINE node2

Ora.oracle.db

1 ONLINE ONLINE node1 Open

Ora.oracle.oracleser.svc

1 ONLINE ONLINE node1

Ora.scan1.vip

1 ONLINE ONLINE node2

Grid@node2:~ > srvctl status database-d ORACLE

Instance ORACLE_1 is running on node node1

Online relocation: INACTIVE

Grid@node2:~ >

At this point, the instance ORACLE_1 runs on node 1.

6.2 Kill Pmon

Kill the pmon process on node 1 to view the database status.

Node1:~ # ps-ef | grep pmon

Grid 4452 1 0 17:56? 00:00:00asm_pmon_+ASM1

Oracle 5282 1 0 17:57? 00:00:00ora_pmon_ORACLE_1

Root 6741 4259 0 18:03 pts/0 00:00:00 greppmon

Node1:~ # kill-9 5282

Node1:~ # su-grid

Grid@node1:~ > crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.FRA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.LISTENER.lsnr

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.OCR_VOTE.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.asm

ONLINE ONLINE node1 Started

ONLINE ONLINE node2 Started

Ora.gsd

OFFLINEOFFLINE node1

OFFLINEOFFLINE node2

Ora.net1.network

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.ons

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.registry.acfs

ONLINE ONLINE node1

ONLINE ONLINE node2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE node2

Ora.cvu

1 ONLINE ONLINE node2

Ora.node1.vip

1 ONLINE ONLINE node1

Ora.node2.vip

1 ONLINE ONLINE node2

Ora.oc4j

1 ONLINE ONLINE node2

Ora.oracle.db

1 ONLINE OFFLINE Abnormal Terminatio

N,CLEANING

Ora.oracle.oracleser.svc

1 ONLINE OFFLINE

Ora.scan1.vip

1 ONLINE ONLINE node2

Grid@node1:~ >

Wait a minute to check again.

Grid@node1:~ > crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.FRA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.LISTENER.lsnr

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.OCR_VOTE.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.asm

ONLINE ONLINE node1 Started

ONLINE ONLINE node2 Started

Ora.gsd

OFFLINEOFFLINE node1

OFFLINEOFFLINE node2

Ora.net1.network

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.ons

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.registry.acfs

ONLINE ONLINE node1

ONLINE ONLINE node2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE node2

Ora.cvu

1 ONLINE ONLINE node2

Ora.node1.vip

1 ONLINE ONLINE node1

Ora.node2.vip

1 ONLINE ONLINE node2

Ora.oc4j

1 ONLINE ONLINE node2

Ora.oracle.db

1 ONLINE ONLINE node1 Open

Ora.oracle.oracleser.svc

1 ONLINE ONLINE node1

Ora.scan1.vip

1 ONLINE ONLINE node2

Grid@node1:~ >

After killing the PMON process, no switching occurs and the process will be restarted locally.

6.3 Relocate database

Node1:/u01/app/11.2.0/grid/bin #. / srvctl relocate database-dORACLE-n node2

Grid@node1:~ > srvctl status database-d oracle

Instance ORACLE_1is running on node node1

Online relocation:ACTIVE

Source instance:ORACLE_1 on node1

Destinationinstance: ORACLE_2 on node2

Grid@node1:~ > crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.FRA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.LISTENER.lsnr

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.OCR_VOTE.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.asm

ONLINE ONLINE node1 Started

ONLINE ONLINE node2 Started

Ora.gsd

OFFLINE OFFLINE node1

OFFLINEOFFLINE node2

Ora.net1.network

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.ons

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.registry.acfs

ONLINE ONLINE node1

ONLINE ONLINE node2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE node2

Ora.cvu

1 ONLINE ONLINE node2

Ora.node1.vip

1 ONLINE ONLINE node1

Ora.node2.vip

1 ONLINE ONLINE node2

Ora.oc4j

1 ONLINE ONLINE node2

Ora.oracle.db

1 ONLINE ONLINE node1 Open

2 ONLINE OFFLINE STARTING

Ora.oracle.oracleser.svc

1 ONLINE ONLINE node1

Ora.scan1.vip

1 ONLINE ONLINE node2

Check again

Grid@node1:~ > crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.FRA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.LISTENER.lsnr

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.OCR_VOTE.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.asm

ONLINE ONLINE node1 Started

ONLINE ONLINE node2 Started

Ora.gsd

OFFLINEOFFLINE node1

OFFLINEOFFLINE node2

Ora.net1.network

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.ons

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.registry.acfs

ONLINE ONLINE node1

ONLINE ONLINE node2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE node2

Ora.cvu

1 ONLINE ONLINE node2

Ora.node1.vip

1 ONLINE ONLINE node1

Ora.node2.vip

1 ONLINE ONLINE node2

Ora.oc4j

1 ONLINE ONLINE node2

Ora.oracle.db

1 ONLINE ONLINE node1 Open

2 ONLINE OFFLINE STARTING

Ora.oracle.oracleser.svc

1 ONLINE ONLINE node1

Ora.scan1.vip

1 ONLINE ONLINE node2

Check again

Grid@node1:~ > crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.FRA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.LISTENER.lsnr

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.OCR_VOTE.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.asm

ONLINE ONLINE node1 Started

ONLINE ONLINE node2 Started

Ora.gsd

OFFLINEOFFLINE node1

OFFLINEOFFLINE node2

Ora.net1.network

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.ons

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.registry.acfs

ONLINE ONLINE node1

ONLINE ONLINE node2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE node2

Ora.cvu

1 ONLINE ONLINE node2

Ora.node1.vip

1 ONLINE ONLINE node1

Ora.node2.vip

1 ONLINE ONLINE node2

Ora.oc4j

1 ONLINE ONLINE node2

Ora.oracle.db

1 OFFLINE ONLINE node1 Open,STOPPING

2 ONLINE ONLINE node2 Open

Ora.oracle.oracleser.svc

1 ONLINE ONLINE node2

Ora.scan1.vip

1 ONLINE ONLINE node2

Check again

Grid@node1:~ > crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.FRA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.LISTENER.lsnr

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.OCR_VOTE.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.asm

ONLINE ONLINE node1 Started

ONLINE ONLINE node2 Started

Ora.gsd

OFFLINEOFFLINE node1

OFFLINEOFFLINE node2

Ora.net1.network

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.ons

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.registry.acfs

ONLINE ONLINE node1

ONLINE ONLINE node2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE node2

Ora.cvu

1 ONLINE ONLINE node2

Ora.node1.vip

1 ONLINE ONLINE node1

Ora.node2.vip

1 ONLINE ONLINE node2

Ora.oc4j

1 ONLINE ONLINE node2

Ora.oracle.db

2 ONLINE ONLINE node2 Open

Ora.oracle.oracleser.svc

1 ONLINE ONLINE node2

Ora.scan1.vip

1 ONLINE ONLINE node2

Grid@node1:~ >

View in Node 2 at this time

Grid@node2:~ > srvctl config database-d ORACLE

HDatabase unique name: ORACLE

Database name: ORACLE

Oracle home: / u01/app/oracle/product/11.2.0/dbhome_1

Oracle user: oracle

Spfile: + DATA/ORACLE/spfileORACLE.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: ORACLE

Database instances:

Disk Groups: DATA,FRA

Mount point paths:

Services: ORACLESER

Type: RACOneNode

Online relocation timeout: 30

Instance name prefix: ORACLE

Candidate servers: node1,node2

Database is administrator managed

Grid@node2:~ > srvctl status database-d ORACLE

Instance ORACLE_2is running on node node2

Online relocation:INACTIVE

Grid@node2:~ > crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.FRA.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.LISTENER.lsnr

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.OCR_VOTE.dg

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.asm

ONLINE ONLINE node1 Started

ONLINE ONLINE node2 Started

Ora.gsd

OFFLINE OFFLINE node1

OFFLINEOFFLINE node2

Ora.net1.network

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.ons

ONLINE ONLINE node1

ONLINE ONLINE node2

Ora.registry.acfs

ONLINE ONLINE node1

ONLINE ONLINE node2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE node2

Ora.cvu

1 ONLINE ONLINE node2

Ora.node1.vip

1 ONLINE ONLINE node1

Ora.node2.vip

1 ONLINE ONLINE node2

Ora.oc4j

1 ONLINE ONLINE node2

Ora.oracle.db

2 ONLINE ONLINE node2 Open

Ora.oracle.oracleser.svc

1 ONLINE ONLINE node2

Ora.scan1.vip

1 ONLINE ONLINE node2

Grid@node2:~ >

After the switch occurs, the instance ORACLE_1 becomes ORACLE_2 running on node 2.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report