Sometimes, we want to run RAC on a single node, instead. Here is what I did to make that happen.
-- Stop the TAF service
phdb2p:/localhome/oracle$srvctl stop service -d pdb
phdb2p:/localhome/oracle$srvctl status service -d pdb
Service pdb_taf is not running.
-- Stop the instances
phdb2p:/localhome/oracle$srvctl stop db -d pdb
phdb2p:/localhome/oracle$srvctl status db -d pdb
Instance pdb1 is not running on node phdb1p
Instance pdb2 is not running on node phdb2p
-- Make sure the neighor on the same box is not affected
phdb2p:/localhome/oracle$srvctl status service -d pdba
Service pdba_taf is running on instance(s) pdba2, pdba1
phdb2p:/localhome/oracle$srvctl status db -d pdba
Instance pdba1 is running on node phdb1p
Instance pdba2 is running on node phdb2p
phdb2p:/localhome/oracle$export ORACLE_SID=pdb2
phdb2p:/localhome/oracle$sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Feb 18 09:19:07 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 4294967296 bytes
Fixed Size 2078368 bytes
Variable Size 671091040 bytes
Database Buffers 3607101440 bytes
Redo Buffers 14696448 bytes
Database mounted.
SQL> alter system set CLUSTER_DATABASE=false scope=memory;
alter system set CLUSTER_DATABASE=false scope=memory
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
SQL> create pfile='/u01/oracle/admin/pdwa/pfile/pdb2Init.ora' from spfile;
File created.
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
-- Edit the file by changing the line to "CLUSTER_DATABASE=false"
-- Then, start the instance. In this way, the instance will use the
-- original spfile for the next startup without any manual changes.
--
SQL> startup mount pfile=/u01/oracle/admin/pdb/pfile/pdb2Init.ora;
ORACLE instance started.
Total System Global Area 4294967296 bytes
Fixed Size 2078368 bytes
Variable Size 671091040 bytes
Database Buffers 3607101440 bytes
Redo Buffers 14696448 bytes
Database mounted.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination +PFRA
Oldest online log sequence 26801
Current log sequence 26802
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
pdb2
SQL> select name from v$database;
NAME
---------
PDB
SQL>
-- After that, user needs to make sure the tnsnames.ora has an
-- entry for the instance pdb2:
PDB2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = phdb2p-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb)
(INSTANCE_NAME = pdb2)
)
)
No comments:
Post a Comment