Sei sulla pagina 1di 29

02 - Preparing the Database Environment

By Muhammad Asghar Khan


Reference: OCA Oracle Database 11g - Admin I Exam Guide by John Watson

1/2

Agenda

Tools for Administering an Oracle Database


Oracle Universal Installer (OUI) Database Creation (DBCA) and Upgrade Tools (DBUA) SQL*Plus and SQL Developer Oracle Enterprise Manager (OEM) Oracle Net Manager (netmgr) and Oracle Net Configuration Assistant (netca) Datapump and SQL*Loader Recovery Manager (RMAN) Choice of Operating System
http://asghars.blogspot.com

Plan an Oracle Database Installation

2/2

Agenda

Configure OEL Kernel for Oracle Configure OEL Shell for Oracle Create Groups & User for Oracle Directory Structure & File Naming Conventions/OFA Configure Oracle Users Environment

Running Oracle Universal Installer

http://asghars.blogspot.com

1/8

Tools for Administering an Oracle Database

Oracle Universal Installer (OUI)


An Oracle product that is used to manage the installation and maintenance of many oracle products To launch the OUI, on Windows run the setup.exe file in the root of the DVD, on Linux and Unix, run the runInstaller shell script The OUI can be installed as a self-contained product in its own Oracle Home, or can be launched from the product installation DVD; it will install itself into the Oracle Home along with the product An Oracle Home is the location of an Oracle product installation: a set of files in a directory structure
http://asghars.blogspot.com

2/8

Tools for Administering an Oracle Database


When the OUI prompts for the location of a products.xml file, specify the DVD with the product you want to install Always use the latest version of the OUI that you have available OUI inventory stores details of all the Oracle products installed on the machine, including the exact version, the location, and in some cases details of patches that have been applied Every run of the OUI will check the inventory for incompatibilities before permitting an install into an existing Oracle Home to proceed, and will then update the inventory with details of all pro ducts installed or upgraded
http://asghars.blogspot.com

3/8

Tools for Administering an Oracle Database

OUI look for a file /etc/oraInst.loc on Linux , /var/opt/oracle/oraInst.loc on Solaris and HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\inst_lo c registry key on Windows to find an existing inventory As only the root user can write to /etc or /var and OUI will be always run by non-root user, therefore; OUI will generate a script (orainstRoot.sh script) to be run by the root user that will create the oraInst.loc file To relocate the inventory, first copy it to the new location, and then edit the oraInst.loc file or registry key
http://asghars.blogspot.com

4/8

Tools for Administering an Oracle Database

The /install/oraparam.ini file specifies the location on the DVD of the file products.xml The product requirements are listed in a /stage/prereq/db/refhost.xml file

Database Creation (DBCA) and Upgrade Tools (DBUA)


The DBCA,is a graphical tool for creating a database DBCA is discussed in database creation chapter Database upgrade can be done manually or through a graphical tool DBUA
http://asghars.blogspot.com

5/8

Tools for Administering an Oracle Database

SQL*Plus and SQL Developer


SQL*Plus & SQL Developer are tools that can be used to connect to an Oracle database SQL*Plus is available on all platforms to which the database has been ported, installed into both Oracle database and Oracle client Oracle Homes To run SQL*Plus some environment variables (ORACLE_HOME, PATH and LD_LIBRARY_PATH) need to be set SQL Developer is a graphical tool with wizards for commonly needed actions Database 11g does ship with a release of SQL Developer, and but is a completely self-contained product
http://asghars.blogspot.com

6/8

Tools for Administering an Oracle Database

On Windows, the executable file is sqldeveloper.exe. On Linux, it is the sqldeveloper.sh shell script The version of Oracle EM relevant to the OCP examination is Database Control Database Control is a tool for managing one database (which can be a RAC database), whereas Grid Control can manage many databases (and more) If there are several database instances running off the same Oracle Home, each instance will be accessible through Database Control on a different port
http://asghars.blogspot.com

Oracle Enterprise Manager (OEM)

7/8

Tools for Administering an Oracle Database

Many DBAs like to work from the SQL*Plus or SQL Developer command line to understand out exactly how to do something, and then use Enterprise Manager to make doing it easy

Oracle Net Manager (netmgr) and Oracle Net Configuration Assistant (netca)

These tools are used for configuring the Oracle networking environment

Datapump and SQL*Loader

Datapump extracts data from one database, writes it out to a file, and inserts it into another database (possibly a different version, on a different platform)
http://asghars.blogspot.com

8/8

Tools for Administering an Oracle Database

SQL*Loader is a tool for loading large amounts of data into an Oracle database from operating system files. These files can be laid out in a number of formats

Recovery Manager (RMAN)

RMAN is used for creating server-managed backups

http://asghars.blogspot.com

1/10

Plan an Oracle Database Installation

Choice of Operating System

Oracle Corporation supports all the mainstream platforms, including


