1. Create necessary directories
mkdir D:\oracle\product\10.2.0\admin\arcl\adump
mkdir D:\oracle\product\10.2.0\admin\arcl\bdump
mkdir D:\oracle\product\10.2.0\admin\arcl\cdump
mkdir D:\oracle\product\10.2.0\admin\arcl\dpdump
mkdir D:\oracle\product\10.2.0\admin\arcl\pfile
mkdir D:\oracle\product\10.2.0\admin\arcl\udump
mkdir D:\oracle\product\10.2.0\db_1\cfgtoollogs\dbca\arcl
mkdir D:\oracle\product\10.2.0\db_1\database
mkdir D:\oracle\product\10.2.0\flash_recovery_area
mkdir D:\oracle\product\10.2.0\oradata\arcl
2. Make necessary files
2.1. first make pfile and save it at the location
D:\oracle\product\10.2.0\db_1\database
2.2. then make password file using following cmd
orapwd file=D:\oracle\product\10.2.0\db_1\database\PWDarcl.ora password=<password> force=y
3. Then set SID using following command
set ORACLE_SID=<SID_Name>
4. Create services using following command
oradim -new -sid <sidname> manual -spfile
oradim -edit -sid TRYDB -startmode auto -srvcstart system
5. Now start and login to sql
sqlplus
/ as sysdba
startup nomount pfile=”D:\oracle\product\10.2.0\admin\arcl\scripts\init.ora”;
6. Then create database using following command
set echo on
spool D:\oracle\product\10.2.0\admin\arcl\scripts\CreateDB.log
startup nomount pfile=”D:\oracle\product\10.2.0\admin\arcl\scripts\init.ora”;
CREATE DATABASE “arcl”
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE ‘C:\oracle\product\10.2.0\oradata\arcl\system01.dbf’ SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE ‘D:\oracle\product\10.2.0\oradata\arcl\sysaux01.dbf’ SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE ‘D:\oracle\product\10.2.0\oradata\arcl\temp01.dbf’ SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE “UNDOTBS1” DATAFILE ‘D:\oracle\product\10.2.0\oradata\arcl\undotbs01.dbf’ SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET WE8MSWIN1252
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 (‘D:\oracle\product\10.2.0\oradata\arcl\redo01.log’) SIZE 51200K,
GROUP 2 (‘D:\oracle\product\10.2.0\oradata\arcl\redo02.log’) SIZE 51200K,
GROUP 3 (‘D:\oracle\product\10.2.0\oradata\arcl\redo03.log’) SIZE 51200K
USER SYS IDENTIFIED BY “&&sysPassword” USER SYSTEM IDENTIFIED BY “&&systemPassword”;
spool off
7. Then create user table for the newly created database using following command
set echo on
spool D:\oracle\product\10.2.0\admin\arcl\scripts\CreateDBFiles.log
CREATE SMALLFILE TABLESPACE “USERS” LOGGING DATAFILE ‘D:\oracle\product\10.2.0\oradata\arcl\users01.dbf’ SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
ALTER DATABASE DEFAULT TABLESPACE “USERS”;
spool off
8. Then run the following scripts to create system tables,views,functions,procedures and authorities
set echo on
spool D:\oracle\product\10.2.0\admin\arcl\scripts\CreateDBCatalog.log
@D:\oracle\product\10.2.0\db_1\rdbms\admin\catalog.sql;
@D:\oracle\product\10.2.0\db_1\rdbms\admin\catblock.sql;
@D:\oracle\product\10.2.0\db_1\rdbms\admin\catproc.sql;
@D:\oracle\product\10.2.0\db_1\rdbms\admin\catoctk.sql;
@D:\oracle\product\10.2.0\db_1\rdbms\admin\owminst.plb;
@D:\oracle\product\10.2.0\db_1\sqlplus\admin\pupbld.sql;
set echo on
spool D:\oracle\product\10.2.0\admin\arcl\scripts\sqlPlusHelp.log
@D:\oracle\product\10.2.0\db_1\sqlplus\admin\help\hlpbld.sql helpus.sql;
spool off
spool off