Manual Creation of Database in Windows With Oracle9i
Manual Creation of Database in Windows With Oracle9i
################################################### ########################
###
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
###########################################################################
###
###########################################
# Cache and I/O
###########################################
db_block_size=8192
db_cache_size=25165824
db_file_multiblock_read_count=16
###########################################
# Cursors and Library Cache
###########################################
open_cursors=300
###########################################
# Database Identification
###########################################
db_domain=""
db_name=db18
###########################################
# Diagnostics and Statistics
###########################################
1
background_dump_dest=d:\db18
core_dump_dest=d:\db18
timed_statistics=TRUE
user_dump_dest=d:\db18
###########################################
# File Configuration
###########################################
control_files=("d:\db18\control01.ctl", "d:\db18\CONTROL02.ctl",
"d:\db18\CONTROL03.ctl")
###########################################
# Instance Identification
###########################################
instance_name=db18
###########################################
# Job Queues
###########################################
job_queue_processes=10
###########################################
# MTS
###########################################
dispatchers="(PROTOCOL=TCP) (SERVICE=orcl1XDB)"
###########################################
# Miscellaneous
###########################################
aq_tm_processes=1
compatible=9.2.0.0.0
###########################################
# Optimizer
###########################################
hash_join_enabled=TRUE
query_rewrite_enabled=FALSE
star_transformation_enabled=FALSE
###########################################
# Pools
###########################################
java_pool_size=33554432
large_pool_size=8388608
shared_pool_size=50331648
###########################################
# Processes and Sessions
###########################################
processes=150
2
###########################################
# Redo Log and Recovery
###########################################
fast_start_mttr_target=300
###########################################
# Security and Auditing
###########################################
remote_login_passwordfile=EXCLUSIVE
###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
pga_aggregate_target=25165824
sort_area_size=524288
###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_management=AUTO
undo_retention=1
undo_tablespace=UNDOTBS
7. Now type following in your current command prompt sqlplus/nolog and in sql
prompt type conn sys/ceylonlinux_suranga as sysdba then you should see that you
are connected to an idle instance
8. Now start the instance in nomount mode as, startup nomount
pfile=d:\db18\initdb18.ora why are you starting the database in nomount mode ?
The reason is still we are not created control files. “An instance would be started in
the NOMOUNT stage only during database creation or the re-creation of control files.
9. This step is to create the database using dbca.sql script that I saved in d:\db18 folder
appears follows
3
10. Run the script in the SQL prompt as this, SQL>@d:\db18\dbca.sql once you run this
script you can see the control files, redo log file, Alert log file, .dbf files and .trc
(Background Trace files & User Trace files) files are created in d:\db18 folder.
11. Now you can shutdown the database using shutdown command.
12. Once the database shutdown reboot your PC
13. Connect again as sysdba to default database sqlplus/nolog, SQL>conn sys/oracle as
sysdba check which database you are in.
14. If it is not db18 set oracle sid as we did before in another command prompt as set
oracle_sid=db18
15. If db18 windows service is not started start it manually or execute this oradim –
STARTUP –sid db18 –intpwd ceylonlinux_suranga
16. Now connect to the database sqlplus “sys/ceylonlinux_suranga as sysdba”
17. startup pfile=d:\db18\initdb18.ora (Note: Here we don’t need to start the database
in nomount mode because we have already created control files)
18. Execute catalog.sql SQL>@d:\ORANT\rdbms \admin\catalog.sql
19. Execute catproc.sql SQL>@d:\ORANT\rdbms\admin\catproc.sql
Note: if the password file is corrupted or if you get an error in authentication you can recreate
the password file as follows, but make sure to delete the existing password file.
This is what you need to do every time when you start your database…..
C:\Documents and Settings\qq>set oracle_sid=db18
4
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL>
Here are the files that I used…you can change those accordingly
SURANGA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = NEWP4)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = suranga)
)
)
db18 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = NEWP4)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db18)
)
)
INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = NEWP4)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)
5
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = NEWP4)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\ORANT)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = suranga)
(ORACLE_HOME = D:\ORANT)
(SID_NAME = suranga)
)
(SID_DESC =
(GLOBAL_DBNAME = db18)
(ORACLE_HOME = D:\db18)
(SID_NAME = db18)
)
)
Now start OEM console and click “Add Database To Tree” under “Navigator” menu item.
From the window select second radio button saying “Add selected databases from your local
tnsnames.ora file”
From there select db18. Once you select it you should see OEM console as follows
6
7