有时候需要装个9i的环境做测试,下面介绍怎么在9中dbca到裸设备上。
lvcreate -n spfile_8M -l 1 vg00
lvcreate -n control1_16M -l 2 vg00
lvcreate -n control2_16M -l 2 vg00
lvcreate -n redo1_104M -l 13 vg00
lvcreate -n redo2_104M -l 13 vg00
lvcreate -n redo3_104M -l 13 vg00
lvcreate -n system_512M -l 64 vg00
lvcreate -n temp_512M -l 64 vg00
lvcreate -n undotbs1_512M -l 64 vg00
lvcreate -n users_16M -l 2 vg00
vi /etc/sysconfig/raw*
添加下面的内容
/dev/raw/raw1 /dev/mapper/vg00-control1_16M
/dev/raw/raw2 /dev/mapper/vg00-control2_16M
/dev/raw/raw3 /dev/mapper/vg00-redo1_104M
/dev/raw/raw4 /dev/mapper/vg00-redo2_104M
/dev/raw/raw5 /dev/mapper/vg00-redo3_104M
/dev/raw/raw6 /dev/mapper/vg00-spfile_8M
/dev/raw/raw7 /dev/mapper/vg00-system_512M
/dev/raw/raw8 /dev/mapper/vg00-temp_512M
/dev/raw/raw9 /dev/mapper/vg00-undotbs1_512M
/dev/raw/raw10 /dev/mapper/vg00-users_16M
# /etc/init.d/rawdevices restart
字符设备就是ls -l 的时候设备类型为c的那个
# chown oracle:oinstall /dev/raw/raw*
vi /etc/rc.d
添加下面的内容
chown oracle:oinstall /dev/raw/raw*
通过上面的几步操作已经把块设备变成字符设备了
# ls -l /dev/raw/
total 0
crw-rw---- 1 oracle oinstall 162, 1 Jul 5 16:30 raw1
crw-rw---- 1 oracle oinstall 162, 10 Jul 5 16:30 raw10
crw-rw---- 1 oracle oinstall 162, 2 Jul 5 16:30 raw2
crw-rw---- 1 oracle oinstall 162, 3 Jul 5 16:30 raw3
crw-rw---- 1 oracle oinstall 162, 4 Jul 5 16:30 raw4
crw-rw---- 1 oracle oinstall 162, 5 Jul 5 16:30 raw5
crw-rw---- 1 oracle oinstall 162, 6 Jul 5 16:30 raw6
crw-rw---- 1 oracle oinstall 162, 7 Jul 5 16:30 raw7
crw-rw---- 1 oracle oinstall 162, 8 Jul 5 16:30 raw8
crw-rw---- 1 oracle oinstall 162, 9 Jul 5 16:30 raw9
su - oracle
rm -rf /u01/oradata/orcl/*
rm -rf $ORACLE_HOME/dbs/spfile_8M
ln -s /dev/raw/raw1 /u01/oradata/orcl/control1_16M
ln -s /dev/raw/raw2 /u01/oradata/orcl/control2_16M
ln -s /dev/raw/raw3 /u01/oradata/orcl/redo1_104M
ln -s /dev/raw/raw4 /u01/oradata/orcl/redo2_104M
ln -s /dev/raw/raw5 /u01/oradata/orcl/redo3_104M
ln -s /dev/raw/raw6 $ORACLE_HOME/dbs/spfile_8M
ln -s /dev/raw/raw7 /u01/oradata/orcl/system_512M
ln -s /dev/raw/raw8 /u01/oradata/orcl/temp_512M
ln -s /dev/raw/raw9 /u01/oradata/orcl/undotbs1_512M
ln -s /dev/raw/raw10 /u01/oradata/orcl/users_16M
vi raw.map
添加下面的内容
control1=/u01/oradata/orcl/control1_16M
control2=/u01/oradata/orcl/control2_16M
redo1=/u01/oradata/orcl/redo1_104M
redo2=/u01/oradata/orcl/redo2_104M
redo3=/u01/oradata/orcl/redo3_104M
spfile=$ORACLE_HOME/dbs/spfile_8M
system=/u01/oradata/orcl/system_512M
temp=/u01/oradata/orcl/temp_512M
undotbs1=/u01/oradata/orcl/undotbs1_512M
users=/u01/oradata/orcl/users_16M
$ cat .bash_profile | grep RAW
export DBCA_RAW_CONFIG=~/raw.map
create a database Next
New Database Next
GLOBAL_DB_NAME,SID Next
去掉所有对勾 Next
右下角 Standard Database features Next
去掉所有对勾 OK Next
use raw device
dedicated server mode Next
Memory
Shared pool 110m
Buffer cache 300m
Java pool 110m
large pool 50m
PGA 100m
All initialization parameter
Character Sets
Choose from the list of character sets
ZHS16GBK
Archive
Archive Log Mode Next
Datafiles
删掉indx01.dbf tools01.dbf xdb01.dbf
Tablespaces
删掉INDX TOOLS XDB
原文地址:http://xiaoyiyi.blog.51cto.com/1351449/1434856