Lu2 Lo1
Lu2 Lo1
Lu2 Lo1
A computer can efficiently handle only a certain number of requests at a time; this number is
greatly dependent on the number of CPUs and the amount of RAM. As the number of requests
increases beyond a certain threshold, processes begin competing for scarce resources and all of
them suffer. Your goal as Oracle administrator is not simply to create a database but to be on
time, on budget, and to meet the availability and performance targets of the business. As with
any goal, careful planning is the key to success. This outcome discusses important issues that is
definitely within your circle of influence and that you cannot afford to ignore: Planning your
installation
Each database requires at least one database administrator (DBA). An Oracle Database system
can be large and can have many users. Therefore, database administration is sometimes not a
one-person job, but a job for a group of DBAs who share responsibility.
The approach for designing, implementing, and maintaining an Oracle database involves
the following tasks:
1|Page
A DBA is typically responsible for installing the Oracle software and creating the database. You
may be responsible for creating database storage structures, such as tablespaces. In addition, you
may create the schema or set of objects to hold application data. You must ensure that the
database is available for users. You accomplish this by starting up the database, backing up the
database on a regular basis, and monitoring the performance of the database.
As you proceed through the chapters of this course, you will learn how to perform each of these
tasks. In this chapter however, we focus on installing the Oracle software. One of your duties as
an Oracle DBA is to install and configure the Oracle software on the server so that a database
can be created to store application data. This chapter therefore discusses the issues to be
considered before installation and each of the steps that you must perform in order to
successfully install the Oracle software
The following tools are used in the installation and upgrading of the oracle software:
Oracle Universal Installer (OUI): Installs your Oracle software and options; can
automatically launch the Database Configuration Assistant to create a database
Database Configuration Assistant (DBCA): Creates a database from Oracle-supplied
templates, enabling you to copy a preconfigured seed database
Database Upgrade Assistant (DBUA): Guides you through the upgrade of your existing
database to a new Oracle release
Oracle Net Manager: Configures network connectivity for your Oracle databases and
applications.
The following tools are used for managing your oracle instance and database:
2|Page
database. It also interfaces with other oracle components (such as Recovery manager)
that are used to administer your database.
Recovery Manager (RMAN): Oracle tool that provides a complete solution for the
backup, restoration, and recovery needs of the entire database or of specific database
files
Data Pump: Enables the high-speed transfer of data from one database to another
(For example, you may want to export a table and import it into another database.)
SQL*Loader: Enables the loading of data from an external file into an Oracle
database; one of several Oracle utilities that you can use to load data into database
tables
The process of installing the oracle software consists of the following four step:
Before beginning any installation of Oracle software, you need to review several documents so
that you completely understand the installation process, requirements as well as any known
associated issues. These documents may include: The general release notes for the version of
Oracle that you are installing, the operating system–specific release notes for the version of
Oracle that you are installing, The Oracle Database Installation Guide for your operating system
e.g. 12c Release 1 (12.1.0) for Microsoft windows. The latest version of any of these release
notes is always available on Oracle Technology Network website (OTN user accounts are free).
It is located at: http: //www.oracle.com/technology/documentation
Plan the installation: The Oracle Universal Installer, which is described in the subsequent
section, “Using the Oracle Universal Installer,” will perform a quick system check prior to
starting an installation to see if your system meets the specific requirements for your operating
3|Page
system. If your system does not meet the minimum requirements, the installer returns an error
and aborts. It is easy for example, to underestimate the amount of space you need for the
database. A common mistake is not to leave sufficient room for growth. The hardware resources
your database needs depend on a number of factors such as the characteristics of the application,
the expected amount of activity, and the performance targets (such as the response time of
business-critical transactions).
This step involves planning for your server software & hardware specifications to see if they
meet or exceed the specifications in the install documentation. Minimally, this means that you
must confirm that your server meets the installation requirements in these four areas:
The server has adequate memory to perform the install and run an instance
The server has adequate CPU resources to perform the install and run an instance
The server has adequate disk storage space to perform the install and run a database
System Requirements
Memory requirements:
4|Page
Operating system (windows XP, Win7 professional, linux based platforms)
Environment Variables
There are many Oracle environment variables. Those mentioned here are important to the
successful installation and use of an Oracle database. None of these are required to be set, but
you can avoid future problems by setting them before the installation.
ORACLE_BASE :This is root directory for Oracle database software which contains
ORACLE_HOME for Oracle database software and other directories, as shown in the
following example: C:/app/OracleHomeUser1
ORACLE_HOME: Is the directory where you choose to install the software for a
particular Oracle product. It specifies the directory containing the Oracle software for a
given release as shown in the following example:
C:/app/OracleHomeUser1/product/11.1.0/dbhome_1
5|Page
2. Click the Downloads tab.
6|Page
4. The software downloads page displays the files required to download the database. It lists
a set of software files to install software such as, Oracle Database Grid
Infrastructure and Oracle Database Gateways with the Oracle database. Each set displays
a short description of what the file includes. You can choose to download any set of
software depending on your requirement.
5. In this OBE, we install Oracle Database 12c. Accept the license agreement and click the
files under Oracle Database 12c Release ... for Microsoft Windows (x64) to download.
7|Page
6. Log into your Oracle web account. If you do not have an Oracle account, click the "Sign
Up" link to create one. Then choose the location where you want to download the .zip
files.
8|Page
7. After downloading the files, use the default built-in extraction tool provided by Windows,
or tools such as 7-zip to extract the .zip files. In this OBE, we use the built-in extractor to
extract the software files.
8. Choose the folder of your choice and click Extract. In this OBE, we extract the file to
the F:\windows_db_12c\winx64_12c_database_1of2 folder.
9|Page
9. The file winx64_12c_database_2of2.zip must be extracted into the same folder where the
first file was extracted. Right click winx64_12c_database_2of2.zip, select the Extract
All... option and specify the same location where the first file was extracted. In this OBE,
we extract the files to the F:\windows_db_12c\winx64_12c_database_1of2 folder.
Click Extract.
10. The software files are extracted. Expand the winx64_12c_database_1 folder.
10 | P a g e
select all and CTRL + C to copy. Now we have to come back to our folder database 1 and here it
is inside this you have folder Stage, go to it and then go to the folder Components and here paste
all those files which we copied earlier. That’s it. Now we are all set to start the setup and install
Oracle Database 12c on our windows 10.
Step 2: Go to database 1 folder and Right-Click on setup.exe and Run as administrator. Accept
the warning and this will start your Oracle Universal Installer.
Step3: On the First Screen you need to provide your email address if you want to receive all the
notifications and news alerts from oracle. If you do not want it then simply leave these fields
11 | P a g e
empty and move to next. Accept this warning as it’s just reminding you that you didn’t provide
the email id, avoid it and move ahead.
Step4: Software Updates – On this step you have options for installing updates to oracle
database 12c if you have oracle database credentials then choose the first option fill up the login
12 | P a g e
form and download the updates. Or if you already have downloaded the updates on your system
then choose the 2nd option specify the file location and install the updates. The 3rd option will
let you proceed ahead without installing any updates. This is the one that we are going to do now
as we just downloaded fresh and updated copy of oracle 12c software.
Step5: Installation Option – On this screen you will be presented with 3 different installation
options. You can choose any of them according to your needs. In my case I want to install Oracle
server software and want to create a database also. Thus I will choose the first option.
**Important – If you choose the second option then only oracle server will be installed and no
database will be created. You can create a database after the installation of oracle server using
DBCA. You can choose the 3rd option if you want to perform the upgrade of the database and
software. But I will choose the first option and will hit next and move ahead.
13 | P a g e
Step 6: System Class – On this screen you have to choose between Server Class and Desktop
class. If you are installing this oracle database 12c on your laptop or desktop, then select the first
option which is Desktop class. If you are installing oracle 12c on a server which is capable
enough to handle the load of all the server components and processes, then choose the 2nd option
which is Server class.
In my case I am installing Oracle database 12c on a windows 10 professional which is installed
on my laptop thus I will choose the first option and hit next.
14 | P a g e
Step 7: In this step you can (1) choose the folder on which Oracle database will be installed, (2)
Global database name and password, (3) pluggable database name.
Step 8: Prerequisite Checks – On this screen OUI (Oracle Universal Installer) will check for the
prerequisites such as hardware compatibility. If everything goes well then we will be good to
install it. If there is any error, then OUI will show you here. Fortunately, no errors!
Now hit Install. Doing so will start the installation. This installation might take some time
depending on your hardware.
15 | P a g e
Step 9: The installer shows you the summary of the information such as global settings, database
information, etc. You need to review the information and click the install button if everything is
fine.
Here we are the last step where we will unlock the users. Click this password management
button.
16 | P a g e
Now here in this password management window we have all the users which are by default
locked. You can unlock any of them, for example – I want to unlock this user with
name Anonymous. For that I will uncheck the box which is in front of its name and give it a
valid password. Click OK now. Avoid this warning again as it’s reminding you that the password
is not up to the oracle standards. Just hit yes and move ahead.
17 | P a g e
Final Step:
Just hit Yes and move ahead. We are back again on our DBCA windows. Here you can see all
the important information regarding our oracle database such as Global database name, SID of
18 | P a g e
our database, location of the parameter files and the link for our enterprise manager. I would
suggest you to save this link somewhere.
Click ok and this installation is successfully done. Click Close to close OUI.
Database creation prepares several operating system files to work together as an Oracle
Database. You typically create a database during Oracle Database software installation.
However, you can also create a database after installation. Reasons to create a database after
installation may include: You used Oracle Universal Installer (OUI) to install software only, and
did not create a database. You want to create another database (and database instance) on the
same host computer as an existing Oracle database. In this case, this chapter assumes that the
new database uses the same Oracle home as the existing database. You want to make a copy of
(clone) a database. For all these scenarios, The simplest way of creating a database is to use the
Database Configuration Assistant (DBCA) tool.
19 | P a g e
Considerations Before Creating a Database
Before you can create a new database, the following prerequisites must be met:
The desired Oracle software must be installed. This includes setting various environment
variables unique to your operating system and establishing the directory structure for
software and database files.
Sufficient disk storage space must be available for the planned database on the computer
that runs Oracle Database.
It is very important to plan the layout of the underlying operating system files your database will
comprise. Proper distribution of files can improve database performance dramatically by
distributing the I/O during file access. Specifically the physical location of frequently accessed
data dramatically affects the application performance.
You can distribute I/O in several ways when you create your database. For example, you can
place redo log files on separate disks. And you can control data density (number of rows to a
data block). If you create a Fast Recovery Area, Oracle recommends that you place it on a
storage device that is different from that of the datafiles.
Other database creation variables to give planning considerations include, among others:
selecting the Global Database name (plus corresponding SID), familiarizing yourself with the
initialization parameters contained in the initialization parameter file, selecting the appropriate
database character set, and adopting a backup and recovery strategy for your database to
protect it from failure.
With Oracle Database, you typically have a single database that hosts multiple applications. You
do not need multiple databases to run different applications. Instead, you can separate the objects
that support each different application into different schemas in the same database. However,
there may be situations in which you want to create multiple Oracle databases on the same host
computer. When you do this with DBCA, the new databases typically use the same Oracle home
20 | P a g e
directory as the first database, but store database data files separately from those of the first
database. DBCA also enables you to modify a database configuration, delete a database, and
more
Step1
Log on to your computer and run the dbca command. You can also launch DBCA from
Windows start menu.
21 | P a g e
Step3: Database Creation Mode
Select “Advanced Mode” for more customization options : initialization parameters, database
storage location, management options, database sizing, etc.
22 | P a g e
Choose a template of database to be used for the current database installation. By default, you
have the following templates
Custom database
Data Warehouse
The first option is suitable for most database applications. Note that, you can also create the
database from your own predefined templates. Choose the first option and click “Next”.
23 | P a g e
Step6: Provide management options
Set up your database so it can be managed with Oracle Enterprise Manager. Oracle Enterprise
Manager provides Web-based management tools for individual databases, and central
management tools for managing your entire Oracle environment.
If you want to manage you database locally, then select Oracle Enterprise Manager
Express
For central management, select “Register with Enterprise Manager (EM) Cloud Control”.
Provide then your EM credentials.
24 | P a g e
Step7: Specify passwords for the administrative accounts SYS and SYSTEM
Provide strong password for the administrative accounts SYS and SYSTEM. You can choose
different passwords for the two admin accounts or use the same password.
25 | P a g e
Step9: Database files
Indicate the type of storage you would like to setup for your database.
File System: your database files are managed by the file system of your operating system.
Automatic Storage Management (ASM): the database data files are stored in Oracle
Automatic Storage Management (Oracle ASM) disk groups.
Next, specify the locations for the Oracle database files. You can use the default locations
provided by the template or a common location for all database files.
Select a directory for those files if you plan to use File System storage
Enable Archiving. It is highly recommended and provides better protection for your
database for software or hardware failure.
For more storage options, click on the “File Location Variables” button.
26 | P a g e
Step10: Database options
Sample Schemas: The Sample Schemas contains sets of data frequently used in many
course materials and Oracle guides. Oracle recommends that you include them in your
database.
Custom scripts: Select one or more useful SQL scripts to be run after the creation of
your database.
27 | P a g e
Step11: Setting initialization parameters
In this window, you can adjust the values of memory, data block size, processes, character sets
and connection mode initialization parameters.
Memory
With typical settings, you provide a memory size for the SGA and the PGA. You can set
this size using the text field or the slider. You can select “Use Automatic Memory
Management” to have Oracle automatically manages many of the memory components of
the SGA, and allocates memory to individual PGAs as needed.
You can also use “Custom Settings” to define the exact proportions of memories for the
SGA and the PGA.
Processes
Provide the maximum number of processes that can simultaneously connect to the database. This
number should allow for all background processes, user processes, and parallel execution
processes.
28 | P a g e
Character sets
Define the character sets used by your database. You can select the default settings of your
operating system or use the Unicode character set.
29 | P a g e
Connection mode
You can select Dedicated Server Mode or Shared Server Mode.
In Dedicated Server Mode, each client is served by a server processes. This mode is
suitable in small environment with less than 50 users
In Shared Server Mode, clients share allocated pool of ressources. Meke sure you
provide the number of server processes when you select this mode
“Save as a Database Template” to save the current database options as a template for
future use.
“Generate Database Creation Scripts” to generate a SQL database creation script that you
can use later.
30 | P a g e
Step13: Database options summary
This windows displays aa summary of the configuration options that you have chosen for the
database. Note that you can adjust this settings by hitting the “Back” button. I everything is fine,
press the “Finish” button to begin the database installation.
31 | P a g e
DBCA Additional Functions
The opening screen of DBCA gives you three more options other than creating a database:
Delete A Database
Manage Templates
Configure Database
Helps you change the configuration of a database you have already created. If you decide
subsequently to install some optional features, such as Java or OLAP, running DBCA again is
the simplest way to do it. An alternative method is to run the scripts to install the options by
hand, but these are not always fully documented and it is possible to make mistakes; DBCA is
better.
32 | P a g e
Delete A Database
Prompt you for which database you wish to delete, and then give you one more chance to back
out before it deletes all the files that make up the database and invokes ORADIM.EXE to delete
the service as well.
Manage template
Is used to store database definitions for later use . A template is a predefined database definition
that you may use as a starting point while creating a new database. If you do not create a
template as part of the database creation process, you can do it at anytime by invoking the DBCA
and choosing the Manage Templates operation.
The “manage pluggable database” is used to store pluggable database. Pluggable database (PDB)
is a portable collection of schemas, schema objects, and non-schema objects that appear to an
Oracle Net client as a separate database.
Non-seed: This type of template is used to create a new database from scratch. It contains
the characteristics of the database to be created.
Seed: This type of template contains both the structure and the physical datafiles of an
existing (seed) database. When you select a seed template, database creation is faster
because the physical files and schema of the database have already been created. Your
database starts as a copy of the seed database, rather than having to be built. The seed
template is useful to clone a database from one to another.
33 | P a g e
The DBCA guides you through the steps to create a database design template. Note that the
templates you created will appear in the database templates list when you attempt to create a
new database using DBCA.
If you no longer need a specific template, you can use the “Delete a Database Template” on the
Template management page of DBCA to delete it.
34 | P a g e
Fig: Oracle Net Configuration Assistant: Welcome
1. Choose Listener Configuration on the welcome screen shown in Fig.3.1 above, and click
the Next button.
2. Choose Add on the Listener Configuration, Listener screen shown in Fig.3.2 below and
click Next.
35 | P a g e
3. Enter a listener name—for example, LISTENER on the Listener Configuration, Listener
Name screen shown and oracle home user password in Fig.3.3 below and click Next.
4. Choose which network protocols should be used on the Listener Configuration, Select
Protocols screen shown in Fig.3.4 below. TCP is the most common choice—and click
Next.
36 | P a g e
5. Choose a network port for the listener on the Listener Configuration, TCP/IP protocols
screen shown in Fig.3.5 below—1521 is the most common choice—and click Next.
6. Select No from the Listener Configuration: More Listeners? screen shown in Fig.3.6 and
click Next. It should only take a few seconds to configure and start the listener.
37 | P a g e
Fig: Oracle Net Configuration Assistant: Listener Configuration Done
Oracle then displays the success message shown in Fig.3.7, above. To check that a listener has
been created and started, you can use the command: lsnrctl status which will display output
similar to that shown in Listing below. Because you have not created a database yet, Oracle
reports that the listener supports no services; this is expected.
38 | P a g e
2.3.Managing Initialization Parameters Using a Server Parameter File
2.3.1. Viewing Initialization Parameters
The following table describes the methods you can use to view the current initialization
parameter settings:
SHOW PARAMETERS: this command to display the parameter values that are
currently in effect.
SQL> SHOW PARAMETER
V$PARAMETER view: Query this view to display the parameter values that are
currently in effect.
SQL> SELECT NAME, VALUE FROM V$PARAMETER WHERE NAME = ‘SPFILE';
V$SPPARAMETER view: Query this view to display the current contents of the server
parameter file.
SQL> SELECT NAME, VALUE FROM V$SPPARAMETER WHERE NAME = ‘SPFILES';
The server parameter file is a binary file and therefore cannot be edited manually.
To change values in the server parameter file, you must export it to an editable format, make
changes, and then import it back into a server parameter file, or use the ALTER SYSTEM
SET statement to change the server parameter values.
1. Use the SQL CREATE PFILE statement to export the server parameter file to a text
initialization parameter file. An initialization parameter file is a text file and can therefore
be edited manually. You must have the SYSDBA or the SYSOPER system privilege to
execute this statement. The exported file is created on the database server system. It
contains any comments associated with the parameter in the same line as the parameter
setting.
39 | P a g e
2. Edit the initialization parameter file.
3. Use the SQL CREATE SPFILE statement to create a new server parameter file from the
edited initialization parameter file. You must have the SYSDBA or
the SYSOPER system privilege to execute this statement.
Example
This example creates a text initialization parameter file from a server parameter file where the
names of the files are specified:
This example creates a server parameter file from the initialization parameter file
SCOPE = SPFILE: The parameter is altered in the SPFILE only. It does not affect the
current instance. The change made in the alter system command will take place starting
from the next startup but will not affect the current instance.
SCOPE = MEMORY: The parameter takes affect in the current instance, but is not
stored in the SPFILE. Oracle will make the change specified by the alter
system command for the life of the instance. The next time the database is bounced, for
any reason, the change will be reverted to the default value.
SCOPE = BOTH: (Default) The parameter takes affect in the current instance and is
stored in the SPFILE. If you want the alter system command to take place immediately
you can use the scope = both value, which will make the change for the current instance
and preserve it through any future bounces.
SQL>Alter system set db_2k_cache_size=100m SCOPE=SPFILE;
40 | P a g e
If you want to make a change to a parameter in the spfile without affecting the current instance,
you can do so using the SCOPE=SPFILE option of the ALTER SYSTEM statement. This is
useful when you want to make a change starting from the next startup and not for the current
instance.
In the example above, the SCOPE=MEMORY tells Oracle to make the change for the life of the
instance, and to change it back to the default value the next time the database is bounced.
When you specify SCOPE=BOTH, the change will be made immediately, and Oracle will also
make the change permanent, even after the database is bounced.
41 | P a g e