Tuesday, February 17, 2009

Step 1 Create Database Manullly

フォルダを作成する

export ORAClE_SID=mynewdb

mkdir myoracle
cd myoracle
mkdir oradata
mkdir admin
cd oradata
mkdir $ORACLE_SID
cd ..
cd admin
mkdir $ORACLE_SID
cd $ORACLE_SID
mkdir adump
mkdir bdump
mkdir cdump
mkdir udump
mkdir pfile

パラメータファイルを作成する

cd pfile
vi init$ORACLE_SID.ora

db_name=mynewdb
db_block_size=4096
sga_target=300m

control_files=(/u01/oracle/myoracle/oradata/mynewdb/control1.ora,/u01/oracle/myoracle/oradata/mynewdb/control2.ora)

undo_management=auto
undo_tablespace=undotbs

audit_file_dest=/u01/oracle/myoracle/admin/mynewdb/adump
background_dump_dest=/u01/oracle/myoracle/admin/mynewdb/bdump
core_dump_dest=/u01/oracle/myoracle/admin/mynewdb/cdump
user_dump_dest=/u01/oracle/myoracle/admin/mynewdb/udump

データベースの作成

CREATE DATABASE mynewdb
USER SYS IDENTIFIED BY pz6r58
USER SYSTEM IDENTIFIED BY y1tz5p
LOGFILE GROUP 1 ('/u01/oracle/myoracle/oradata/mynewdb/redo01.log') SIZE 100M REUSE,
GROUP 2 ('/u01/oracle/myoracle/oradata/mynewdb/redo02.log') SIZE 100M REUSE,
GROUP 3 ('/u01/oracle/myoracle/oradata/mynewdb/redo03.log') SIZE 100M REUSE
MAXLOGFILES 8
MAXLOGMEMBERS 8
MAXLOGHISTORY 1
MAXDATAFILES 300
MAXINSTANCES 1
CHARACTER SET JA16SJIS --US7ASCII
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/u01/oracle/oradata/mynewdb/system01.dbf' SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/u01/oracle/oradata/mynewdb/mynewdb/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE users DATAFILE '/u01/oracle/oradata/mynewdb/users01.dbf' SIZE 50M REUSE
DEFAULT TEMPORARY TABLESPACE temp01
TEMPFILE '/u01/oracle/oradata/mynewdb/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs
DATAFILE '/u01/oracle/oradata/mynewdb/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

No comments: