Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

Manual Method of DB CREATION :

==============================

Types of startup modes :


------------------------

/oracle/app/product/12.2.0.1/dbhome_1 -- oracle_home/dbs

1)startup nomount

-------------------
This is the first stage of database startup sequence .In this it will check
whether database related pfile or spfile exists or not .

Pfile:
=======

pfile is called as parameter file ,In this pfile we can read and write any context
based on our requirement .

The location of pfile will be located at /oracle/app/product/12c/dbhome_1/dbs

vi initGPAY.ora

db_name=GPAY
diagnostic_dest='/oracle/app/diag'
db_unique_name='GPAY_PRIMARY'
db_block_size=8192
undo_tablespace='UNDOTBS'
audit_file_dest='/oracle/app/audit'
audit_trail ='db'
processes=100
control_files='/oracle/app/control/control01.ctl','/oracle/app/control/
control02.ctl'

ENVIRONMNETAL VARIABLES :
=========================
export ORACLE_SID=GPAY
export ORACLE_HOME=/oracle/app/product/12c/dbhome_1
export PATH=/oracle/app/product/12c/dbhome_1/bin:$PATH

env | grep ORA

sqlplus / as sysdba

startup nomount pfile='/oracle/app/product/12c/dbhome_1/dbs/initGPAY.ora';

create spfile from pfile ;

shut immediate ;

startup nomount ;

select status from v$instance;

spfile :
=========
It is system parameter file .It will be located in the /oracle_home/dbs.
The naming convention of the spfile will be initspfile.ora
This will be created with the help of pfile by the below command .
>> create spfile from pfile;

CREATE DATABASE GPAY


MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
LOGFILE
GROUP 1 '/redo1/oradata/GPAY/redo/redo1.log' SIZE 10M,
GROUP 2 '/redo1/oradata/GPAY/redo/redo2.log' SIZE 10M,
GROUP 3 '/redo1/oradata/GPAY/redo/redo3.log' SIZE 10M
DATAFILE
'/data1/oradata/GPAY/data1/system.dbf' size 3g REUSE
sysaux datafile '/data1/oradata/GPAY/data1/sysaux.dbf' size 3g
undo tablespace UNDOTBS datafile '/data1/oradata/GPAY/data1/undo1.dbf' size 3g
DEFAULT TEMPORARY TABLESPACE temp1
TEMPFILE '/data1/oradata/GPAY/data1/temp01.dbf' SIZE 3g REUSE
CHARACTER SET AL32UTF8;

SYSTEM
SYSAUX
TEMP
UNDO

select name,open_mode,log_mode,database_role from v$database;

2)startup mount :
==================

This is the second stage of database startup sequence .This stage will check
whether database controlfiles exists or not .

The information that a controlfile consists of


1)dbname
2)path of datafile
3)path of redologfile
4)path of tempfile
5)characterset

3)startup
==========
It is the final stage of database startup .It will check whether all the datafiles
are exists or not .
In this it will be opened(read write) if all the datafiles are physically exists

======

@/oracle/app/product/12c/dbhome_1/rdbms/admin/catalog.sql >> data dictionary


tables
@/oracle/app/product/12c/dbhome_1/rdbms/admin/catproc.sql >>> pl/sql procedures

We have create a listener ????


------------------------------

Listener is connectivity between client and the database server .

$ORACLE_HOME/network/admin

vi listener.ora

LISTENER_GPAY =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.211.131)(PORT=1545))
)

SID_LIST_LISTENER_GPAY =
(SID_LIST=
(SID_DESC=
(SID_NAME=GPAY)
(ORACLE_HOME= /oracle/app/product/12c/dbhome_1)
)
)

ps -ef | grep tns

lsnrctl start LISTENER_GPAY >>>> to start the listener


lsnrctl status LISTENER_GPAY >>>> to status the listener
lsnrctl stop LISTENER_GPAY >>>> to stop the listener

You might also like