You are on page 1of 19

The Oracle server is a database management system that provides an open and

comprehensive integrated data management approach. The Oracle server consists of two parts:

Instance
Database

Assignment of Oracle process set and memory (SGA). Instances can only be opened by
mounting a single database at any point in time. An instance is a combination of memory
structure and process structure. The Oracle instance contains the memory part and the process
of the RDBMS server. The oracle instance consists of a memory structure and a server process
running on the server. Shutting down an instance prevents anyone from accessing the data in
the database. An instance provides an interface between a user and the data he wishes to
manipulate. This instance provides a process for client communication and data access. The
instance also consists of several memory buffers and caches. The Program Global Area (PGA)
is a no-shared, writable memory area related with a user process. The PGA always comprises
stack space for a session, which holds variables and other information related with a session.

Basically an instance can be divided in 3parts:

System Global Area (SGA)


Program Global Areas (PGA)
Background Processes

1. The combination of SGA and Oracle process is called an Oracle database instance.
2. Oracle starts the instance and mounts the database on the instance.
3. Multiple instances can run simultaneously on the same machine, each accessing its own
physical database

A collection of databases of real operating system files. These two parts are closely
related, but the database can be mounted and opened in many cases. An Oracle database

MAY THANDAR KYI Page 1


contains all the physical files belonging to the server (more accurately, it is on the storage
system). An Oracle database consists of physical files on disk. When the instance is shut down,
these files are the ones that persist throughout the data shutdown. All running Oracle databases
are associated with an Oracle instance. Each time the database is started on the database
server; Oracle allocates memory space called the System Global Area (SGA) and starts one or
more Oracle processes. An Oracle database is a storage portion of an RDBMS server. One
distinguishes between physical storage and logical storage. The instance's memory and
processes operate to efficiently manage data in the database and serve one or more users in
the associated database.

The database is composed of 3file types:

Control file
Online redo log
Data file

Fig 1: Home

MAY THANDAR KYI Page 2


Fig 2: Server

Fig 3 :Initialization Parameters Page

MAY THANDAR KYI Page 3


Fig 4: SGA

Fig 5: Tablespaces

MAY THANDAR KYI Page 4


Fig 6: Datafiles

Fig 7: Redo Log Groups

MAY THANDAR KYI Page 5


Fig 8: Control files

Fig 9: Users

MAY THANDAR KYI Page 6


Use the SQL *PLUS STARTUP command to start up an Oracle Database Instance. You
must first be logged into an account that has sysdba or sysoper privileges such as the SYS
account .An instance can be started in various modes:

The instance reads the initialization parameter file, allocates SEG memory, and starts
the background process. Start the instance without mounting the database. It does not allow
access to the database and is normally only done to create the database or recreate or recreate
the control file. A parameter file is required for NOMOUNT mode. It is usually necessary for
some types of recovery operations such as control recovery.

The instance opens the database control file but does not open the data file. Start the
instance and mount the database, but leave it closed. In this state, certain DBA activities are
allowed, but general access to the database is not allowed. A control file is required for MOUNT
mode. Normally it is necessary for data file recovery operation.

This instance opens the database's redo log files and data files. Start the instance,
mount the database and open it. This can be done in unrestricted mode, allowing all users
access, or allowing only database administrators access in restricted mode. In OPEN mode,
data files and online redo log files are required.

Create tablespace INVENSTORY data file '/home/oracle/app/oralcle/oradata/orcl/inv01.dbf

Size 70Mb

Autoextend on maxsize 120Mb

Extend management local uniform size 10Mb

Tablespace name is INVENTORY and size is 70Mb;

MAY THANDAR KYI Page 7


Fig 3.1 Create tablespace INVENTORY

Fig 3.2.View tablespace INVENTORY

MAY THANDAR KYI Page 8


Fig 3.3 View tablespace INVENTORY

Fig 3.4 Tablespace INVENTORY's directory

