Skip to main content
Pure Technical Services

How to install Oracle Database 19c on FlashArray (Windows Server)

Currently viewing public documentation. Please login to access the full scope of documentation.

 

In this article, we will go over the steps to install Oracle Database 19c on a Windows Server. This objective is to provide an overview of the installation process with a focus on the steps needed to be carried out on the FlashArray. 

Oracle provides two storage options for the database 

  • File System
  • Automatic Storage Management (ASM in short)

This document will go through the installation process for ASM. If installing the database on the file system, then installation of the Grid Infrastructure is not required. 

For detailed configuration options and instructions for installing the Oracle Database 19c on the Windows Server, please refer to the Oracle Database 19c Installation Guide for Microsoft Windows.

Oracle Database 19c is supported on a wide range of Windows versions, starting from Windows 8.1 x64 (Pro and Enterprise Editions) all the way to the latest release - Windows Server 2019 x64. To illustrate the installation process in this article, we are using Windows Server 2019 Standard, but the process is the same for all Windows versions.  

Before beginning the installation, please go through the Oracle Database Installation Checklist and make sure all the prerequisites have been met.

The installation tasks can be performed intuitively using the GUI interface. We'll also show how various operations can be scripted and automated using PowerShell - Microsoft's powerful cross-platform task automation and configuration management framework. Pure Storage provides Pure Storage FlashArray PowerShell SDK that can be used to script and automate operations on the FlashArray. 

     

Prepare the FlashArray

Create Volumes on the FlashArray

As the FlashArray is built using solid-state technology, the design considerations that were very important for spinning disk-based storage are no longer valid. We do not have to worry about distributing I/O over multiple disks, therefore no need of making sure that tables and its indexes are on different disks. We can place our entire database on a single volume without any performance implication. One thing to keep in mind when deciding on the number of volumes to create is that performance and data reduction statistics are captured and stored at the volume level.    

In this installation, we will create six volumes for the database. Two for data/temp files, one for redo log files, one for Oracle software and two for the Flash Recovery Area.

Go to Storage -> Volumes, and click on the plus icon at the top right corner on the Volumes panel. Provide the Volume name and size and click on the Create button. Repeat this step for each volume.

clipboard_e3311d5a649f92c06c40731e9f9ed835b.png

 

Using Pure Storage PowerShell SDK, a volume can be created as follows.

 

Before we run any PowerShell commands on the FlashArray, we need to first connect to it. To connect to a Pure Storage FlashArray the New-PfaArray cmdlet is used to create a secure connection from the Windows Server to the specified FlashArray. A connection to the FlashArray is established over HTTPS using TLS 1.1/1.2.

PS C:\ > $FlashArray = New-PfaArray -EndPoint 10.0.x.x -ApiToken fbbb3xyz-b2da-0000-3d7d-xxxxxxxxxxxx

Once the session has been established,$FlashArray variable contains a reference to the FlashArray connection and can be used in the subsequent commands.

 

Now we can execute the New-PfaVolume cmdlet to create a volume.

PS C:\ > New-PfaVolume -Array $FlashArray -VolumeName 'ora-rt-win03a-data-01' -Unit T -Size 2

 

Create a Host on the FlashArray

Go to Storage->Hosts and click on the plus icon at the top right corner on the Hosts panel. The Create Host dialog will popup. Enter the name of the host that we are going to add. Note that this can be any name you think would best identify your host in the array, and does not have to be the operating system hostname. Click on Create to create a host object.

clipboard_e3fad68cee09502dff2acc6254fb0a863.png

 

Using Pure Storage PowerShell SDK, a host can be created by executing the following command. 

The host will now appear in the Hosts section. Click on the host name to go to the Host details page.

clipboard_e2a1d1fc49ba583446ba5c6d704016874.png

Click on the Menu icon at the top right corner of the Host Ports section. A drop-down menu with a list of options will appear. This is where we set up the connectivity between the FlashArray and the Host. You need to choose the configuration option depending on the type of network we are using to connect. 

In this case, we are connecting a Fibre Channel network, so we select the option to Configure WWNs.

clipboard_ec3591bb59f73ebcd18f63e1a542b938a.png

 

For an iSCSI network, one would select the option to Configure IQNs. 

For a NVME over Fabrics network, one would select the option to Configure NQNs.

 

On selecting Configure WWNs... from the menu, a dialog will be displayed with a list of available WWNs in the left pane.

 

clipboard_e857fa0df2448852c25850601737f89a8.png

 

