Anda di halaman 1dari 2

[oracle@rac1 ~]$ .

oraenv
ORACLE_SID = [+ASM1] ? RACDB
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1 ~]$ srvctl config database -d RACDB
Database unique name: RACDB
Database name: RACDB
Oracle home: /u01/app/oracle/product/11.2.0.3
Oracle user: oracle
Spfile: +DATA/RACDB/spfileRACDB.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: RACDB
Database instances: RACDB1,RACDB2
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
[oracle@rac1 ~]$

[oracle@rac1 ~]$ srvctl status database -d RACDB


Instance RACDB1 is running on node rac1
Instance RACDB2 is running on node rac2
[oracle@rac1 ~]$

The V$ACTIVE_INSTANCES view can also display the current status of the instances.

[oracle@rac1 ~]$ export ORACLE_SID=RACDB1


[oracle@rac1 ~]$
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Oct 6 13:05:47 2017

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Data Mining and Real Application Testing options

SQL> SELECT inst_name FROM v$active_instances;

INST_NAME
------------------------------------------------------------
rac1.localdomain:RACDB1
rac2.localdomain:RACDB2

SQL>

- shutdown the services

[oracle@rac1 ~]$ . oraenv


ORACLE_SID = [+ASM1] ? RACDB
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1 ~]$

$ srvctl stop database -d RACDB

Shutdown the clusterware on the first node. As root user execute:


[root@rac1 Desktop]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/oracle
[root@rac1 Desktop]# crsctl stop crs
...
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac1'
has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@rac1 Desktop]#

Shutdown the clusterware on the second node. As root user execute:


[root@rac2 Desktop]# . oraenv
ORACLE_SID = [root] ? +ASM2
The Oracle base has been set to /u01/app/oracle
[root@rac2 Desktop]# crsctl stop crs
...
RS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac2'
has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@rac2 Desktop]#

Shutdown both virtual machines. Wait until all VM windows are closed.

=============================

How to Start 11g R2 RAC Cluster

Run the below command on


each node. Starts both HAS and CRS

#crsctl start crs

Noticed that just starting has also starts up the


whole stack.

$srvctl start database -d RACDB

[oracle@rac1 ~]$ . oraenv


ORACLE_SID = [oracle] ? +RACDB
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/11.2.0.3
The Oracle base has been set to /u01/app/oracle
[oracle@rac1 ~]$ srvctl start database -d RACDB

Anda mungkin juga menyukai