Notes (1 3)
Notes (1 3)
1. Installation Process:
• Oracle Universal Installer (OUI): Used for installing and maintaining Oracle products.
• Standardization: Installation processes are standardized but may vary by platform and
product.
• Pre-installation: Read release notes for the specific platform before installing.
3. Supported Platforms:
5. User Accounts:
• Unix/Linux:
o Accounts Needed: Separate accounts for database and Grid Infrastructure
software.
oRecommended Account: Typically named oracle with groups oinstall
(primary) and dba (secondary).
• Windows:
o Installation Account: Often uses Administrator privileges (not recommended for
production).
o Installer Actions: Creates necessary operating groups (ORA_DBA).
1. Prerequisites:
• Common Issues: May include kernel settings or missing packages, especially on non-
Oracle validated Linux versions.
• Support Considerations: Support might be denied if prerequisites are not met. Fix
issues as soon as possible if they occur.
4. OUI Options:
5. OUI Inventory:
6. OUI Details:
• Launch Commands:
o Linux: runInstaller.sh
o Windows: setup.exe
• Requirements: Graphical terminal needed (X Window for Linux, graphical interface for
Windows).
• Steps in OUI Dialog:
1. Configure Security Updates (optional).
2. Download Software Updates (optional).
3. Select Installation Option (chain install or separate database creation).
4. Grid Installation Options (single instance, RAC, RAC One Node).
5. Select Product Languages (default is English).
6. Select Database Edition (Enterprise, Standard, Standard Edition 1).
7. Specify Installation Location (Oracle Base and Oracle Home directories).
8. Privileged OS Groups (nominate groups managing Oracle Home).
9. Perform Prerequisite Checks (validate environment).
10. Summary (review dialog summary).
11. Install Product (view progress).
12. Finish (complete installation).
• Linux: Step 9 may fail if not using an Oracle-validated Linux version. Fixable issues can
be addressed with a script, but unfixable issues must be resolved before proceeding.
• Root Script: Run root.sh as root to perform privileged tasks. Windows does not require
this step.
9. Response Files:
• Purpose: Automate installations without graphical output, suitable for multiple machines
or automated setups.
• Template: db_install.rsp file provided in /response/ directory; well-documented.
• Generating a Response File: Run OUI interactively, check "Generate response file," and
cancel installation.
• Running Silent Install: Edit the response file for the environment and use the command:
o Windows: setup.exe -silent -responseFile db_install.rsp
o Linux: Use ./runInstaller -help for command-line switches; -
ignoreSysPrereqs allows bypassing prerequisite checks.
Platform Variations
• Linux: User must be pre-created with necessary groups (oinstall and dba). OUI cannot
be run as root.
• Windows: OUI run as an administrator; prompts for Oracle Home owner user.
11. OS Groups:
• Linux: OSDBA group (dba) must be pre-created. oinstall should be the primary group
for the OUI user.
• Windows: Groups are hard-coded and created by OUI.
• Linux: Requires running root.sh at the end of installation for root privileges tasks.
• Windows: Does not require this step since OUI runs with administration rights.
• Objective: Understand both GUI and command line methods for creating a database.
• Key Concept: Creating a database is straightforward. While initial design and structure
are important, most aspects can be adjusted later. Keep the process simple at the
beginning.
Key Concepts
• Instance:
o Definition: Consists of memory structures and processes.
o Characteristics: Transient; can be started and stopped.
• Database:
o Definition: Composed of files on disk.
o Characteristics: Persistent until deleted.
• Interaction:
o The instance creates the database once and can then open or close it multiple
times.
o Database requires an instance to be accessible.
• Description: Contains logical and physical structures, including segments for user data.
• Creation:
o Initial database creation sets up basic physical structures and the data dictionary.
o Data dictionary is built by running SQL scripts in ORACLE_HOME/rdbms/admin.
• Initial Scripts:
o sql.bsq for data dictionary creation.
• Additional Scripts:
o catalog.sql, catproc.sql for generating views and functionality.
o Optional “cat” scripts for additional features.
• Interactive Creation:
o Easier to use DBCA for creating the database; it handles parameter file creation
and script execution.
• Combination Approach:
o Some DBAs use DBCA to generate files and scripts, then manually review and
execute them using SQL*Plus.
• Windows:
o Navigate through Start menu or run dbca.bat from CMD prompt.
• Linux:
o Set environment variables: DISPLAY, ORACLE_BASE, ORACLE_HOME, and PATH.
o Run dbca shell script from $ORACLE_HOME/bin.
• Example Script:
export DISPLAY=myhost:0.0
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
• Note: Ensure $ORACLE_HOME/bin is at the start of the search path to avoid conflicts with
similarly named executables.
• Database Choices: Most decisions during creation can be modified later, though some
changes might require downtime. Aim to make the best choices possible initially, but
know adjustments can be made.
1. Database Operation:
2. Creation Mode:
3. Database Template:
4. Database Identification:
• Global Database Name: Combines database name and optional domain (up to 128
characters).
o DB_NAME: Unique, up to 8 characters, including alphanumeric, underscores,
number signs, and dollar signs.
o DB_DOMAIN: Optional, used for DB_DOMAIN instance parameter.
• System Identifier (SID): Oracle instance name, used for ORACLE_SID parameter.
Usually kept the same as DB_NAME for simplicity.
5. Management Options:
6. Database Credentials:
• SYS and SYSTEM Passwords: Required for database administration; follow best
practices for complexity.
• Windows Variation: Prompt for operating system account password owning the Oracle
Home.
7. Storage Locations:
• Storage Types: Automatic Storage Management (ASM) disk group or file system
directory.
• Oracle Managed Files (OMF): Allows Oracle to control file naming and directory
structure.
• Recovery Related Files: Nominate a Fast Recovery Area for backups and enable archive
log mode.
8. Database Options:
9. Initialization Parameters:
• Memory Parameters: Set values for SGA (System Global Area) and PGA (Program
Global Area).
• DB_BLOCK_SIZE: Critical parameter; defaults to 8KB and cannot be changed post-
creation.
• Character Sets: Choose database and national character sets; Unicode (AL32UTF8) is
recommended.
• Connection Mode: Configure shared server settings.
• Sanity Checks: Verifies that the creation process can proceed; errors should be
addressed if detected.
12. Summary:
• Creation Progress: Shows stages of database creation; duration varies based on options
and hardware.
Purpose: Generating database creation scripts is useful for situations such as:
Creation Scripts:
#!/bin/sh
OLD_UMASK='umask'
umask 0027
mkdir -p /u01/app/oracle/admin/orcl121/{adump,dpdump,pfile}
umask ${OLD_UMASK}
ORACLE_SID=orcl121; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
echo You should Add this entry in the /etc/oratab:
orcl121:/u01/app/oracle/product/12.1.0/dbhome_1:Y
/u01/app/oracle/product/12.1.0/dbhome_1/bin/sqlplus /nolog
@/u01/app/oracle/admin/orcl121/scripts/orcl121.sql
2. SQL Script Example:
Post-Creation Scripts:
plaintext
Copy code
db_block_size=8192
open_cursors=300
db_domain=""
db_name="orcl121"
control_files=("/u01/app/oracle/oradata/orcl121/control01.ctl",
"/u01/app/oracle/fast_recovery_area/orcl121/control02.ctl")
db_recovery_file_dest="/u01/app/oracle/fast_recovery_area"
db_recovery_file_dest_size=5061476352
compatible=12.0.0.0.0
diagnostic_dest=/u01/app/oracle
processes=300
sga_target=503316480
audit_file_dest="/u01/app/oracle/admin/orcl121/adump"
audit_trail=db
remote_login_passwordfile=EXCLUSIVE
dispatchers="(PROTOCOL=TCP) (SERVICE=orcl121XDB)"
pga_aggregate_target=167772160
undo_tablespace=UNDOTBS1
Overview:
Types of Templates:
1. Structure Only:
o Contains structural informa+on (op+ons, storage details, ini+aliza+on
parameters).
o Excludes: Actual datafiles.
o Outcome: Database created from scratch with no user-defined data.
2. Structure and Data:
o Includes both structural informa+on and datafiles.
o Outcome: Database is an exact replica of the source database at the +me of
template crea+on.
• DBCA Dialog:
o Step 1: Choose "Manage Templates" radio buHon.
o Op:ons:
§ Delete a template.
§ Create a template from:
§ An exis+ng template.
§ An exis+ng database (structure only or structure and data).
o Requirements: Template or database must exist on the machine running DBCA.
o Restart Requirement:
§ If crea+ng a template with datafiles, the source database must be
restarted.
§ No restart required for structure-only templates.
o Process:
§ Specify source and type of template.
§ For templates with datafiles, provide loca+on for storing the compressed
database.
§ Created templates are available for selec+on in step 3 of the DBCA dialog.
Storage Location:
Concept:
• Database Op:ons: Combina+on of executable code (in Oracle Home) and necessary
objects (in the database).
• Installa:on: DBCA prompts during crea+on determine which op+ons are installed, based
on the scripts it runs.
• Limita:ons: Op+ons cannot be uninstalled via DBCA. Templates with datafiles do not
allow control over installed op+ons.
Configuring Options:
• DBCA Func:onality:
o Generates and runs scripts to install op+ons.
o Does not support uninstalla+on of op+ons.
Example Query:
Sample Output:
Overview:
• ASM Management:
o From Oracle 11.2.x onward, ASM is part of GI.
o Earlier releases had ASM integrated with the database so\ware.
• GI Processes:
o Windows: Services running with Administrator privileges.
o Linux: Daemons running with root privileges.
o Core Process: High Availability Services daemon (OHASD), protected by the OS.
• Resource Management:
o Managed Resources Include:
§ Database listeners
§ Virtual IP addresses
§ ASM instance
§ ASM disk groups
§ Database instances
§ Third-party products
o Registry: Oracle Local Registry (OLR) stores details about resources.
§ Linux Loca:on: /etc/oracle/olr.loc
§ Windows Loca:on: Registry key
HKEY_LOCAL_MACHINE/SOFTWARE/Oracle/olr/olrconfig_loc
• Administration Tools:
o crsctl U:lity: Used for managing GI processes and resources, including
star+ng/stopping OHASD.
o srvctl U:lity: Manages Oracle resources only, not third-party resources.
Exam Tip:
Overview:
• Func:on: Logical Volume Manager (LVM) that configures striped and mirrored volumes
for Oracle database files.
• Storage Units: Uses disk groups (not visible to the OS) for Oracle database files.
Architecture:
Bootstrap Process:
1. OS starts GI processes.
2. GI starts the ASM instance.
3. ASM instance locates and mounts disk groups, registers with GI.
4. RDBMS instance starts and requests ASM instance address from GI.
5. RDBMS instance logs on to ASM and accesses file extent map.
6. RDBMS instance opens the file.
Important Points:
• Data Flow: No data passes through ASM instance; all I/O is between RDBMS instance
and the file.
• File Types Stored in ASM Disk Groups:
o Controlfiles
o Datafiles
o Tempfiles
o Online logfiles
o Archive logfiles
o Server parameter file (spfile)
o Password file
o RMAN backups
o Data Pump dump files
• File Types Not Stored in ASM Disk Groups:
o Oracle Home
o Trace files or alert log
o pfile ini+aliza+on file
o User-managed backups
Exam Tip:
• ASM instance controls storage, with all data I/O managed directly between RDBMS and
the file.
Overview
Definition:
• ASM Disks: The term "ASM disk" is somewhat misleading as these are not physical disks
but can be various types of storage devices.
Identification:
General Process:
• Disk Crea:on: Done by the system administrator; each device accessed via a device
driver created during system boot.
• Persistence Issue: Device names must be persistent and drivers readable/writeable by
Oracle processes.
Windows Configuration:
• Commands Example:
General Requirements
• Dedicated Oracle Home: GI should be installed into its own Oracle Home.
• Version Compa:bility: GI must be the same version or higher than any databases using
its services. For example, GI 12.1.x can support a database of version 11.2.x, but not vice
versa.
• Node Compa:bility: GI must run on the same nodes as the database instances. In
clustered environments, Flex ASM allows only a few nodes (default is three) to run ASM
instances.
Installa5on Process
This summary captures the key points about installing Oracle Grid Infrastructure, including
version requirements, installation options, disk group configuration, and best practices for user
and group management.