Once the WWNs corresponding to the host are selected, they will appear in the Host Ports panel.

 

clipboard_e32c6d690df45541ced7953b0af4e16f2.png

 

We are using FC, therefore we create a host and configure WWNs using the Pure Storage PowerShell SDK.

PS C:\ > $wwn = @('21:00:00:0E:1E:1B:E8:40','21:00:00:0E:1E:1B:E8:41')
PS C:\ > $wwn
21:00:00:0E:1E:1B:E8:40
21:00:00:0E:1E:1B:E8:41
PS C:\ > New-PfaHost -Array $FlashArray -WwnList $wwn -Name sn1-r720-e03-17

 

If using iSCSI, the example shown below can be followed for creating a host and configuring IQNs using the Pure Storage PowerShell SDK.

PS C:\ > $iqn = @('iqn.1998-01.com.sample1.iscsi','iqn.1998-01.com.sample2.iscsi')
PS C:\ > $iqn
iqn.1998-01.com.sample1.iscsi
iqn.1998-01.com.sample2.iscsi
PS C:\ > New-PfaHost -Array $FlashArray -Name 'sn1-r720-e03-17' -IqnList $iqn

 

Connect Volumes to the Host

Click on the Menu icon on the Connected Volumes panel. From the drop-down menu, select Connect....

clipboard_e7009f8a0f878a01be6344ac074d29dc3.png

 

A dialog will appear that will list volumes available for connection. Select the volumes and click Connect

They will now show up in the Connected Volumes panel on the host details page as shown below.

clipboard_e22fac6260e5353b069c1dda2949691ad.png

 

PS C:\ > New-PfaHostVolumeConnection -Array $FlashArray -VolumeName 'ora-rt-win03a-data-01' -HostName 'sn1-r720-e03-17'

 

Prepare database host

Now that the FlashArray volumes have been created and connected to the host, 

Create OS Users

Create the oracle user.

PS C:\> New-LocalUser -Name oracle -NoPassword -Description "Oracle Database Software Owner"

If using ASM, we create the grid user as well.

PS C:\> New-LocalUser -Name grid -NoPassword -Description "Oracle Grid Software Owner"

Create OS Groups

PS C:\> New-LocalGroup -Name ORA_DBA

If using ASM, create the following groups

PS C:\> New-LocalGroup -Name ORA_ASMDBA
PS C:\> New-LocalGroup -Name ORA_ASMADMIN
PS C:\> New-LocalGroup -Name ORA_ASMOPER

 

Assign users to groups

Assign oracle user to the ORA_DBA group

PS C:\> Add-LocalGroupMember -Group ORA_DBA -Member Oracle

If using ASM, assign grid user to the following groups

PS C:\> Add-LocalGroupMember -Group ORA_ASMDBA -Member grid
PS C:\> Add-LocalGroupMember -Group ORA_ASMADMIN -Member grid
PS C:\> Add-LocalGroupMember -Group ORA_ASMOPER -Member grid

 

 

Setup Multipath I/O

Multipathing solutions use redundant physical path components to create multiple logical paths between the host and the FlashArray and its use is highly recommended on production systems. To setup Multipath I/O on Windows server, we need to do the following:

Install the Multipath-IO feature

Open Server Manager, click on Manage at the top right corner and then choose Add Roles and Features to bring up the wizard. If the checkbox is not checked, Multipath I/O is not installed. Check the box to install this feature. The server will be restart to complete installation. 

 

clipboard_e89cce4137a1ab2686ae88f28ab971089.png

 

Alternatively, open a Windows PowerShell session as an Administrator and run the following command to determine if Multipath-IO feature is installed. 

PS C:\> Get-WindowsFeature -Name 'Multipath-IO'

Display Name                                            Name                       Install State
------------                                            ----                       -------------
[X] Multipath I/O                                       Multipath-IO                   Available

 

If the Install State is not Installed, go ahead and install it using the following command.

PS C:\> Add-WindowsFeature -Name 'Multipath-IO'

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    Yes            SuccessRest... {Multipath I/O}
WARNING: You must restart this server to finish the installation process.

 

Setup an MPIO Device

The FlashArray needs to be setup as an MPIO Device in order to support multipathing. 

 

Open the Control Panel, and search for the MPIO app. You can also execute the command mpiocpl directly to bring up the MPIO applet.

clipboard_ef6eec999497a0bcd77946d6107c72132.png

 

