oracledba.help

Oracle 12c (12.1.0.2) Database Installation: Windows

<- Legacy

Overview

What follows is the most common way to install the Oracle 12c database product on Windows for enterprise environments. Ideally you only want to install what will actually be used. This streamlines routine Oracle patches and makes your databases more secure. Removing unused components at a later date usually requires running scripts and various manual actions. Also, the removal of some components may require downtime.

Note: Once the first PSU (patch) is applied, DBCA does not call catwinbundle.sql so you have to execute this after creating each new database.

Prerequisites

  • System minimums: 2gb RAM, 10gb Disk, 64-bit supported OS.
  • Oracle requires 1ms read and 5ms average write times or better for production environments.
  • Create initial OFA directories (c:\app, c:\oradata etc.).
  • Network infrastructure readied:
    • Local hosts file has minimally an entry for this server.
    • Firewall configured (ex: port 1521 opened).
    • DNS resolving system name.
  • Download and extract installation files to your local disk.
    Example: c:\software\oracle\12.1.0.2\database

Procedure

Login as THE local Windows administrator account (not the equivalent) to perform the following steps. More info on this here.

0. If pre-existing Oracle version on system:
   a. Shutdown all the services.
   b. Change the ORACLE_HOME to the path to install.
      Ex: C:\app\oracle\product\12.1.0.2\dbhome_1 
      After install set this back if you are not ready to upgrade to 12c.

1. Run Installer
   NIX = ./runinstaller.sh
   Windows = setup.exe
2. Configure Security Updates
   Email: {DBA Email Address}
   - Set Oracle support connection parameters.
   - If behind a secure network blocked to the Internet:
     [ ] I wish to receive security updates via My Oracle Support
        [ ] Connect to Support Hub through a proxy.
        [x] I want to remain uninformed...
3. Installation Option
   (x) Install database software only
4. Grid Installation Options
   (x) Single instance database installation
5. Product Languages
   Selected Languages: {English} (use default)
6. Database Edition
   (x) Enterprise Edition
7. Oracle Home User Selection
   (x) Use Windows Built-in Account
   If prompted: Are you sure you want to continue? [Yes] 
8. Installation Location
   Oracle base:        C:\app\oracle
   Software location:  C:\app\oracle\product\12.1.0.2\dbhome_1
   Prerequisites Checked...
9. Summary
   After reviewing select: [Install]

   Product installation runs...
   - If prompted to: Add Installer to Exception? [Continue].

10. Finish
   If successful you will see: 
      The installation of Oracle Database was successful.
   Select: [Close]

Post Installation

For all that follows it is highly recommended that you set the Oracle environment at this time. If you are upgrading from an earlier version (ex: 11.2.0.3) to 12c don't set these until your maintenance window to perform the upgrade so as not to affect your production database.

Set Oracle Environment Variables

 ORACLE_BASE = C:\app\oracle
 ORACLE_HOME = C:\app\oracle\product\12.1.0.2\dbhome_1
 ORACLE_SID  = MyDB

Set Global Profile for SQLPlus

Edit $ORACLE_HOME/sqlplus/admin/glogin.sql to set common values.

ALTER SESSION SET nls_date_format = 'HH:MI:SS';
SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER _DATE> "
SET LINESIZE 240
SET PAGESIZE 9999

Install Flash Player

Oracle's new OEM Database Express requires a Flash player to be installed for each different Browser you will be using with it. OEM Database Express replaces the old dbconsole.

Copy Standard Support Files to Server

  • Scripts
  • Tools (7zip/gzip, FireFox, Notepad++, Splinterware, SQLDev etc.)

Troubleshooting

If you have issues during the install you can run it in debug mode and review the log file. Example: setup.exe -debug -loglevel finest

The logs will be in: C:\Program Files\Oracle\Inventory\logs

Windows Environments

Create Shortcuts for SQLPlus

%ORACLE_HOME%\bin\sqlplus sys/Password as sysdba       <== Direct DB Connection
%ORACLE_HOME%\bin\sqlplus sys/Password@DB01 as sysdba  <== Connection via Listener

Set Oracle SQLPATH in Registry

Using regedit:

 Navigate to Oracle:  HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_Ora12g_home1
 Set value for entry: SQLPATH
 Example value:       C:\app\scripts\sql;

Set Windows Firewalls

Windows OS firewalls can interfere with Oracle connections to the database. You can disable them using the following:

 OS> netsh advfirewall set domainprofile  state off
 OS> netsh advfirewall set privateprofile state off
 OS> netsh advfirewall set publicprofile  state off

Set Windows OS DBA Users

Add any Windows users that will need to interact with the database to the local ORA_DBA group. For Windows 2008: My Computer -> Manage -> Configuration -> Local Users and Groups -> Groups (Add)

Set Windows Pagefile

Oracle performs better on Windows systems when the pagefile (virtual OS RAM) does not keep resizing. To achieve this set the Windows pagefile minimum and maximum size to the same value. Generally RAM x 1.5 is a good starting place. If this is not set as indicated you will probably get ORA-00445 errors and corresponding loss of service in time.

Write-Caching Policy

On some Windows 200n servers if write-cache buffer flushing is on for a disk(s) I/O performance will be abominable for the given disk(s)! To fix this enable "Turn off Windows write-cache buffer flushing on the device".

 Device Manager -> Disk drives -> 
   <Manufacturer_DriveType> Disk Device -> 
     Right-click Properties -> Policies tab
       [x] Turn off Windows write-cache buffer flushing on the device

Deinstallation

  1. cd <ORACLE_HOME to Deinstall>\deinstall
  2. OS> deinstall.bat
    • If using the separate deinstall files.
      OS> deinstall -home <FullPathOfOracleHomeToDeinstall>
  3. Follow the prompts to remove Oracle from system.

Example Session Prompts:

  • Specify all Single Instance listeners that are to be de-configured [LISTENER]:
  • Specify the list of database names that are configured in this Oracle home [DB1]:
  • Specify the type of this database (1.Single Instance Database|2.Oracle Restart Enabled Database) [1]:
  • Specify the diagnostic destination location of the database [C:\app\oracle\diag\rdbms\db1]:
  • Specify the storage type used by the Database ASM|FS []: FS
  • Specify the list of directories ...[ ]:
  • Specify the fast recovery area location... [ ]:
  • Specify the database spfile location [ ]:

Do you want to continue (y - yes, n - no)? [n]: y

Process runs...

Output at end of process looks similar to this:

Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################

############# ORACLE DEINSTALL & DECONFIG TOOL END #############

        1 dir(s) moved.
        1 dir(s) moved.

Post Deinstall Actions

  • Delete any physical directories not needed.
  • Ensure all services gone (should be).
  • Ensure all registry values gone (should be).

<- Legacy