OCA 02 - Preparing The Database Environment
OCA 02 - Preparing The Database Environment
OCA 02 - Preparing The Database Environment
1/2
Agenda
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
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
http://asghars.blogspot.com
1/8
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
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
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
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
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
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
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
7/8
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 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
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
http://asghars.blogspot.com
1/10
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
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
http://asghars.blogspot.com
4/10
http://asghars.blogspot.com
4/10
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
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
The first of these is for locating the Oracle Database server binaries, and the other three are for holding the database files
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
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
http://asghars.blogspot.com
8/10
http://asghars.blogspot.com
9/10
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
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
Change the entry of .bash_profile file of the oracle user and add following lines
http://asghars.blogspot.com
1/7
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
http://asghars.blogspot.com
3/7
Provide the name of the database and the password and click next
http://asghars.blogspot.com
4/7
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
Click on Check Again button and youll see that those notifications are disappeared. Check Ignore all checkbox and click Next
6/7
DBCA tools automatically will start to create the database Run both shell scripts with root user
http://asghars.blogspot.com
7/7
Open a new terminal, export ORACLE_SID variable and connect to the database
http://asghars.blogspot.com