ocm考试之section0手动建库

#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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值