Linux on Intel and AMD Microsoft Windows on Intel and AMD Solaris on SPARC AIX on POWER HPUX on PA-RISC

When selecting an operating system, the choice should be informed by many factors, including

Cost
http://asghars.blogspot.com

2/10

Plan an Oracle Database Installation


Ease of use Choice of hardware Available skills Scalability Fault tolerance Performance

Linux deserves a special mention. Oracle Corporation has made a huge commitment to Linux, and Linux is used as the development platform for many products (including database release 11g)

http://asghars.blogspot.com

3/10

Plan an Oracle Database Installation

Configure OEL Kernel for Oracle


Using any text editor, create or edit the /etc/sysconfig.conf file, and add or edit lines similar to the following Run /sbin/sysctl -p command to make it active

http://asghars.blogspot.com

4/10

Plan an Oracle Database Installation

Configure OEL Shell for Oracle

Add the following lines to the/etc/security/limits.conf file

Add or edit the following line in the /etc/pam.d/login file

http://asghars.blogspot.com

4/10

Plan an Oracle Database Installation

Create Groups & User for Oracle

OSDBA group (dba); identifies operating system user accounts that have database administrative privileges (the SYSDBA privilege) Oracle Inventory group (oinstall); create this group the first time you install Oracle software on the system

http://asghars.blogspot.com

5/10

Plan an Oracle Database Installation

Directory Structure & File Naming Conventions/OFA

Oracle strongly recommends a disk layout methodology formally called the Optimal Flexible Architecture (OFA) OFA was designed to achieve minimize disk contention, to operate more than one database without administrative confusion, and to improve database performance Mount Points

Oracle recommends that all your Oracle mount points be named according to the convention /pm, e.g. /u01, /u02, /u03, and so on
http://asghars.blogspot.com

6/10

Plan an Oracle Database Installation

The first of these is for locating the Oracle Database server binaries, and the other three are for holding the database files

Oracle Base Directory (ORACLE_BASE)


The Oracle base directory is the top directory for all Oracle software installations Oracle recommends that you use the form /pm/h/u for oracle base directory Where h is the name of a standard directory, u is the directorys owners name
http://asghars.blogspot.com

7/10

Plan an Oracle Database Installation

The default owner of the Oracle base directory is usually a user named oracle, and the standard directory is usually named app (e.g. /u01/app/oracle) The following commands create the Oracle Base Directory Change the owner of base directory to oracle and group to oinstall

Change permission on the base directory

http://asghars.blogspot.com

8/10

Plan an Oracle Database Installation

Oracle Home Directory (ORACLE_HOME)


Oracle server software executable files and other configuration files are located under this directory To enable the simultaneous running of multiple versions of Oracle software, you need to install Oracle software in a directory with the following path: /pm/h/u/product/v/type_n Where v is the version of oracle software, type is the type of installation e.g. database (db) or client, n is the counter, which enables you to install the same product multiple times The first part, /pm/h/u, is nothing but the Oracle base directory Oracle Home Directory (e.g. /u01/app/oracle/product /11.2.0/db_1), is automatically created by OUI

http://asghars.blogspot.com

9/10

Plan an Oracle Database Installation

Oracle Inventory Directory


Also known as OraInventory, is used to store an inventory of all the Oracle software on a server Again the OUI will prompt for its location and no need to create manually

Flash Recovery Area

Used for storing all the recovery-related files Its a good idea to create it on entirely different storage devices from where you have your data files
A typical data file under the OFA guidelines would have a name like /u02/oradata/prod/system01.dbf, which refers to a data file in the System table-space
http://asghars.blogspot.com

Database Files

10/10

Plan an Oracle Database Installation

Configure Oracle Users Environment

Change the entry of .bash_profile file of the oracle user and add following lines

http://asghars.blogspot.com

1/7

Running Oracle Universal Installer


Copy downloaded oracle installation files to the /tmp directory Login with oracle, unzip both files, switch to the /tmp/database directory and run installation by running the ./runInstaller Follow the wizard

http://asghars.blogspot.com

2/7

Running Oracle Universal Installer

http://asghars.blogspot.com

3/7

Running Oracle Universal Installer

Provide the name of the database and the password and click next

http://asghars.blogspot.com

4/7

Running Oracle Universal Installer

In the prerequisite check we was informed that we need to install three packages as well. So mount the .iso file of the OEL installation, switch to the Server folder

http://asghars.blogspot.com

5/7

Running Oracle Universal Installer

Click on Check Again button and youll see that those notifications are disappeared. Check Ignore all checkbox and click Next

Click Finish button to start the installation


http://asghars.blogspot.com

6/7

Running Oracle Universal Installer

DBCA tools automatically will start to create the database Run both shell scripts with root user
http://asghars.blogspot.com

7/7

Running Oracle Universal Installer

Open a new terminal, export ORACLE_SID variable and connect to the database

http://asghars.blogspot.com

Potrebbero piacerti anche