Published by : Obay Salah , November 18, 2024

 Before starting, it should be noted that we will be using the Windows operating system.

1- Determine the name of the ORACLE_SID (Instance): There may be more than one Oracle Instance on the same server using the ORACLE_SID variable.

D:\ORACLE\PRODUCT\10.2.0>SET ORACLE_SID=ORCL

2- Create Oracle Service because we are working on the WINDOWS operating system, so we need a Service for each Instance running in the WINDOWS operating system, and we do not need that in the LINUX operating system. In short, it is a SERVICE that is created in the WINDOWS

D:\ORACLE\PRODUCT\10.2.0\DB_1>ORADIM –NEW –SID %ORACLE_SID% -INTPWD PASSWORD –STARTMODE M 

The creation can be verified through the operating system by going to Services.

3- Create the Parameter File by copying the file from the following path:

D:\ORACLE\PRODUCT\10.0.0\db_1\database\copy init.ora INITorcl.ora 

If we are working on a Linux operating system (UNIX), the path will be:

$ORACLE_HOME/DBS

Of course, you need to modify the variables file according to the new data, for example:

CONTROL_FILES = (‘D:\oracle\product\10.1.0\oradata\ORCL\CONTROL01. CTL,

D:\oracle\product\10.1.0\oradata\OBAY\CONTROL02.CT L,

D:\oracle\product\10.1.0\oradata\OBAY\CONTROL03.CT L)

UNDO_MANAGEMENT = AUTO

undo_tablespace = ‘UNDO'

DB_NAME    = ORCL

DB_BLOCK_SIZE   = 2918

background_dump_dest = 'D:\oracle\product\10.1.0\admin\orcl\bdump’

user_dump_dest = 'D:\oracle\product\10.1.0\admin\orcl\udump'

core_dump_dest = 'D:\oracle\product\10.1.0\admin\orcl\cdump 

4- Run the Instance in NOMOUNT mode

5- Now we create the database

create database orcl

Logfile

group 1 ('D:\oracle\product\10.1.0\oradata\ORCL\redo1.log') size 10m,

group 2 ('D:\oracle\product\10.1.0\oradata\ORCL\redo2.log') size 10m,
group 3 ('D:\oracle\product\10.1.0\oradata\ORCL\redo3.log') size 10m

datafile
'd:\orcl\system.dbf' size 50m

AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
extent management local sysaux datafile

'D:\oracle\product\10.1.0\oradata\ORCL\sysaux.dbf' size ٠١m
AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED

undo tablespace undo datafile
'D:\oracle\product\10.1.0\oradata\ORCL\undo.dbf' size 20m

default temporary tablespace temp tempfile 'D:\oracle\product\10.1.0\oradata\ORCLtemp.dbf' size 20m
default tablespace userdata١ datafile 'D:\oracle\product\10.1.0\oradata\ORCL\userdb.dbf' size 10m ;

 

 

As I mentioned earlier, you can create the database according to your own requirements, not just as mentioned in the above example, but you must create (SYSAUX & SYSTEM TABLESPACE), and if you do not do that, Oracle will create them for you.

If an error occurs while creating the database, the error will be written to the Alert Log file located in the path specified by the variable BACKGROUND_DUMP_DEST.

If the message 13010-ORA appears while creating the database, this means that the operating system user is not a member of the ORA_DBA group and must be added to the group.

After creating the database, it can be run in MOUNT mode or opened for use.

6- Create the Data Dictionary: - This is done by running the file in the following path: -

D:\ORACLE\PRODUCT\10.1.0\DB_1\RDBMS\ADMIN\CATALOG.SQL 

But the file must be run by the SYS user.

We also run the file on the following path:-

D:\ORACLE\PRODUCT\10.1.0\DB_1\RDBMS\ADMIN\CATPROC.SQL 

This is to create all the structures required to run PL/SQL.

It is not much different when using the UNIX operating system.

Tags : Database

You May Also Like

Comments

no comment yet!