By Mouhamadou Diaw

Oracle Grid Infrastructure can be also installed on Windows server. In this blog I am explaining how this installation can be done. I am going to install an environment with to nodes. Oracle 19c is being used. We have two servers
winrac1 :
winrac2 :
with the same characteristics


I would like to note that it is just a test environment on virtual machines on VirtualBox. I did not have any dns server and I just have 1 scan address instead of 3 as recommended. Below my hosts files with the IP used

1
2
3
4
5
6
7
8
9
PS C:\Windows\System32\drivers\etc> Get-Content .\hosts | findstr 192
192.168.168.100         winrac1
192.168.168.101         winrac2
192.168.1.100           winrac1-priv
192.168.1.101           winrac2-priv
192.168.168.110         winrac1-vip
192.168.168.111         winrac2-vip
192.168.168.120         winrac-scan
PS C:\Windows\System32\drivers\etc>

The installation user can be local user or a domain user. If he is a local user he should
-be member of Administrators group
-exist on both nodes if he is a local one
-have the same password on both nodes

In my case the Administrator user was used
The oracle grid sofware WINDOWS.X64_193000_grid_home is already downloaded and unpacked to the GRID_HOME

1
C:\app\19..0.0.0\grid

The shared disks are Disk1 and Disk2 are already presented to both nodes winrac1 and winrac2

We have to disable write caching on each shared disk if supported by the system. For this right click on Disk1 for example and uncheck the Enable write caching on the device on both nodes

The next steps is to create a volume on shared disks. On the first node do following steps for all shared disks. Right click on the shared disk to create a New Simple Volume.






Once done , do a rescan disks on all other nodes


We now have to create logical partition with the shared disks

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           60 GB      0 B
* Disk 1    Online         5120 MB  5118 MB
  Disk 2    Online           32 GB    31 GB
DISKPART> select disk 1
Disk 1 is now the selected disk.
DISKPART> create partition extended
DiskPart succeeded in creating the specified partition.
DISKPART> create partition logical
DiskPart succeeded in creating the specified partition.
DISKPART>
DISKPART> select disk 2
Disk 2 is now the selected disk.
DISKPART> create partition extended
DiskPart succeeded in creating the specified partition.
DISKPART> create partition logical
DiskPart succeeded in creating the specified partition.

Do a rescan from all other nodes

Now we are going to prepare our disks to be used with ASM. For this we use the tool asmtoolg.exe. Just launch it on the first node

1
c:\app\19.0.0.0\grid\bin>c:\app\19.0.0.0\grid\bin\asmtoolg.exe





Repeat these steps for all disks you will use with ASM. You can list your labelled disks with following command

1
2
3
4
5
c:\app\19.0.0.0\grid\bin>asmtool.exe  -list
NTFS                             \Device\Harddisk0\Partition1              549M
NTFS                             \Device\Harddisk0\Partition2            60889M
ORCLDISKVOTOCR0                  \Device\Harddisk1\Partition1             5117M
ORCLDISKDATA0                    \Device\Harddisk2\Partition1            32765M

Before launching the installation, we have to set these registry values on both nodes

1
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config



And to stop the firewall on both nodes with Administrator

1
2
C:\Users\Administrator>netsh advfirewall set allprofiles state off
Ok.

Login with grid and open a terminal with as an Administrator and launch the install command

1
c:\app\19.0.0.0\grid>gridSetup.bat













As it is just a test environment, I decided to ignore the errors and to continue


The verification failed because of errors I ignored

But the installation is fine

At the end of the installation I can validate the cluster

1
2
3
4
5
6
7
8
9
10
11
12
13
14
C:\Users\Administrator>crsctl check cluster -all
**************************************************************
winrac1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
winrac2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
C:\Users\Administrator>

The status of the different resources

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
C:\Users\Administrator>crsctl status res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       winrac1                  STABLE
               ONLINE  ONLINE       winrac2                  STABLE
ora.net1.network
               ONLINE  ONLINE       winrac1                  STABLE
               ONLINE  ONLINE       winrac2                  STABLE
ora.ons
               ONLINE  ONLINE       winrac1                  STABLE
               ONLINE  ONLINE       winrac2                  STABLE
ora.proxy_advm
               OFFLINE OFFLINE      winrac1                  STABLE
               OFFLINE OFFLINE      winrac2                  STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       winrac1                  STABLE
      2        ONLINE  ONLINE       winrac2                  STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       winrac1                  STABLE
ora.VOTOCR.dg(ora.asmgroup)
      1        ONLINE  ONLINE       winrac1                  STABLE
      2        ONLINE  ONLINE       winrac2                  STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       winrac1                  Started,STABLE
      2        ONLINE  ONLINE       winrac2                  Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       winrac1                  STABLE
      2        ONLINE  ONLINE       winrac2                  STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       winrac1                  STABLE
ora.qosmserver
      1        ONLINE  ONLINE       winrac1                  STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       winrac1                  STABLE
ora.winrac1.vip
      1        ONLINE  ONLINE       winrac1                  STABLE
ora.winrac2.vip
      1        ONLINE  ONLINE       winrac2                  STABLE
--------------------------------------------------------------------------------
C:\Users\Administrator>

The voting disk

1
2
3
4
5
C:\Users\Administrator>crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   01909d45161e4f74bfad14dff099dcc0 (\\.\ORCLDISKVOTOCR0) [VOTOCR]
Located 1 voting disk(s).

The OCR

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
C:\Users\Administrator>ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          4
         Total space (kbytes)     :     491684
         Used space (kbytes)      :      84300
         Available space (kbytes) :     407384
         ID                       :  461265202
         Device/File Name         :    +VOTOCR
                                    Device/File integrity check succeeded
                                    Device/File not configured
                                    Device/File not configured
                                    Device/File not configured
                                    Device/File not configured
         Cluster registry integrity check succeeded
         Logical corruption check succeeded
C:\Users\Administrator>

Conclusion

We just see that Oracle Clusterware can be configured in a Windows environement. In coming blogs we will show how to configure database on it. But it will the same that on Linux environment