0% found this document useful (0 votes)
6 views2 pages

Manual Database Creation

Uploaded by

Rawat Vivek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Manual Database Creation

Uploaded by

Rawat Vivek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

5.

Manually create an Oracle 11g database


Steps to manually create an Oracle 11g database on the Linux platform:

1. Set up the relevant environment variables before creating the database. The three
important variables are ORACLE_SID, ORACLE_BASE, and ORACLE_HOME.

The ORACLE_SID variable is the instance identifier, which can be up to 12 characters.

On UNIX platforms, the instance identifier is case sensitive. The ORACLE_BASE parameter
decides where the trace files and dump file directories will be located. ORACLE_HOME is the
location where the Oracle 11g software is installed.

export ORACLE_SID=ora11g
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=/home/oracle/product/11g

2.Create a password file using the ORAPWD utility. This allows administrative logins to the
Oracle 11g database from tools such as EM Database Control.

cd $ORACLE_HOME/dbs
orapwd file=orapwora11g

3. Create an initialization-parameter file. You can create a text-based pfile, and using
SQL*Plus you can create the spfile from the pfile.

cd $ORACLE_HOME/dbs
sqlplus / as sysdba
SQL> create spfile from pfile;

4. Start the instance in NOMOUNT mode:


SQL> startup nomount;

5. Create the database using the CREATE DATABASE statement. This statement creates the
database with SYSTEM, SYSAUX, TEMP, and UNDOTBS1 tablespaces. It creates control files
specified in the location of CONTROL_FILES parameter and redo log files. It also sets a
password for SYS and SYSTEM users.

CREATE DATABASE ora11g


DATAFILE ‘/home/oracle/oradata/ora11g/system01.dbf’
SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE ‘/home/oracle/oradata/ ora11g /sysaux01.dbf’
SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE
‘/home/oracle/oradata/ORA11G/temp01.dbf’
SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE “UNDOTBS1” DATAFILE ‘/home/oracle/oradata/
ora11g /undotbs01.dbf’
SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET WE8MSWIN1252
LOGFILE GROUP 1 ‘/home/oracle/oradata/ora11g/redo01.log’ SIZE
51200K,
GROUP 2 ‘/home/oracle/oradata/ora11g/redo02.log’ SIZE 51200K
USER SYS IDENTIFIED BY mypwd USER SYSTEM IDENTIFIED BY mypwd;

6. Create additional tablespaces if any are needed:


CREATE TABLESPACE “USERS” DATAFILE ‘/home/oracle/oradata/ ora11g /users01.dbf’ SIZE
5M;

7. Build data dictionary views and public synonyms

(? in SQL*Plus refers to the ORACLE_HOME directory):

SQL> @?/rdbms/admin/catalog.sql

8. Build the PL/SQL packages:

SQL> @?/rdbms/admin/catproc.sql

9. If you want to install additional options such as JVM or Oracle Ultra Search, run the
relevant scripts:

SQL> @?/javavm/install/initjvm.sql;

10. Create an EM repository in the database:

SQL> @?/sysman/admin/emdrep/sql/emreposcre $ORACLE_HOME SYSMAN mypwd TEMP


ON;

11. Configure EM Database Control:

$ORACLE_HOME/bin/emca -config dbcontrol db

You might also like