Step to Create Database Manually
1. Create the directory
adump,bdump,cdump,dpump,pfile,udump,archive, flash_recovery_area under C:\oracle\product\10.2.0\admin folder...
Create testdb directory under C:\oracle\product\10.2.0\oradata\ folder
2. Go Cmd Prompt.
C:\>set oracle_sid=testdb
3 --Create Password File
C:\>orapwd file=C:\oracle\product\10.2.0\db_1\database\pwdtestdb.ora password=khaleel entries=5
4 --- Start Oracle Services
C:\>oradim.exe -new -sid testdb
C:\>oradim.exe -edit -sid testdb -startmode auto -srvcstart system
C:\>sqlplus /nolog
sql>conn / as sysdba
connected
Before running below script check database is shutdown
sql>startup nomount pfile=C:\oracle\product\10.2.0\admin\testdb\pfile\inittestdb.ora
5. --- database creation scripts.
CREATE DATABASE testdb
LOGFILE GROUP 1 ('C:\oracle\product\10.2.0\oradata\testdb\testredo01.log') SIZE 100M REUSE,
GROUP 2 ('C:\oracle\product\10.2.0\oradata\testdb\testredo02.log') SIZE 100M REUSE,
GROUP 3 ('C:\oracle\product\10.2.0\oradata\testdb\testredo03.log') SIZE 100M REUSE
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
ARCHIVELOG
CHARACTER SET WE8MSWIN1252
NATIONAL CHARACTER SET AL16UTF16
DATAFILE 'C:\oracle\product\10.2.0\oradata\testdb\testsystem01.dbf' SIZE 200M REUSE
SYSAUX DATAFILE 'C:\oracle\product\10.2.0\oradata\testdb\testsysaux01.dbf' SIZE 500M
TEMP TABLESPACE TEMP_TESTDB datafile 'C:\oracle\product\10.2.0\oradata\testdb\temptestdb01.dbf' size 500M
USERS TABLESPACE USERS_TESTDB datafile 'C:\oracle\product\10.2.0\oradata\testdb\userstestdb01.dbf' size 500M
UNDO TABLESPACE UNDO_TESTDB datafile 'C:\oracle\product\10.2.0\oradata\testdb\undotest01.dbf' size 500M;
6 --- run after database create script
sql>@C:\oracle\product\10.2.0\db_1\rdbms\admin\catalog.sql;
sql>@C:\oracle\product\10.2.0\db_1\rdbms\admin\catproc.sql;
sql>connect SYSTEM/&&systemPassword
sql>@C:\oracle\product\10.2.0\db_1\sqlplus\admin\pupbld.sql;
sql>conn / as sysdba
sql>shutdown
sql>startup pfile=C:\oracle\product\10.2.0\admin\testdb\pfile\inittestdb.ora
Tuesday, December 23, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment