1.1 Operating Systems
A 64-bit Linux version of Oracle will not install on a 32-bit Linux or Windows 64-bit system, for example. The Oracle release notes provide information about where to find the compatibility matrix and the system requirements for the server.
hardware requirements (minimum values)

The disk space requirements depend on the components installed, but the base product alone does require more disk space for 64-bit operating systems. You can use the following command-line option to run the installer with parameters to perform just the system prerequisites checks, without continuing to install Oracle:
E:\Oracle11gR2\database> setup.exe –executeSysPrereqs
The results can be viewed in the prerequisite_results.xml file, which will be in the oraInventory/logs directory.

Go for this in-depth job-oriented Oracle DBA Training Course now!

  • Windows Setup

There are advantages to installing Oracle on the Windows platform. One is that as a SQL Server administrator, you are already working with a Windows system. Another is that some tasks that must be done manually on the Linux platform are taken care of automatically on Windows. For example, the environment variables are set up for you, and Windows handles the startup and shutdown of services.

  1. Oracle Homes

 SQL Server tends to have a default location for the binaries, and Oracle will set up a default as well: the Oracle home directory. This directory location can be set during the installation process, or it can be specified by setting the ORACLE_HOME environment variable before running the installer.
Although the environment variables are set by the Oracle installer for Windows, there might be more than one Oracle home on a server. If this is the case, when using a command line, you will need to set the variable ORACLE_HOME first, or fully qualify the path to the correct Oracle home.
C:\> set ORACLE_HOME=d:\oracle\product\11.2.0\db_1
C:\> set ORACLE_SID=orcl
C:\> sqlplus

  1. User Account for Installation

The installer creates the ORA_DBA group automatically on the Windows platform. A standard practice with SQL Server is to create another user that has administrator privileges to install the software and be the owner of the SQL Server services.
By default, the Oracle services will use the Local Service account. By having a separate domain account to manage these services and perform the installation.

  1. File System

The database software should be installed on the NTFS file system because of the security available for the Oracle home directory, which will contain trace files and database files.

  1. Network Connectivity

The database is not really meant to be a stand-alone machine, it needs network connectivity. Clustering will have different requirements, but the database server needs to have a primary IP address that is accessible (it doesn’t need to be a static IP unless your environment requires that).

If you are using a dynamic configuration (DHCP), a test conducted during the Oracle installer’s prerequisite check will fail if Microsoft Loopback Adapter is not the primary network adapter on the system. Here is a quick check for this adapter:

C:\> ipconfig /all
Ethernet adapter Local Area Connection 2:
Connection-specific DBS Suffix . . . . :
Description . . . . . . . . . . . . . .: Microsoft Loopback Adapter
Physical Address . . . . . . . . . . . : 7A-80-4C-9F-57-5D
DHCP Enabled . . . . . . . . . . .. . .: Yes
Autoconfiguration Enabled . . . . . . .: Yes

If Microsoft Loopback Adapter is not configured, you can set it up through Add/Remove Hardware in the Control Panel. Select Network Adapters, and add it as a new network adapter.

  1. Windows Platform Checklist:-

 For Windows installations:
■ Check that the operating system version and Oracle version and edition are correct.
■ Verify that the hardware requirements are met.
■ Create an Oracle account with administrator permissions to perform the installation.
■ Run the prerequisite check and correct any issues found.

  • Linux/Unix Commands

 The following are some other useful Linux commands:
pwd Shows the current directory.
echo $ORACLE_HOME Shows the value of the variable.
whoami Shows the current user.
ps -ef Shows the list of current processes running on the server.
■ grep searches for a name or value in a file or list or process.
chmod Changes permissions for a file or directory.
chgrp Changes the group for permissions of a file or directory.
chown Changes the owner of a file or directory.

command-line commands in windows and linux

The manual pages (man pages) provide parameter options and examples of how to use the commands. To access the man page for a command, just type a man and the command at the prompt, as in this example:
> man grep
When you download files for a Linux system, such as patches or software, they might come in a couple of formats, with filenames ending in .Z, .gz, .zip, .cpio, or .tar. These are compressed files. You’ll need to uncompress these files so that they are usable. The following are sample commands to uncompress the various formats:

> uncompress *.Z
> unzip *.zip
> gunzip *.gz
> tar -xvf file.tar
> cpio -idmv < file_name

 

  • Linux Setup

 For a Linux system, you need to set up users, adjust permissions and kernel parameters, and make sure the required packages are installed.

Wish to get certified in Oracle DBA! Learn Oracle DBA from top Oracle DBA experts and excel in your career with intellipaat’s Oracle DBA certification!

 

  1. Users and Groups