We write SQL statement for to create a permanent tablespace INVENTORY, and the
size of the tablespace is stored in 70Mb with data file invo1.dbf. This tablespace is locally
managed and permits autoextend going on maximum size 120Mb by increment of 10Mb. With
that permits autoextend; we can get benefits as maximum size cannot larger than 120Mb and
not stop working until range 120Mb when execute the process. Autoextend can be very useful
for the busy DBA by letting oracle automatically increase file sizes to a predetermined limit when
needed, which can make it easier to work one day, minimizing the effort spent to monitor disk
space.

MAY THANDAR KYI Page 9


Privileges are defined as delegating authority to computer systems. Privileges allow the
user to perform actions. As an example of various privileges, you can have permission to read,
write to sockets to create files in directories, read and write files, access devices, and
communicate over Internet.

Users who are delegated a special control level are called privileged users. Users who do not
have most privileges are defined as unprivileged users, regular users, or regular users.

They are two types of privileges:

System
Object

System- Allows users to perform specific actions in the database. It is usually equivalent to
executing the DDL command. System privileges are the right to perform specific actions or
perform actions on specific types of objects. Objects include tables, views, materialized views,
synonyms, indexes, sequences, cache groups, replication schemes and PL / SQL functions,
procedures and packages. Only the instance administrator or a user with ADMIN authority can
grant or revoke system privileges. System privileges allow a user to run certain database
operations or classes of database operations. For example, to create a table, the user must
have created table privilege.

Object- Object privileges are the right to perform certain actions on an object or to access
another user's objects. Objects include tables, views, materialized views, indexes, synonyms,
sequences, cache groups, replication schemes and PL / SQL functions, procedures and
packages.

The owner of the object has all object privileges on that object and cannot revoke that privilege.
An owner of an object can grant object privileges for that object to other database users. A user
with the ADMIN privilege can grant and revoke object privileges from users who do not own the
privileged object. Permissions such as insert, update and delete tables are associated with
objects.

MAY THANDAR KYI Page 10


Fig 5.1 Creating dept_stats view in the AGREEN schema

In this figure, create the view dept_stats in the agreen schema and write query text for
show information.

Fig 5.2 Validation of creating dept_stats view

This figure is the dept_stats view of the agreen schema and the status is valid.

MAY THANDAR KYI Page 11


Fig 5.3 Write SQL* Plus statement for display information

This figure is the display information for the dept_stats view of the agreen schema.

MAY THANDAR KYI Page 12


First the two user identified create there name such as 'May' and 'Thandar'. They two
user are must be create section for their grant. Grants are allowed to user to create for their
session. After create user session and grant session are successful. They two user 'May' and
'Thandar' must be apply to select two user information, update their requirement from the
associate table such as employees table.

In this slight the employee when two changes is salary and she said salary amount
20000. After updating, she is confirming her salary to commit. And employee_id 120 salary is

MAY THANDAR KYI Page 13


select and from associate table. The result will show his salary is 20000. When user 'Thandar'
employee_id 120 salaries produce the salary amount show 20000. Because the user 'May' is
commit her salary to 20000.

When updating 'May' salary to 25000 and update. The user 'Thandar' is select his salary
is 20000 because the user may is not commit his salary.

MAY THANDAR KYI Page 14


In figure, user 'May' update the salary of employee_id (130) to 'Thandar' and 1 row
updated. At the same time, the users 'Thandar' also update the employee_id (130) but cannot
process. This is because data concurrency. Data concurrency ensures that different
transactions can update different rows within the same table without interfering with each other.
The oracle database automatically detects deadlocks and terminates the statement with an
error.

Fig 7.1 Anonymous PL/SQL block

Before, e enable server output 'on'. And, we declare (4) variables as NoOfEmp, AvgSal,
MaxSal and MinSal. In the begin, we write the select query for display information such as the
total number of employees, the average salary, the maximum salary and the minimum salary.
And then, we end the query.