Click Add to bring up the Add MPIO Support dialog box. Add Pure FlashArray to the device list. As these are fixed length character fields, there should eb 4 spaces after PURE and 6 spaces after FlashArray as shown below. 

 

clipboard_eee3bcb2a84e08287bcfe3fef3e9aade4.png

Click OK, and the server will reboot again.

 

This can be done using PowerShell as shown below.

PS C:\> New-MSDSMSupportedHw -VendorId PURE -ProductId FlashArray

VendorId ProductId
-------- ---------
PURE     FlashArray

 

We can list available MPIO Devices as follows.

PS C:\> Get-MSDSMSupportedHw

VendorId ProductId
-------- ---------
Vendor 8 Product       16
PURE     FlashArray

 

Remove default device default Vendor 8 Product 16 as it does not do anything.

PS C:\> Remove-MSDSMSupportedHw -VendorId 'Vendor*' -ProductId 'Product*'
PS C:\> Get-MSDSMSupportedHw

VendorId ProductId
-------- ---------
PURE     FlashArray

 

Configuring MPIO Timers

There are 6 MPIO Timer values that are the recommended for use with a Pure Storage FlashArray for optimal performance. See MPIO Timers for full details.

Using Windows PowerShell is the preferred method for setting the MPIO Timer values. We use the Set-MPIOSetting cmdlet which is part of the MPIO module. 

 

To check the current MPIO timer values, we use the Get-MIOPSetting cmdlet. 

PS C:\> Get-MPIOSetting

PathVerificationState     : Disabled
PathVerificationPeriod    : 30
PDORemovePeriod           : 20
RetryCount                : 3
RetryInterval             : 1
UseCustomPathRecoveryTime : Disabled
CustomPathRecoveryTime    : 40
DiskTimeoutValue          : 60

 

For PathVerificationPeriod, the default value of 30 is the recommended setting so we do not need to set that. To set the recommended values for the remaining parameters, we use the following PowerShell commands.

PS C:\> Set-MPIOSetting -NewPathRecoveryInterval 20
PS C:\> Set-MPIOSetting -CustomPathRecovery Enabled
PS C:\> Set-MPIOSetting -NewPDORemovePeriod 30
PS C:\> Set-MPIOSetting -NewDiskTimeout 60
PS C:\> Set-MPIOSetting -NewPathVerificationState Enabled

 

Configure MPIO Policy

The Multipath-IO (MPIO) Policy defines how the host distributes IOs across the available paths to the storage. There are various MPIO policies like Fail Over Only (FOO), Round Robin (RR), Least Queue Depth (LQD) and Least Blocks (LB). By default MPIO policy is set to None.

The recommended policy for the FlashArray is either Round Robin (RR) or Least Queue Depth (LQD). 

The Round Robin (RR) policy distributes IOs evenly across all Active/Optimized paths and is the best practice for most environments.

LQD is similar to RR in that IOs are distributed across all available Active/Optimized paths, however it provides some additional benefits. LQD will bias IOs towards paths that are servicing IO quicker (paths with lesser queues). In the event that one path becomes intermittently disruptive or is experiencing higher latency, LQD will prevent the utilization of that path reducing the effect of the problem path. In some situations, usually involving complex storage topologies using multiple hops between server and storage, LQD can cause some paths to be almost entirely avoided.  This reduces maximum throughput and in those environments, RR may perform better. When attempting to maximize throughput, both RR and LQD should be tested to see which MPIO policy performs best.

 

Right-click on the Disk represented by the newly connected LUNs and select Properties from the menu. In the Hardware tab, it'll display all PURE FlashArray devices. Right-click on them to open the PURE PlashArray Multi-Path Disk Device properties dialog. Next, click on the MPIO tab to view and update the MPIO policy. 

clipboard_ea900ee8bdbf792388ba49cdb2201c43a.png

 

The below PowerShell shows running the Load Balance Policy cmdlet to retrieving the current Multipath-IO Policy. On a newly installed Windows Server running Get-MSDSMLocalDefaultLoadBalancePolicy results in None because no policy has been set as Multipath-IO has just been installed. 

PS C:\Users\Administrator> Get-MSDSMGlobalDefaultLoadBalancePolicy
None

Next, we set it to the recommended value, which is RR (or LQD).

PS C:\> Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR
PS C:\> Get-MSDSMGlobalDefaultLoadBalancePolicy
RR


With this, the MPIO setup is complete.

 

If you are running an older version of the Windows Server, or would like detailed instructions, please refer to Installing Multipath I/O on Windows Server.

 

Prepare the Disks