Although you can install Oracle and own the services for Oracle as the administrator on the server, this is not recommended, particularly for Linux systems, where the administrator account is the root account.
You should create a user and group for the Oracle installation. The Oracle processes will also run under this user. Additionally, if you will be installing certain Oracle components, such as Automatic Storage Management and Clusterware, you should create separate users and groups to own the different pieces of software.
The following example demonstrates creating the oinstall (Oracle installation), dba (database administrator), asmdba (Automatic Storage Management administrator), and crs (Clusterware) groups:

# /usr/sbin/groupadd g 501 oinstall
# /usr/sbin/groupadd g 502 dba
# /usr/sbin/groupadd g 504 asmdba
# /usr/sbin/groupadd g 505 crs

The users for this example are added as follows:

# /usr/sbin/useradd u 502 g oinstall G dba oracle
# /usr/sbin/useradd u 503 g oinstall G asmdba osasm
# /usr/sbin/useradd u 504 g oinstall G crs crs

linux user manager

2. Required Packages
 The Oracle installation guide lists the required packages for the various Linux flavors. Some of the packages will already exist on your system, since they are included in the Linux installation. You should verify that they were installed by using the command rpm –q package_name. You will need to install any of the required packages that have not been installed by default.

3. Kernel Parameters
You may need to adjust the kernel parameters if your Oracle system will have high memory needs. Kernel parameters are in the /etc/sysctl.conf file, which can be edited to make the necessary modifications.
kernel.shmall = physical RAM size / pagesize
kernel.shmmax = ½ of physical RAM, but < 4GB
kernel.shmmni =4096
kernel.sem = 250 32000 100 128
fs.file-max = 512 x processes
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.mem_max = 4194304
net.core.wmem_default = 262144
net.core_wmem_max = 1048576

After this file is edited, you must activate the changes by running the following at the command prompt as root:

sysctl –p

Use the following command to view the current settings for a kernel parameter:

 > /sbin/sysctl -a | grep <param-name>

 
1.2 Storage Requirements
There are many storage options available with hardware, configurations, and file systems, and with new hardware developments. In designing the storage layout, striping and mirroring play a definite part. The databases need to be highly available, and the users will always be happier with faster access, so building in fault-tolerant systems at the storage level is a necessity.

  • Disk Storage

To set up storage for a particular system properly, the DBA needs to understand the different pieces: files, I/O events, and backups. You need to know which are typical events for databases and which are not, and which databases are heavy on read and writes of the disk, and how each of these can affect the disk storage needed.
Under Windows, you would at least hope for two additional drives besides the C: drive. For example, you might set up disk storage on Windows as follows:

D:\oracle Base directory for software and server logs
■ D:\oradata For datafiles and one control file
■ E:\orabackup For backups
■ E:\oraarch For archive logs
■ E:\oraexp For data dump files and exports
■ E:\oradata Another location for control files

Under Linux, you might set up your disk storage as follows (/u0n is a typical naming convention):

/u01/oracle Base directory for software, server logs, and control files
■ /u02/oracle/SID For exports, archives, backups, and control files
■ /u03/oracle/SID For datafiles (numbers can continue to increase) and control files

Alternatively, you could use another naming convention such as /ora0n, and this type of setup:

/ora01/oracle Base directory for software
■ /ora01/SID For datafiles and control files
■ /ora02 and subdirectories For export, backups, control files, and so on
  • Storage Management with ASM

ASM makes managing datafiles simple. With Oracle Database 11g R2, ASM can manage all of the files—database files, nonstructured binary files, and external files including text files. ASM handles managing the disk, adding disk storage, and tuning I/O performance with rebalancing while the storage is up and available to the Oracle databases on that server.
Starting with Oracle Database 11g R2, ASM is a separate installation using the Grid Infrastructure. Use a different home directory than the database home directory for the installation of ASM, and perform the installation as another user, such as asmadm user. The home directory for ASM contains other pieces, such as Clusterware, which are part of the ASM installation. If you are installing a version of Oracle earlier than 11g R2, start the installation process of the database software.

choose to install asm in oracle database 11g r1 or earlier versions

After you choose the ASM installation, the Database Configuration Assistant will start to create the instance that is used by ASM.

asm instance creation

asm disk groups

If you are installing Oracle Database 11g R2, ASM is a Grid Infrastructure installation. With this installation, the creation of the ASM instance, disk groups, and volumes is done by the ASM Configuration Assistant instead of the Database Configuration Assistant.
You can also use the ASM command-line utilities ASMCMD and ACFSUTIL to create and manage the disks. Here’s an example of creating a volume group from the operating system command line:
 ASMCMD > volcreate -d DISKGRPDATA -s 20G volume1
 ASMCMD can help manage the instance, with startup and shutdown, disk group, and disk failure management.

asm installation on oracle database 11g r2

