Create Manual Database in Oracle 19c

Create Manual Database in Oracle 19c

Hi, in this article we are going to discuss how to create a Manual database in oracle 19c. In my last article, we discussed how to create a database in RPM-based installation in the Oracle 19c database.

Our Environment

Operating SystemOracle Linux 7
Database versionOracle Database 19c
Database Nameocptech

So before creating a database we need to create a directory, which we will use to store datafile, redofile, etc.

Login as Oracle user

Open a terminal and follow the below steps to create directory.

$mkdir /u02/ocptech

Create password file

Need to create a password file for the manual database, follow steps.

$cd $ORACLE_HOME/database

$orapwd file=orapwdocptech password=ocptech force=y entries=10 

Create Database Creation script

Go in your database directory and create the script using the following steps.

$cd /u02/ocptech

$vi dbcreate.sql

 CREATE DATABASE ocptech
USER SYS IDENTIFIED BY ocptech 
USER SYSTEM IDENTIFIED BY ocptech 
LOGFILE GROUP 1 (‘/u02/ocptech/redo01.log’) SIZE 50M,
GROUP 2 (‘/u02/ocptech/redo02.log’) SIZE 50M,
GROUP 3 (‘/u02/ocptech/redo03.log’) SIZE 50M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 50
MAXDATAFILES 100
MAXINSTANCES 1
DATAFILE ‘/u02/ocptech/system01.dbf’ SIZE 100M autoextend on
SYSAUX DATAFILE ‘/u02/ocptech/sysaux01.dbf’ SIZE 100M autoextend on
DEFAULT TABLESPACE users datafile ‘/u02/ocptech/users01.dbf’ size 100m autoextend on
DEFAULT TEMPORARY TABLESPACE temp
TEMPFILE ‘/u02/ocptech/temp01.dbf’ SIZE 50m
UNDO TABLESPACE undotbs1
DATAFILE ‘/u02/ocptech/undotbs01.dbf’
SIZE 200M; 

Startup Manual Database in nomount mode

Using the following commands start your database in nomount mode and execute the above script.

$export ORACLE_SID=ocptech
$sqlplus / as sysdba

SQL> startup nomount

SQL>@dbcreate.sql 

Database Created

Post scripts

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

Optional
SQL> @ ?/rdbms/admin/pupbld.sql 

Read more about pupbld.sql Click Here

Check Database Status

SQL>select open_mode,name from v$database.

Read - Oracle 19c RPM based Installation

Connect with me on:

Instagram: https://www.instagram.com/shripaldba
Linkedin: 
https://www.linkedin.com/in/shripal-singh
Twitter: 
https://twitter.com/ocptechnology
Facebook: 
https://www.facebook.com/ocptechnology
YouTube:
 https://www.youtube.com/ocptechnology

2 thoughts on “Create Manual Database in Oracle 19c

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top