Disk Policy a.k.a. SAN Policy

The new Disk Policy (previously known as the SAN Policy) is the policy Windows Server uses to determine whether or not disks should automatically mount that are detected as new on the host.

Run diskpart at the command prompt to enter the DISKPART utility. Use the san command as shown below to view as well as update the SAN policy.

C:\> diskpart

DISKPART> san
SAN Policy  : Offline Shared

DISKPART> san policy=onlineAll
DiskPart successfully changed the SAN policy for the current operating system.

DISKPART> san
SAN Policy  : Online All

DISKPART> automount enable
Automatic mounting of new volumes enabled.


Using PowerShell, this can be done like so.

PS C:\> Get-StorageSetting | Select-Object NewDiskPolicy

NewDiskPolicy
-------------
OfflineShared

PS C:\> Set-StorageSetting -NewDiskPolicy OnlineAll

Next, we create the primary partition for all the disks.

DISKPART> select disk 19

Disk 19 is now the selected disk.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> select disk 20

Disk 20 is now the selected disk.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> select disk 21

Disk 21 is now the selected disk.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

 

Initialize Disks

On the Windows Server, open Disk Management utility (Server Manager -> Tools -> Computer Management)

The newly added disks would show up as Offline. Right-click and select Online from the popup menu.

clipboard_e14a6e16068122b74b6852b0af37a3c5e.png

 

Next, with the disk selected, right-click to bring up the popup menu once again. Now it should show the Initialize Disk option. Select it to initialize the disk. 

clipboard_e6b10e96bfd4abc3e558a8f9026132d6c.png

 

We can also select multiple disks and initialize them at the same time as shown below. Select the GPT (GUID Partition Table) radio button.  

clipboard_e4f4e400cb8d3137a79f487a97553be25.png

 

After all newly added disks are initialized, this is how it'll look like. For ASM disks, we do not need to create a file system.

Note that we have created NTFS filesystem on the volume designated for the Grid and Database Oracle Homes and assigned it the drive letter D. 

clipboard_e6eb8fa2ceb83cc5f29e0c91fab901ee8.png

If the database is going to be on file system, then we would also create a file system on all the database disks, instead of leaving them RAW. 

 

Download software and unzip the files

Download the software media files

  • WINDOWS.X64_193000_db_home.zip
  • WINDOWS.X64_193000_grid_home.zip 

 

As the grid user, unzip the grid software zip file.

PS D:\> mkdir D:\app\oracle\product\19.0.0\grid

PS D:\> Expand-Archive -LiteralPath C:\Zipfiles\WINDOWS.X64_193000_grid_home.zip -DestinationPath D:\appx\oracle\product\19.0.0\grid

 

As the oracle user, unzip the grid software zip file.

PS D:\> mkdir D:\app\oracle\product\19.0.0\dbhome_1

PS D:\> Expand-Archive -LiteralPath C:\Zipfiles\WINDOWS.X64_193000_db_home.zip -DestinationPath D:\appx\oracle\product\19.0.0\dbhome_1

 

Install Grid Infrastructure

Run the grid installer.

PS D:\> cd \app\oracle\product\19.0.0\grid
PS D:\> setup.exe 

As we are installing a single instance database, select Configure Oracle Grid Infrastructure for a Standalone Server (Oracle Restart)

clipboard_e5fc4bc31368f90ced6ce42a8c98a920a.png

 

Enter the name of the Disk Group for database files.

Before we continue to the next wizard step, we need to stamp the Disk with ASM label. Click on Stamp Disk... button. 

clipboard_e5b003ced63ecc12a92609c2c74c54766.png

 

That brings up the asmtool wizard.

clipboard_e5fac7c5e5f0792074434c1eb848ef4d6.png

 

Select Disk and specify prefix.

clipboard_e8ed4b8a35ae70d15da9aa727ff25d245.png

 

Multiple Disks can also be selected as shown below.

clipboard_e28894f0b84385103440cc5754e2ca6bb.png

 

Edit automatically numbered labels to make the name more descriptive.

clipboard_eeb939d7c13d785a32d8fbe077eced0b8.png

clipboard_e88b5999d02e93f0479bc55d8985fcd0b.png

 

After editing all the names, click on Finish.

clipboard_ebdd7ca2332d04eaf203869bd49246fe8.png

 

Specify a Disk Group and select the disks that will make up this disk group. Select Redundancy as External as FlashArray already has redundancy built-in.

ASM Filter Driver is not supported on Windows so leave the checkbox unchecked.

