#Section0手动建库
(1)确定实例名
export ORACLE_SID=test
(2)建立密码文件
orapwd file=orapwtest password=oracle
(3)建立pfile
cat init.ora|grep -v ^ #|grep -v $ > inittest.ora
vi inittest.ora
db_name=test
sga_target=350m
controlfiles=(xxx,xxx)
undo_management=auto
processes=150
db_block_size=8192
log_buffer=50000000
undo_tablespace=undotbs
background_dump_dest
croe_dump_dest
user_dump_dest
(4)建立spfile并启动实例
sqlplus / as sysdba
create spfile from pfile;
startup nomount
(5)建库语句
create database test
user sys identified by oracle
user system identified by oracle
logfile group 1 ('/u01/oradata/test/redo01.log') size 100m,
group 2 ('/u01/oradata/test/redo02.log') size 100m,
group 3 ('/u01/oradata/test/redo03.log') size 100m
maxlogfiles 5
maxlogmembers 5
maxloghistory 1
maxdatafiles 100
maxinstances 1
character set us7ascii
national character set al16utf16
datafile '/u01/oradata/test/system01.dbf' size 325m reuse
extent management local
sysaux datafile '/u01/oradata/test/sysaux01.dbf' size 325 reuse
default temporary tablespace tempts1
tempfile '/u01/oradata/test/temp01.dbf' size 20m reuse
undo tablespace undotbs
datafile '/u01/oradata/test/undotbs01.dbf' size 200m reuse autoentend on;
(6)运行脚本
sqlplus / as sysdba
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/catblock.sql
@?/rdbms/admin/catoctk.sql
@?/rdbms/admin/owminst.plb
sqlplus system/oracle
@?/rdbms/admin/pupbld.sql
#section0注意事项
(1)按题目要求设置"字符集"
(2)有5块磁盘,建库建在指定位置
(3)算好冷备时间,使数据库处于open状态
(4)没有明确要求备份时,可以不备份
(5)将两台机器的主机名和IP写入/etc/hosts
参考联机文档
administrator's guid -> creating a oracle database -> manually creating a oracle database