We are going to create an environment to have an Oracle database in Failover Cluster Manager.
To have this, we need 3 Windows Servers ( 1 Working as controller)
Server Name | Public IP: | Private IP: | ORACLE_HOME |
win-rac1 | 192.168.56.151 | 192.168.10.151 | C:\oracle\app\product\12.1.0\dbhome_1 |
win-rac2 | 192.168.56.152 | 192.168.10.152 | C:\oracle\app\product\12.1.0\dbhome_1 |
win-rac-control | 192.168.56.153 | 192.168.10.153 |
For how to install Windows VM’s here (in progress)
Oracle Software location: C:\SOFTWARE\12c
STEPS:
1:- Create Cluster on WIN-RAC-CONTROL (Failover Cluster Manager -> Management -> CreateCluster):
2:- Create ROLE(Role -> Rick click -> Create Empty Role):
3:- Edit Role Properties (New Role -> Right Click -> Properties) and set preferred node:
4:- Add Access point to Role (New Role -> Add Resource -> Client Access point):
5:- Enable iSCSI feature on Domain Controller WIN-RAC-CONTROL:
ServerManager -> Manage -> Add Roles and Features -> Server Roles -> iSCSI Target Server
6:- Add Disk to the VM (if needed):
7:- Format disk: (open “Create and Format hard disk partitions”)
8:- Create SCSI Disk:
ServerManager -> Dashboard -> File and Storage Services -> iSCSI -> Wizard:
9:- Discover SCSI disk (on all 3 servers)
Control Panel -> System and Security – > Administrative Tools -> iSCSI Initiator-> Discovery
10:- On WIN-RAC1: Only!
Computer Management -> Disk Management -> Online -> New Simple Volume
11:- Add disk to Failover Cluster Manager:
Disks – Add Disks
12:- Move Role to other node to make sure no issues:
Right Click -> Move – Select Node
13: – Create a account ORAUSER on Domain Controler:
14:- Install Oracle Software on WIN-RAC1 / WIN-RAC2:
C:\SOFTWARE\12c\database\setup.exe
15:- Open Database Configuration Assistant to create a DB:
16:- Copy SPFILE and Password files to WIN-RAC2:
From WIN-RAC1:
C:\oracle\app\product\12.1.0\dbhome_1\database\PWDDBPROD.ora
C:\oracle\app\product\12.1.0\dbhome_1\database\SPFILEDBPROD.ORA
To WIN-RAC2:
C:\oracle\app\product\12.1.0\dbhome_1\database\PWDDBPROD.ora
C:\oracle\app\product\12.1.0\dbhome_1\database\SPFILEDBPROD.ORA
17:- Create SERVICE on WIN-RAC2:
open CMD (command promt) and set env variables:
set ORALCE_HOME=C:\oracle\app\product\12.1.0\dbhome_1
set ORACLE_SID=DBPROD
set PATH=%ORACLE_HOME%\bin;%PATH%
set TNS_ADMIN=%ORACLE_HOME%\NETWORK\ADMIN\tnsnames.ora
Create DBPROD instance on WIN-RAC2L
oradim -new -sid DBPROD -startmode auto -spfile
18:- Create Listener on WIN-RAC2:
19:- Stop Listener and DB service on WIN-RAC2:
OracleOraDB12Home1TNSListenerDBPROD
OracleServiceDBPROD
20:- Add Listener and DB services to Failover Cluster Manager:
OracleOraDB12Home1TNSListenerDBPROD
OracleServiceDBPROD
Repeat the same for DB service:
21:- Edit Listener and DB dependencies on Failover Cluster Manager:
Add ACCESSPOINT & Cluster Disk 1 to both Listener and DB service
That’s it! we managed to create an ACTIVE/PASSIVE environment in Failover Cluster Manager!
Comments
Thanks for your tuto. i deployed the same configuration, but when i change node , the database not available, listener and service are good. can you help me?
Check registry and make sure variable ORA_DBNAME_AUTOSTART is set to true, without this, resource on Failover Cluster Manager will appear in GREEN but actually, db do not start
Yes failover cluster Manager appear in green, but only db not start
Good morning, should point 15 only be done on rack1?
Thanks for checking this guide. Yes, it is only on server 1, in fact the steps after are to copy config created to the other server
Hi , Thank you for wonderfull article i have one question if the Active instance goes down do we need to startup database service in standby node or it will autometically start
it should automatically fail over to the other side.