clipboard_eee3a9f721846e5dca4bfbd01a7c57bb9.png

 

Specify SYSASM password

clipboard_e4ec0178d192f97a3a624a07eccc46fc6.png

 

Choose to register EM Cloud Control

clipboard_edceba148ccd6fb82b81eeaea35459472.png

 

Specify ORACLE_BASE directory

clipboard_e0246efa15fbb3bb5385c8435ef066b7a.png

 

Click Install to begin installation.

clipboard_ed4339d40d6b51085413b1c2fe39c65e9.png

 

We can verify the Oracle ASM services are installed and Running.

clipboard_ecb9037bcbc5526d05e7fd498100ea995.png

 

Create additional Disk Groups

Use ASM Configuration utility (asmca) to create additional disk groups.

PS D:\> cd \app\oracle\product\19.0.0\grid\bin
PS D:\app\oracle\product\19.0.0\grid\bin> asmca.exe 

The following screen shows the asmca Create Disk Group user interface. Here we are creating the WIN03A_FRA disk group from two ASM disks. Note that we have selected the Redundancy as External(None). The rest of the settings are default.

clipboard_eab7733bbfd879af0d0cbdfa2ba34f3a0.png

 

Test the Grid Infrastructure installation by connecting to the ASM instance and checking the status of the disk groups.

set ORACLE_HOME=D:\app\oracle\product\19.0.0\grid
set ORACLE_SID=+ASM
set PATH=%PATH%;%ORACLE_HOME%\bin

D:\> sqlplus / as sysasm

SQL> SELECT NAME, TYPE, TOTAL_MB, FREE_MB, STATE FROM V$ASM_DISKGROUP;

NAME                           TYPE     TOTAL_MB    FREE_MB STATE
------------------------------ ------ ---------- ---------- -----------
WIN03A_DATA                    EXTERN    4194264    4194136 MOUNTED
WIN03A_FRA                     EXTERN    4194264    4194148 MOUNTED
WIN03A_REDO                    EXTERN     204780     204692 MOUNTED

 

 

Install Database Software

Run the database installer.

PS D:\> cd \app\oracle\product\19.0.0\dbhome_1
PS D:\> setup.exe 

 

Select "Single instance database installation" as we are installing a single-instance database.

clipboard_e74b477c24677f725974713ab519fc6c0.png

 

Select Server class. 

clipboard_ecc0e5d1fd27f8feb979ec93da77582dd.png

 

Select Advanced install.

clipboard_efcebe68c9338f3b4ff59de8896dce6d4.png

 

Select the database edition you would like to install. 

clipboard_e052a74cd96b534da8b94ede047c8720a.png

 

Choose the appropriate Windows account, Oracle recommends Virtual Account.

clipboard_e1de688d5b68fa71a8801f7a33489294f.png

 

Specify the directory for ORACLE_BASE.

clipboard_ec1dbcb932146e2822f56a160625893eb.png

 

Select the applicable database type you would like to create

clipboard_e61f64419a156235e766468e6438b748c.png

 

Specify database name and SID. Also, you can select if you would like to create this database as a Container database.

clipboard_e81d60173290c2364467739cacfcc3dd1.png

 

Select configuration options

clipboard_e44533a8a12e48c59124c5df754755845.png

 

Select the database storage option. For this installation, we decided to use ASM.

clipboard_e41617a30d63f47106c286689fa07e2d9.png

 

Register with EM Cloud Control, if desired.

clipboard_e63eb77a1eebf23c36e2cdd35f5de96a3.png

 

Select if Recovery needs to be enabled and the storage option for the Fast Recovery Area.

clipboard_eacc709f529ae26bb44cbb229e4361b95.png

 

Select Disk Group for database

clipboard_e9e232f49463b6d8757f0c4e3df10c538.png

 

Specify SYS and SYSTEM passwords

clipboard_e97d4becc18a57bcac1d755969648e6ca.png

 

Various checks are performed

clipboard_e0874aa9474d548217ee7b1cbd6c85569.png

 

Click on Install to start the database installation.

clipboard_eaf6f77af7f8da4ff1b7483bd94430794.png

 

Once the installer completes, log into sqlplus to verify that the database has been successfully installed.

set ORACLE_HOME=D:\app\oracle\product\19.0.0\dbhome_1
set ORACLE_SID=PRD03A
set PATH=%PATH%;%ORACLE_HOME%\bin

D:\> sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Oct 30 01:52:41 2020
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
PRD03A    READ WRITE