가. DB이름 결정 : mydb
나. data file, control file, redolog file의 디렉토리 생성
다. alertlog file, trace file의 디렉토리 생성
라. 파라미터 파일 생성
마. 데이터베이스 생성 -> 카타로그 및 데이터딕셔너리 등 생성 스크립트 실행
2. 작업과정
$ export ORACLE_SID=mydb
$ mkdir -p $ORACLE_BASE/oradata/mydb
$ mkdir -p $ORACLE_BASE/admin/mydb/adump
$ mkdir -p $ORACLE_BASE/admin/mydb/bdump
$ mkdir -p $ORACLE_BASE/admin/mydb/cdump
$ mkdir -p $ORACLE_BASE/admin/mydb/udump
$ mkdir -p $ORACLE_BASE/oradata/mydb
$ mkdir -p $ORACLE_BASE/admin/mydb/adump
$ mkdir -p $ORACLE_BASE/admin/mydb/bdump
$ mkdir -p $ORACLE_BASE/admin/mydb/cdump
$ mkdir -p $ORACLE_BASE/admin/mydb/udump
$ vi $ORACLE_HOME/dbs/initmydb.ora
db_cache_size=180355072
java_pool_size=4194304
large_pool_size=4194304
shared_pool_size=92274688
streams_pool_size=0
sga_target=285212672
pga_aggregate_target=94371840
job_queue_processes=10
open_cursors=300
processes=150
db_block_size=8192
db_file_multiblock_read_count=16
audit_file_dest='/home/oracle/admin/mydb/adump'
background_dump_dest='/home/oracle/admin/mydb/bdump'
core_dump_dest='/home/oracle/admin/mydb/cdump'
user_dump_dest='/home/oracle/admin/mydb/udump'
db_recovery_file_dest='/home/oracle/flash_recovery_area'
db_recovery_file_dest_size=2147483648
compatible='10.2.0.5.0'
db_name='mydb'
db_domain=''
control_files=("/home/oracle/oradata/mydb/control01.ctl",
"/home/oracle/oradata/mydb/control02.ctl")
undo_management='AUTO'
undo_tablespace='UNDO'
remote_login_passwordfile='EXCLUSIVE'
java_pool_size=4194304
large_pool_size=4194304
shared_pool_size=92274688
streams_pool_size=0
sga_target=285212672
pga_aggregate_target=94371840
job_queue_processes=10
open_cursors=300
processes=150
db_block_size=8192
db_file_multiblock_read_count=16
audit_file_dest='/home/oracle/admin/mydb/adump'
background_dump_dest='/home/oracle/admin/mydb/bdump'
core_dump_dest='/home/oracle/admin/mydb/cdump'
user_dump_dest='/home/oracle/admin/mydb/udump'
db_recovery_file_dest='/home/oracle/flash_recovery_area'
db_recovery_file_dest_size=2147483648
compatible='10.2.0.5.0'
db_name='mydb'
db_domain=''
control_files=("/home/oracle/oradata/mydb/control01.ctl",
"/home/oracle/oradata/mydb/control02.ctl")
undo_management='AUTO'
undo_tablespace='UNDO'
remote_login_passwordfile='EXCLUSIVE'
$ sqlplus / as sysdb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 |
-- nomount로 시작, 실패시 파라미터 파일 오타확인 startup nomount -- 데이터베이스 생성 create database mydb logfile
group 1 ( '$ORACLE_BASE/oradata/mydb/redo01_a.log' ,
'$ORACLE_BASE/oradata/mydb/redo01_b.log' ) size 5m,
group 2 ( '$ORACLE_BASE/oradata/mydb/redo02_a.log' ,
'$ORACLE_BASE/oradata/mydb/redo02_b.log' ) size 5m datafile '$ORACLE_BASE/oradata/mydb/system01.dbf'
size 200m autoextend on next 20m maxsize unlimited sysaux datafile '$ORACLE_BASE/oradata/mydb/sysaux01.dbf'
size 200m autoextend on next 20m maxsize unlimited undo tablespace undo datafile '$ORACLE_BASE/oradata/mydb/undo01.dbf'
size 100m autoextend on next 20m maxsize 2G default temporary tablespace temp tempfile '$ORACLE_BASE/oradata/mydb/temp01.dbf'
size 20m autoextend on next 20m maxsize 2G; -- 패스워드 설정 alter user sys identified by oracle; alter user system identified by oracle; -- 후속 스크립트 실행 -- catalog.sql : 데이터 딕셔너리 / catproc.sql : pl/sql 필요 패키지, 프로시저 @?/rdbms/admin/catalog.sql @?/rdbms/admin/catproc.sql conn system/oracle -- Product User Profile 테이블 및 관련 프로시저 @?/sqlplus/admin/pupbld.sql @after_db_create.sql |