Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

T.Y.B.

Tech (CSE) Subject: Database Engineering Lab

Experiment No. : 1

Title: Installation of Oracle 11g on Windows.


Objectives:
1. To learn basics of database system software.
2. To learn different professional databases available in market
3. To get hands on experience with Oracle 11g Express Edition.

Key Concepts: DBMS, Oracle, SQL Server, DB2.

Introduction:

Database is a collection of related data. Database management system (DBMS) is a


collection of data and set of programs that enables users to create and maintain a database.
Oracle, IBM DB2 and Microsoft SQL Server are the leading database software available in
market.
Oracle is one of the dominating database software provider companies in market.
Brief history of different versions of Oracle:

1. 1979 Version 1 - Not commercially released.

2. 1980 Version 2 - First commercial SQL database (PDP11/VAX)

3. 1982 Version 3 - First portable database (mainframes, minicomputers, and PC); first
RDBMS to support SMP

4. 1984 Version 4 - First portable toolset; first RDBMS for IBM PC, introduced read
consistency, was ported to multiple platforms, interoperability between PC and server.

5. 1986 Version 5 - First distributed database, first true client/server database, VAX-
cluster support, and distributed queries. Row Level Locking.

6. 1988 Version 6 - Oracle Financial Applications built on relational database.

7. 1989 Version 6.2 - Symmetric cluster access using Oracle Parallel Server.

8. 1992 Version 7 - for UNIX, distributed transactions, stored procedures, triggers,


declarative referential integrity, User-Defined Functions, Cost based optimizer,
Varchar2 datatype, ANSI SQL92, Parallel operations including query, load, and index
creation.

Department of computer Science and Engineering. Page 1.1


Textile and Engineering Institute, Ichalkaranji.
T.Y.B.Tech (CSE) Subject: Database Engineering Lab

9. 1994 Version 7 for PC.

10. 1995 Version 7 for 64-bit RDBMS

11. 1997 Version 8 - First web database, object-oriented development and multimedia,
Binary datatypes, Table Partitioning. Very Large Database (VLDB) features.

12. 1998 Oracle8i - Java support, SQLJ, XML and Oracle interMedia.

13. 1999 First RDBMS on Linux.

14. 2000 Oracle8i Release 2 - Oracle tools integrated in middle tier: 9i Application Server
available.

15. 2001 Oracle9i Release 1 - RAC and Advanced Analytic Service (business
intelligence), Fine-grained auditing.

16. 2002 Oracle9i Release 2 - Native XML database.

17. 2004 Oracle10g - Flashback Query, Data Pump, Automatic Storage Management,
Backup Compression.

18. 2007 Oracle 11g - Cube Organized Materialized Views, Database Replay
(performance analyzer), row-level compression, Referential Partitioning, Real
Application Testing (Option)

19. 2009 Oracle 11g R2 - Database File System (DBFS), ASM Intelligent data placement,
column-level compression, Analytic functions 2.0, Recursive WITH clause, In-
Memory Parallel Execution

Oracle 11g:
Oracle 11g XE is a free edition of Oracle database which supports most of the
functionality of Standard edition. 11g XE is available for Windows and Linux.

As with all free versions of databases, XE also has limitations:


 The maximum database size is 11 GB.
 The maximum amount of RAM XE can use is 1 GB.
 Only one instance of Oracle XE can be installed on a single computer.
 XE uses only a single CPU so it does not distribute operations between several
CPUs.

Department of computer Science and Engineering. Page 1.2


Textile and Engineering Institute, Ichalkaranji.
T.Y.B.Tech (CSE) Subject: Database Engineering Lab

Installation:

First, download the Oracle 11g XE and unzip the package. The setup.exe is located at
DISK1 directory. When installation starts, a welcome screen is shown followed by the license
agreement. After these, Oracle checks the requirements for installation, which are:

 Operating system, at least Windows XP


 The user has administrator privileges
 No existing XE instances are found

The next step is to define the installation folder. The default is oraclexe. After that, the
installation prompts for database passwords. This password will be used for both SYS and
SYSTEM. You should use a very strong password as these users are the typical
administrators of an Oracle instance. Also changing for example SYS password to something
else after the installation helps to distinguish these users when logging into the system.

Department of computer Science and Engineering. Page 1.3


Textile and Engineering Institute, Ichalkaranji.
T.Y.B.Tech (CSE) Subject: Database Engineering Lab

And at the end, before the actual installation, the Summary screen is shown. Note, the
default ports that are used for the instance:
 Listener: 1521
 Services for MTS: 2030
 HTTP listener: 8080

Department of computer Science and Engineering. Page 1.4