MAY THANDAR KYI Page 15


Fig 8.1Creation of GET_ANNUAL_INCOME function

This figure is the creating of function is known as GET_ANNUAL_INCOME of the Messi


schema and the status is valid. We write the source code that is foundation on the formula of
annual_income = SAL*12+(COMPAC*SAL*12) and then calculate the annual salary.

Fig 8.2 Testing the GET_ANNUAL_INCOME function

This figure is the testing of get_annual _income. In this testing, the tested employee_id has
commission_pct, the output will display but it not the result will now display.

MAY THANDAR KYI Page 16


The Flashback database allows you to rewind the data in the table to a specified point in
time with a single statement. It can restore table data along with related indexes, triggers, and
constraints, while the database is online, undoing the changes only to the indicated tables. It
does not deal with physical corruption, such as faulty disks or the data segment. The Flashback
database uses information in the undo table space. Flashback Database is one of the most
powerful new features of Oracle 10g that comes as part of the backup and recovery
enhancements. Flashback Database uses its private logging mechanism, making flashback logs
and storage them in the Quick Recovery area. Flashback database has insufficient flashback
data to rewind a table space to the target SCN, and then RMAN issues an error and does not
modify the database. System Change Number (SCN) is a special number used to identify
database transactions. When Flashback database fails or is interrupted, the database is left
mounted. Flashback database technology includes the following features:

Flashback Drop (Reverses the effects of a DROP TABLE)


Flashback table (rewinds tables data to a indicated point in time with a single
statement)
Flashback Database (rewind a database to a preceding time to correct problems
produced by logical data corruptions or user errors)
Flashback Query( Version Query, Transaction Query)
Permits querying all data at an indicated point in time
Retrieves all the versions of the rows that exists between two points in time

In information technology (IT), a backup or the progression of backing up is that refers to


the copying and multiplexing of computer data. So, backup system is used for to restore the
original state after the data loss events.

In our lessons, we learned that logical backup of a database consists of logical data
such as tables and stored processes. Logical backup transferred from a database with oracle

MAY THANDAR KYI Page 17


effectiveness and kept in a binary file, in late re-importing to a database using with the matching
import utility. The drawback of logical backup is the total amount of time take to function. Some
benefits of logical backup are:

Logical backup are used for give a test or development copy of Rational RequisitePro
projects. The test or development copies are used for testing a new release of Rational
RequisitePro or to train new clients.
Logical backups are used for significantly altering the database construction such as
transferring the oracle schema for Rational RequisitePro from an oracle tablespace to
other or expending the different oracle schema names.
In the SQL Server, this can also be used for transfer the Rational RequisitePro data to
the different database.

Physical backups are the base ground of each backup and recovery idea. In the physical
backup, copying the files such as data files, control files and archived redo logs that constitute
to the database are included. Logical backups are so very useful adding to the physical backups
but not adequate protection against data destruction without physical backups. We also learned
that an effectiveness backup play must be foundation on physical backup.

https://blog.dbi-services.com/oracle-basics-1-oracle-database-vs-oracle-instance/

http://searchoracle.techtarget.com/answer/Oracle-instance-architecture

http://www.careerride.com/Oracle-what-is-Program-Global-Area.aspx

https://www.safaribooksonline.com/library/view/oracle-database
administration/1565925165/ch10s03s03.html

https://docs.oracle.com/cd/E21901_01/timesten.1122/e21642/privileges.htm#TTSQL341

https://en.wikipedia.org/wiki/Privilege_%28computing%29

MAY THANDAR KYI Page 18


http://docwiki.embarcadero.com/InterBase/XE7/en/The_difference_between_logical_and_physic
al_backups

https://www.ibm.com/support/knowledgecenter/en/SSSHCT_7.1.0/com.ibm.reqpro.help/administ
ering/projects/archiving/c_logical_backups.html

MAY THANDAR KYI Page 19

You might also like