The setup of the ASM disks needs to be done before even installing the ASM instance. The disk groups can be created so that they are available for the software install. If using the file manager for the regular files, such as create scripts and parameter files, as well as the data files for the database, these disks and storage areas will need to be available for installation.

  • Oracle Files

The data files that make up the tablespaces in Oracle are the most similar to SQL Server’s .mdf files, and the redo logs could be considered similar to the .ldf files. Also, if the database is not running, these files can be copied for a cold backup, similar to SQL Server when taking a database offline or if the instance service has been stopped to take a copy of the .mdf file and .ldf files.
Oracle tends to use the same extension for all of the datafiles. It is typical to use the tablespace name in the data file name. For example, the SYSTEM tablespace may have system01.dbf, and the SYSAUX tablespace may have sysaux01.dbf.
The location of the control files is set at database creation and the parameter CONTROL_FILES has the values for the location:
CONTROL_FILES = (/u02/oracle/SID/control01.ctl,
/u03/oracle/SID/control02.ctl,/u04/oracle/SID/control03.ctl)

  • Oracle Database Components

The following are some of the components that are part of the database installation:
Oracle Advanced Security                 Oracle Partitioning
Oracle Spatial                                      Oracle Label Security
Oracle OLAP                                        COM Automation Feature
Data Mining                                          RDBMS Database Extensions for .NET
Database Vault                                     Real Application Testing
Oracle Net Services                             Oracle Net Listener
Oracle Connection Manager                Oracle Call Interface
Oracle Programmer                              XML Development Kit
Oracle Configuration Manager

Also, as part of the Windows installation, the following components are available:
■ Services for Microsoft Transaction Server
■ Administration Assistant for Windows
■ Counters for Windows Performance Monitor
■ OLE, ODBC, and .NET drivers

Wish to crack Oracle DBA interviews? Intellipaat’s Top Oracle DBA Interview Questions are meant only for you!

1.3 Oracle Software Installation
 Operating system configurations—check; storage—check; users—check. On Windows, start the installation by executing setup.exe to run the Oracle Universal Installer (OUI).
On Linux, a couple of environment variables need to be set up first, and then the installer program can run.
> export DISPLAY = ip address:0.0
> export ORACLE_BASE = /u01/oracle
> export ORACLE_HOME = /u01/oracle/product/11.2.0
> export PATH = $PATH:$ORACLE_HOME/bin
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
> cd ../oracle/Disk1
>./runInstaller

selecting basic or advanced installation

The advanced installation allows for the following:
■ Install the software first without creating any databases.
■ Choose which software components to install. As noted earlier, this is part of a secure configuration for the environment. Also, knowing which pieces have been installed will help with patching and upgrading.
■ Configure the passwords for the system users differently for each user.
■ Install RAC.
■ Configure ASM.
■ Use a different template or configuration for the database.
■ Select a character set.
■ Upgrade an existing database.
■ Use a different file system for the database files to separate them from the Oracle home.

choosing oracle components for installation

  • Using a Response File

A response file can be recorded, or a template can be used and edited.
To record a response file, run the installer with the parameters of -record and the destination of the response file:

E:\oracle\Disk1> setup -record -destinationFile
d:\oracle\response\install_oracle11.rsp

To run the installation with the response file, enter the following:

E:\oracle\Disk1> setup -silent -nowelcome -noconfig –nowait-responseFile

d:\oracle\response\install_oracle11.rsp

  • Removing Software

Even though you can add and remove components after installing Oracle, it might take a couple of attempts to get everything right. You may need to reinstall the software or components to develop a clean installation. The OUI can handle this step as well.
After opening the OUI, click Installed Products. You will see a list of Oracle homes and installed software. Select a home or component to remove. This will remove the software, but some of the file structures will remain. They can be removed manually. On Windows, information is written to the registry, which could be cleaned up, depending on if you want to reuse an Oracle home. Services can also be removed.

  • Upgrading the Database

As part of the installation, if an Oracle database already exists on the server, there will be an option to upgrade the database. The Oracle Database Upgrade Assistant (DBUA) is also available after the installation of the software to perform upgrades.

installed products
 Come to Intellipaat’s Oracle DBA Community if you have more queries on Oracle DBA!

  • Applying Patches

Patches are nothing new to DBAs. SQL Server has hotfixes, security updates, and service packs for patching the base release. The patches have one-off fixes for bugs or a group of fixes or security releases. Oracle also has different types of patches.
The Critical Patch Update (CPU) has the latest security updates for the database. The Patch Set Update (PSU) includes the security patches and the recommended and proactive patches. The Oracle Configuration Manager component provides help in managing the patches through My Oracle Support.

my oracle support, patches & updates tab

Recommended Videos

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve : *
18 + 19 =