Textile and Engineering Institute, Ichalkaranji.
T.Y.B.Tech (CSE) Subject: Database Engineering Lab

After the installation has ended, let’s have a look at the things that were installed.

Services
If you open the computer management and have a look at the services installed, you’ll
find five new services.

 OracleServiceXE
This is the actual database engine.

 OracleXETNSListener
This service is responsible for listening to incoming connections and passing
successful connections to the database engine. Note that if this service is down, you
won’t be able to connect to the database remotely. Existing connections won't be
affected.

 OracleJobSchedulerXE
This service is used when external jobs are run. By default, it is disabled. If you plan
to run external jobs (such as executables, batches, etc.), modify the account the service
uses to use proper, low-privileged credentials and start the service.

 OracleXEClrAgent
On Windows platforms, Oracle offers CLR integration. Since a CLR operation is run
using an extproc process, it’s normally done using a dedicated (single threaded)
extproc for a single session. This may not be the optimal way to handle CLR calls.
ClrAgent provides a multi-threaded mechanism so that a single extproc process may
serve several CLR calls.

 OracleMTSRecoveryService
This one is responsible of resolving in-doubt transactions when Oracle is participating
in distributed transactions with Microsoft Transaction Server.

Department of computer Science and Engineering. Page 1.5


Textile and Engineering Institute, Ichalkaranji.
T.Y.B.Tech (CSE) Subject: Database Engineering Lab

Programs

In start menu, few new programs are added:

 Start and Stop Database are used to control the OracleServiceXE service
 Backup and Restore Database are scripts for backing up or restoring the database data
 Run SQL Command Line opens a console based SQL* Plus which can be used to execute
SQL commands or to run scripts against the database
 Get Started opens a web site used for investigating
 storage, the amount of disk space used by tablespaces or drill to segments
 current sessions and basic information about the sessions such as client and application
information and active SQL statement
 parameters show current initialization parameter values.

After login using ‘system’ user credentials, Oracle Application Express is used to create
new user and workspace and for further activities like, writing queries and running

Create User:
We can create a database user with the CREATE USER statement. To create a user,
we must have the CREATE USER system privilege. Because it is a powerful privilege, a
database administrator or security administrator is usually the only user who has the
CREATE USER system privilege.
Each Oracle database has a list of valid database users. To access a database, a user
must run a database application, and connect to the database instance using a valid user name
defined in the database. Oracle Database enables you to set up security for your users in a
variety of ways. When you create user accounts, you can specify limits to the user account.
You can also set limits on the amount of various system resources available to each user as
part of the security domain of that user.

Department of computer Science and Engineering. Page 1.6


Textile and Engineering Institute, Ichalkaranji.
T.Y.B.Tech (CSE) Subject: Database Engineering Lab

Tablespace:
A tablespace is a logical storage unit within an Oracle database. It is considered
logical because a tablespace is not visible in the file system of the machine on which the
database resides.
The tablespace itself is made up of one or more datafiles which are stored in the
server's file system. A datafile belongs to one and only one tablespace (the datafiles are not
shared among tablespaces).
Every table, index, and other object stored in an Oracle database belong to a
tablespace. The tablespace acts as a link or conduit between the database and the physical file
system where the table's or index' data is stored.

Types Of Tablespaces

Oracle uses three types of tablespaces:

 Permanent tablespaces
 Undo tablespaces
 temporary tablespaces

Creating Tablespaces:
Tablespaces are created using the CREATE TABLESPACE command
CREATE TABLESPACE <tablespace_name>

Dropping A Tablespace:
Dropping a tablespace is done using the DROP TABLESPACE command
DROP TABLESPACE ts_tablespace;

Department of computer Science and Engineering. Page 1.7


Textile and Engineering Institute, Ichalkaranji.
T.Y.B.Tech (CSE) Subject: Database Engineering Lab

Connection with Oracle 11g Express Edition:


While creating database applications by using Java as front end and Oracle 11g as
back end, first we have to connect with Oracle 11g. JDBC and Oracle drivers for java
(ojdbc6.rar) are used for connection. It is necessary to set path to \jdk\bin directory and
classpath to working directory and ojdbc6.rar.

Steps to Set Path


1. Start
2. Control Panel
3. System
4. Advanced Tab
5. Environment Variables
6. Select Path
7. Edit
8. Add semicolon; and then add path at the end of \\jdk\\bin

Steps to Set Class path


1. Start
2. Control Panel
3. System
4. Advanced Tab
5. Environment Variables
6. New
7. Give name – classpath
8. Add semicolon; and then add path of the working directory and ojdbc6.jar

Department of computer Science and Engineering. Page 1.8


Textile and Engineering Institute, Ichalkaranji.

You might also like