Oracle 11g 使用裸设备
1 查看SID
$ echo $ORACLE_SID
orcl
$ echo $ORACLE_HOME
/u01/app/oracle/product/11g
$ echo $ORACLE_BASE
/u01/app/oracle
$ mkdir -p /u01/oradata/orcl
$ mkdir -p /u01/app/oracle/admin/orcl/adump
$ mkdir -p /u01/app/oracle/diag/rdbms/orcl/orcl/cdump
$ mkdir -p /u01/app/oracle/diag/rdbms/orcl/orcl/trace
2 编辑参数文件
$ vi $ORACLE_HOME/dbs/initorcl.ora
添加下面的内容
audit_file_dest=‘/u01/app/oracle/admin/orcl/adump‘
db_name=orcl
control_files=‘/u01/oradata/orcl/control01.ctl‘
db_block_size=8192
undo_tablespace=‘UNDOTBS1‘
compatible=‘11.2.0.0.0‘
3 建立口令文件
$ orapwd file=$ORACLE_HOME/dbs/pwdorcl.orapassword=oracle
4 启动实例到mount
$ sqlplus / as sysdba
SQL> startup nomount
5 创建spfile的裸设备软连接
$ ln -s /dev/raw/raw11$ORACLE_HOME/dbs/spfileorcl.ora
$ sqlplus / as sysdba
SQL> create spfile from pfile;
SQL> startup nomount force
6 创建数据文件裸设备的软连接
ln -s /dev/raw/raw1/u01/oradata/orcl/system01.dbf
ln -s /dev/raw/raw2/u01/oradata/orcl/sysaux01.dbf
ln -s /dev/raw/raw3/u01/oradata/orcl/temp01.dbf
ln -s /dev/raw/raw4 /u01/oradata/orcl/undotbs101.dbf
ln -s /dev/raw/raw5/u01/oradata/orcl/users01.dbf
7 创建控制文件裸设备的软连接
ln -s /dev/raw/raw6/u01/oradata/orcl/control01.ctl
ln -s/dev/raw/raw7/u01/oradata/orcl/control02ctl
8 创建日志文件裸设备的软连接
ln -s /dev/raw/raw8/u01/oradata/orcl/redo01.log
ln -s /dev/raw/raw9/u01/oradata/orcl/redo02.log
ln -s /dev/raw/raw10/u01/oradata/orcl/redo03.log
9 创建数据文件
CREATE DATABASE orcl
DATAFILE ‘/u01/oradata/orcl/system01.dbf‘SIZE 1023M AUTOEXTEND OFF EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE ‘/u01/oradata/orcl/sysaux01.dbf‘SIZE 1023M
UNDO TABLESPACE UNDOTBS1 DATAFILE‘/u01/oradata/orcl/undotbs101.dbf‘ SIZE 511M
DEFAULT TEMPORARY TABLESPACE TEMPTBSTEMPFILE ‘/u01/oradata/orcl/temp01.dbf‘ SIZE 511M
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
LOGFILE
GROUP 1 (‘/u01/oradata/orcl/redo01.log‘)SIZE 127M,
GROUP 2 (‘/u01/oradata/orcl/redo02.log‘)SIZE 127M,
GROUP 3 (‘/u01/oradata/orcl/redo03.log‘)SIZE 127M;
10 执行脚本
这个用来创建数据字典
@?/rdbms/admin/catalog
@?/rdbms/admin/catproc
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。