4/14/2013
CSC454 WK#3 Oracle 11gR2 Installation
Lecture Oracle11g Installation
Lab #1A Oracle11g Installation
Lab #1B Post-installation Verification
HW#2 - Due in 2 weeks
Page 1
Installing Oracle11g and Creating a Database
Obtain Oracle11g Software and Documentation
Pre-installation Planning
Database Environments
Hardware, Software License and Editions
Optimal Flexible Architecture (OFA)
Database Administrator Users and Tools
Installation and Creating a database
Oracle Universal Installer (OUI)
Create a database using Oracle Managed Files (OMF)
Post-installation Verification
Oracle Enterprise Manager (OEM)
SQL*Plus
SQL Developer
De-installation
Lab#1
Page 2
4/14/2013
Obtain Oracle11g Software
http://www.oracle.com/technology/software/products/database/index.html
Page 3
Unzip each file (Example: 32-bit)
Move 3 folders from
win32_11gR2_database2of2/database/stage/components/
to
win32_11gR2_database1of2/database/stage/components/
Rename win32_11gR2_database1of2/database ->
Oracle11gR2 (2.16 GB)
Page 4
4/14/2013
You must register first to down load Oracle 11g
otn.oracle.com
Page 5
What Does 11.2.0.1.0 Mean to A DBA?
11 Major Database Version Number
It represents a major new version of the software that contains significant new
functionality.
2 - Database Maintenance Release Number
It represents a maintenance release level. Some new features may also be included.
0 - Application Server Release Number
Reflects the release level of the Oracle Application Server (OracleAS).
1 - Component-Specific Release Number
Identifies a release level specific to a component. Different components can have
different numbers in this position depending upon, for example, component patch sets
or interim releases.
0 - Platform-specific Patch Set Number
Identifies a platform-specific release. Usually this is a patch set. When different
platforms require the equivalent patch set, this digit will be the same across the
affected platforms.
Checking Your Current Release Number
SQL> SELECT * FROM PRODUCT_COMPONENT_VERSION;
PRODUCT
VERSION
STATUS
Oracle Database 11g Enterprise Edition 11.2.0.2.0
Production
NLSRTL
11.2.0.2.0
Production
PL/SQL
11.2.0.2.0
Production
TNS for 32-bit Windows
11.2.0.2.0
Production
Page 6
4/14/2013
Licensing
Per Processor Licensing
Acquire a license for each processor running Oracle.
Allows an unlimited number of users to connect from a LAN or WAN
More cost effective for organizations with a large number of users, such as
enterprise-level, or organizations that offer Web-based solutions.
Per User Licensing
Acquire a license for every Oracle client on each workstation that connects to
any Oracle instance on the server.
More appropriate for smaller organizations that experience high usage among a
smaller, known set of users.
Oracle's Multi-Core Factor in Licensing
Multi-core processor licensing costs have to do with the number of cores
multiplied by Oracle's defined multi-core factor. For example, the IBM AIX
system has 4-eight core processors, which means that it requires 24 Oracle
licenses based on Oracle's "multi-core factor", which is 0.75 for the IBM AIX
system. (24 Oracle licenses are needed is 4*8*0.75 = 24)
The multi-core factor is as follows:
0.25 for SUN's UltraSparc T1 processors
0.50 for Intel and AMD processors
0.75 for SUN's UltraSparc T2 processors
0.75 for all other multi-core processors
1.00 for single-core processors
Page 7
Advanced Options at Additional Cost
Oracle Real Application Clusters (RAC): Unlimited scalability and high availability for
any packaged or custom application via clustered hardware configurations
Oracle Configuration Management Pack: Track hardware and software configuration
for hosts and databases plus cloning for database instances and Oracle home to
facilitate deployments.
Oracle Change Management Pack: Evaluate, plan for, and implement database
schema changes to support new application requirements; eliminate errors/data loss
when making changes; minimize downtime.
Oracle Diagnostics Pack: Ensure high availability of mission-critical business
systems by reducing the number of complex performance tasks.
Oracle Tuning Pack (requires Diagnostics Pack): Dynamic tuning recommendations
for more-efficient resource utilization, higher transaction throughput, faster query
performance; avoid costly hardware, memory, and disk upgrades.
Oracle Partitioning: Enhanced data management environment for OLTP, datamart,
and data warehouse applications; improves manageability, availability, and
performance for large underlying database tables and indexes.
Oracle OLAP: Complete set of analytical functions fully integrated within the
database.
Oracle Data Mining: Embedded data mining for classifications, predictions, and
associations to build advanced business intelligence applications.
Oracle Spatial: Foundation for deploying enterprise-wide spatial information systems,
and Web-based and wireless location-based applications.
Oracle Advanced Security: Industry standard network encryption, strong
authentication (PKI, Kerberos, RADIUS).
Oracle Label Security: Row level security based on stringent government and
commercial requirements; sensitivity labels (i.e. confidential, doctor-patient only, top
secret) provide better intellectual property protection and privacy.
Page 8
4/14/2013
ORACLE DATABASE PRODUCT EDITIONS
Product Edition
Enterprise Edition
Description
Industry-leading performance, scalability,
and reliability for OLTP, decision support,
and content management
Four-processor version of Oracle
Standard Edition
Database 11g with Oracle Real
Application Clusters
Standard Edition One Two-processor version of Standard
Edition at an attractive, entry-level price
Full-featured version for individuals,
Personal Edition
compatible with the entire Oracle
Database family
Complete infrastructure for building,
Lite Edition
deploying, and managing mobile
database applications
Typical Environment Number of Users
Large enterprises
More than 1,000
(4+ CPUs)
Medium-size
enterprises
(3 to 4 CPUs)
Small/departmental
(1 to 2 CPUs)
Individual
laptop/desktop
400 to 1,000
Individual PDAs,
mobile devices
One
Less than 400
One
Editions: Standard Edition One, $149 per user license (minimum of 5 users) and $4,995
per processor (maximum two sockets per server);
Standard Edition, $300 per user license (minimum of 5 users) and $15,000 per CPU
(maximum four sockets per server);
Enterprise Edition, $800 per user license (minimum of 25 users) and $40,000 per CPU.
Feature
RAC
License Type List License Annual Support
Processor
$10,000
$2,000
User
$200
$40
Partition Processor
$10,000
$2,000
User
$200
$40
Page 9
Database Planning Considerations
Environment
Sandbox, Development/Test, QA, Production
O/S (UNIX, Linux, Windows, etc.): version/release/patch level, 32-bit vs. 64-bit
Memory: SGA
Storage: RAID, SAN, etc.
Network: LAN, WAN, Wireless
Will this server have only one Oracle instance?
Will this database be shared between multiple instances? (Oracle RAC)
Will this database be distributed? (Data Guard, Replication, etc.)
Number of users, both internal and external
Number of concurrent users
Application Type: OLTP vs. OLAP, Vendor vs. In-house
Number of changes (Update/Insert/Delete)
Tablespace size: System (UNDO, Temp, etc.), Application
Number and placement of Control Files
Number, size, and placement of Redo Logs
Will this database be running in Archive Log mode?
Page 10
4/14/2013
Environment Preparation
Your PC/Laptop
XP
Home
Professional
Vista
32-bit
64-bit
Windows 7
32-bit
64-bit
Does my PC have the minimum hardware
requirements?
Does my PC belong to a domain?
Disable/Enable Windows Firewall
Dont block Oracle ports
Set Logon AS A Batch Job (Local Security)
Create a logon ID on your PC
Additional IP Address (Optional)
DHCP
Loopback
Windows 8
Page 11
Your PC / laptop
Page 12
4/14/2013
Does my PC have the minimum hardware requirements?
2 GHz CPU
2 GB RAM
5 GB free Disk
Windows 7 (recommended)
Does my PC belong to a domain?
Windows XP Professional Edition is supported by Oracle11g
Enterprise Edition, Standard Edition, Personal Edition, and Client.
Please note that Oracle Corp. does NOT currently support
Windows XP Home Edition for any release of Oracle9i, 10g, etc.
Page 13
Dont block Oracle ports
C:\app\product\11.2.0\db_1\install\portlist
1158 OEM Instance #1
5500 OEM Instance #2
:
OEM Instance #n
1521 Listener
3938 OEM Agent
5620 Ultrasearch
Page 14
4/14/2013
ID/PW error
If you create a non-domain user, then need to add
this user to the ORA_DBAgroup
Page 15
Logon As A Batch Job (XP)
** Home Edition doesnt
have this option.
Page 16
4/14/2013
Windows 7
** Home Edition doesnt
have this option.
Page 17
Page 18
4/14/2013
Right
click to
add more
Page 19
What happen if I dont have a logon ID on my PC?
Create a normal user
Put this user in the ORA_DBA group
Give this user Logon As A Batch Job privilege
This will make OEM startup/shutdown and other things that
may require host credentials
You can continue to log on without using ID
Page 20
10
4/14/2013
Single Instance vs. Multiple Instances
Multiple Instances
A feature in Oracle
Each instance can be at different binary levels
Provides security isolation
Allows server consolidation
Fewer machines to administer
Reduce cost thru application consolidation - hardware, software, licenses, etc.
Concurrent development and testing environments
More likely to invest in and protect more expensive computers, leading to
greater reliability
Allows application hosting
Single Server model has its own advantages
No additional Oracle administration
Automatic server settings work better with less contention for resources
Likely to perform better in production environments
Dedicated server is still the best way to go if you can do it
No charge back issues
Page 21
Users Dream
Americans Dream
One Family
Single Server
Single House
One
Instance
One App.
Database
Luxury
Ownership
Control
Independent
Privacy
Expensive
Page 22
11
4/14/2013
Multiple Instances Configuration
Multiple Domain
Single Domain
Instance-1
Instance-1
Instance-2
Instance-2
Instance-3
Instance-3
Page 23
Multiple Instances Scenario CSC454 Lab
Team #35
SDLAB35
Query
Student 1: Bob
Query
INSTANCE
Bob
INSTANCE
Joe
Oracle11g
Student 2: Joe
Page 24
12
4/14/2013
Multiple Instances Scenario - Multiple Environments
Query
INST-1
Dev.
Query
INST-2
Pre-Prod.
Programmer
Oracle11g
QA
Page 25
Multiple Instances Scenario - Multiple Applications
Acct Client
INST-1
11g
Query
HR Client
Query
INST-2
10g R2
Sales Client
Query
INST-3
9i
Oracle11g
Oracle10g R2
Oracle9i
Page 26
13
4/14/2013
Multiple Instances Scenario - Application hosting
Outsourcing resources and administrative services for
multiple companies
Flexibility in providing varying service levels based on
customer segment
Security isolation among applications and companies
INSTVideo
Internet
INSTElectronics
INST-Toy
Query
Oracle
Page 27
Optimal Flexible Architecture (OFA)
Oracles recommended standard database architecture layout
OFA organizes database files by type and usage.
Establish a directory structure where database files can be easily differentiated
from other files.
Files can be spread across multiple disks.
Separate objects with different behavior into different tablespaces.
It is easy to identify control files, redo log files, and datafiles.
Consistent naming convention for easy administration and support
File System Organization: The file system is organized for easy
administration.
Administration of multiple Oracle homes on the same machine by separating files
on different disks and directories
Creating databases
Adding objects
Adding data into existing databases
Adding hardware
Better performance is achieved by decreasing disk contention among datafiles,
binary files, and administrative files which can now reside on separate directories
and disks.
Page 28
14
4/14/2013
Oracle Software and File Locations Example
oracle_base
Software
/product
/release_number
/db_1
/BIN
/dbs
/rdbms
/sqldeveloper
/sqlplus
...
/admin
/inst_name
/pfile
/adump
...
Files
oradata/
INST1/
system01.dbf
control01.ctl
redo0101.log
HR.dbf
...
INST2/
system01.dbf
control01.ctl
redo0101.log
ACCT.dbf
...
Page 29
Windows Oracle File Layout Example
C:\app\
C:\app\admin\INST1
adump - Audit files
dpdump - Data Pump default directory
pfile - Instance parameter files
scripts Your SQL scripts
C:\app\oradata\INST1
Page 30
15
4/14/2013
Database Administrators and Users
Users SYS, SYSTEM, SYSMAN, DBSNMP are created automatically
During database creation
Granted the DBA role
SYS: Owner of the database data dictionary
When connecting as SYS it should be made as SYSDBA.
Otherwise, you will receive the error: ORA-28009 connecting to
SYS should be SYSDBA.
SYSTEM: Owner of additional internal tables and views used by Oracle tools
SYSMAN: Perform Oracle Enterprise Manager administration tasks.
DBSNMP: The management agent of Enterprise Manager uses the
DBSNMP account to monitor and manage the database.
In 11g, default users are locked and password expired (for example, HR)
You can unlocked the account and then change the password
You should create at least one additional administrator ID which has
the SYSTEM privilege to perform daily administrative tasks.
Page 31
Database Administration Tools
Examples of Common Database Administration Tools
Tool
Description
Oracle Universal
Installer (OUI)
Used to install, upgrade, or remove software
components
Oracle Database
Configuration
Assistant (DBCA)
A graphical user interface tool that interacts with the
OUI, or can be used independently, to create, delete, or
modify a database
SQL*Plus
A query tool to access data in an Oracle database
SQL Developer
A better query tool to access data in an Oracle database
Oracle Enterprise
Manager (OEM)
Database Control
A graphical interface used to administer, monitor, and
tune one or more databases
Grid Control
The tools listed are covered in this course, but they are only a subset of the utilities supplied by Oracle.
Page 32
16
4/14/2013
Installation and Creating a Database
An Oracle database can be created by:
Automatically created as part of the Oracle11g installation using the
Oracle Universal Installer (OUI)
Using the Oracle Database Configuration Assistant (DBCA)
Graphical user interface
Java-based
Launched by the Oracle Universal Installer
Can be used as a standalone
Creating a SQL script using the CREATE DATABASE command
Migrate or upgrade an existing database from a previous version of
Oracle.
SYSDBA privileges are required to create a database.
These are granted by one of the following:
Operating system
Password file
Page 33
Oracle Universal Installer (OUI)
OUI is a JAVA application ..
Performs component-based installations
Enables different levels of integrated bundle, suite, and Web-based installations
Can be easily portable across all Java-enabled platforms
Used to install, upgrade, or remove software components, and create a
database based on a Java engine. Features include:
Automatic dependency resolution
Allows for Web-based installations
Tracking inventory of component and suite installations
Deinstallation of installed components
Support for multiple Oracle homes
National language support (NLS)/globalization support
Can be run in interactive mode or silent mode.
Usually the Oracle Universal Installer will launch automatically after you
mount CD
To start Oracle Universal Installer on UNIX:
The installation program is called runInstaller and is located in the Install\linux\ directory
for LINUX or Install\Solaris\ directory for SUN, etc.
$ ./runInstaller
On UNIX do NOT run the Installer as a root user.
To start Oracle Universal Installer on Windows:
The installation program is called setup.exe and is located in the Oracle11g DVD.
CD:\>setup
Page 34
17
4/14/2013
Installation Process
Page 35
Page 36
18
4/14/2013
PW: contains at least
1 uppercase character,
1 lower case character and
1 digit [0-9].
Page 37
Page 38
19
4/14/2013
Page 39
Page 40
20
4/14/2013
Be patient do NOT cancel
Page 41
Page 42
21
4/14/2013
Launch OEM
Page 43
Invoke SQL Developer
Your ID
C:\app\mchou\product\11.2.0\dbhome_1\jdk\bin\java.exe
Page 44
22
4/14/2013
Page 45
Page 46
23
4/14/2013
Page 47
Post-installation Verification and Tasks
Components
OS Level:
Files and Directories
Processes and Services
Database Level:
Default Users
Default Schemas
Things To Do
Configure advanced features
Install/upgrade applications
Install/upgrade tools
Establish security roles and add new users
Create new objects
Load data
Set up routine maintenance jobs
Set up regular backup jobs
Testing
Page 48
24
4/14/2013
Oracle11g Services and Files - Single instance
Page 49
Oracle11g Database Services on Windows
On Windows/XP, Start -> Settings -> Control Panel -> Administrative Tools
-> Services
Oracle services are automatically started after installation when you
create a database:
OracleDBConsoleSID (the Oracle Enterprise Manager Database Control)
OracleHOME_NAMETNSListener (the Oracle Database listener service)
OracleServiceSID (the Oracle Database service)
However, other services for networking or other individual components
may not automatically start. For example: OracleJobSchedulerSID
(Schedule Jobs)
Note: HOME_NAME= OraDb11g_home1 SID=INST1
Page 50
25
4/14/2013
Deinstall Oracle (Only on your own PC)
Use OUI
Page 51
Page 52
26
4/14/2013
Clean up the Registry
1. Select Start > Run, enter REGEDIT, and click OK.
2. At the Windows Registry Editor, expand the
HKEY_LOCAL_MACHINE\SOFTWARE and delete the ORACLE key.
3. Expand the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet001\Services
and delete all keys that begin with ORACLE if you have any.
4. Expand the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet002\Services
and delete all keys that begin with ORACLE if you have any.
5. Expand the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
EventLog\Application and delete all keys that begin with ORACLE.
Page 53
Clean Up Environment
Reboot PC
Delete all Oracle directories
C:\app\ ...
C:\LAB454
C:\U4
For this class only
Verification
Control Panel -> Services (No Oracle Services)
Program (No Oracle Entries)
Empty Recycle Bin
Page 54
27