1.切换环境变量
export ORACLE_SID=liu
2.创建pfile
$ORACLE_HOME/dbs/init.ora
用 cat init.ora | grep -v ^# > initliu.ora
db_name=liu
db_files = 80 # SMALL
db_file_multiblock_read_count = 8 # SMALL
#db_block_buffers = 100 # SMALL
#shared_pool_size = 3500000 # SMALL
log_checkpoint_interval = 10000
processes = 50 # SMALL
parallel_max_servers = 5 # SMALL
#log_buffer = 32768 # SMALL
max_dump_file_size = 10240 # limit trace file size to 5 Meg each
global_names = TRUE
control_files =
('/u02/app/oracle/oradata/liu/control01.ctl','/u02/app/oracle/oradata/liu/contro
l02.ctl','/u02/app/oracle/oradata/liu/control03.ctl')
sga_target=300m
background_dump_dest=/u02/app/oracle/admin/liu/bdump
core_dump_dest=/u02/app/oracle/admin/liu/cdump
user_dump_dest=/u02/app/oracle/admin/liu/udump
undo_management=auto
undo_tablespace=tbs1
3.创建必要的相关目录
bdump cdump udump
mkdir -p /u02/app/oracle/admin/bdump
mkdir -p /u02/app/oracle/admin/cdump
mkdir -p /u02/app/oracle/admin/udump
以nomount方式启动数据库
4.建库脚本
vi db.sql
##################################################################
create database liu
user sys identified by oracle
user system identified by oracle
maxinstances 2
maxlogfiles 20
maxloghistory 20
maxdatafiles 2048
datafile '/u02/app/oracle/oradata/liu/system01.dbf' size 300m autoextend on next
30m maxsize unlimited
sysaux datafile '/u02/app/oracle/oradata/liu/sysaux01.dbf' size 300m autoextend
on next 30m maxsize unlimited
undo tablespace tbs1 datafile '/u02/app/oracle/oradata/liu/undo01.dbf' size 50m
autoextend on next 10m maxsize unlimited
default temporary tablespace temp tempfile
'/u02/app/oracle/oradata/liu/temp01.dbf' size 100m
default tablespace data datafile '/u02/app/oracle/oradata/liu/data01.dbf' size 100m
logfile group 1 ('/u02/app/oracle/oradata/liu/redo01.rdo') size 20m,
group 2 ('/u02/app/oracle/oradata/liu/redo02.rdo') size 20m,
group 3 ('/u02/app/oracle/oradata/liu/redo03.rdo') size 20m;
5.运行脚本
@?/rdbms/admin/catalog
@?/rdbms/admin/catproc
conn system/oracle
@?/sqlplus/admin/pupbld