步骤不多,所以就简单把步骤贴出来,没有中文等注释,仅作为个人笔记,如果有网友看了不明白或是其中有错误请赐教,电邮:rilee@qq.com,多多交流!
- #cat /etc/issue
- Red Hat Enterprise Linux Server release 5.5 (Tikanga)
- #sqlplus / as sysdba
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
- #fdisk /dev/sdb
- #ls /dev/sdb*
- /dev/sdb /dev/sdb10 /dev/sdb12 /dev/sdb2 /dev/sdb4 /dev/sdb6 /dev/sdb8
- /dev/sdb1 /dev/sdb11 /dev/sdb13 /dev/sdb3 /dev/sdb5 /dev/sdb7 /dev/sdb9
- #chown -R oracle /dev/sdb* && chmod -R 777 /dev/sdb*
- #ll /dev/sdb*
- brwxrwxrwx 1 oracle disk 8, 16 Mar 23 14:48 sdb
- brwxrwxrwx 1 oracle disk 8, 17 Mar 23 14:48 sdb1
- brwxrwxrwx 1 oracle disk 8, 26 Mar 23 14:48 sdb10
- brwxrwxrwx 1 oracle disk 8, 27 Mar 23 14:48 sdb11
- brwxrwxrwx 1 oracle disk 8, 28 Mar 23 14:49 sdb12
- brwxrwxrwx 1 oracle disk 8, 29 Mar 23 14:48 sdb13
- brwxrwxrwx 1 oracle disk 8, 18 Mar 23 14:48 sdb2
- brwxrwxrwx 1 oracle disk 8, 19 Mar 23 14:48 sdb3
- brwxrwxrwx 1 oracle disk 8, 20 Mar 23 14:48 sdb4
- brwxrwxrwx 1 oracle disk 8, 21 Mar 23 14:48 sdb5
- brwxrwxrwx 1 oracle disk 8, 22 Mar 23 14:48 sdb6
- brwxrwxrwx 1 oracle disk 8, 23 Mar 23 14:49 sdb7
- brwxrwxrwx 1 oracle disk 8, 24 Mar 23 14:49 sdb8
- brwxrwxrwx 1 oracle disk 8, 25 Mar 23 14:48 sdb9
- #mkdir -p $ORACLE_BASE/admin/{adump,bdump,cdump,udump}
- #chown -R oracle $ORACLE/admin && chmod -R 775 $ORACLE_BASE/admin
- #cd $ORACLE_HOME/dbs/
- #vim inittestdb.ora
- #cat inittestdb.ora
- db_name=testdb
- compatible='11.2.0.1.0'
- sga_target=512000000
- undo_management='auto'
- undo_tablespace=undotbs
- control_files='/dev/sdb1','/dev/sdb2','/dev/sdb3'
- audit_file_dest='$ORACLE_BASE/admin/testdb/adump'
- background_dump_dest='$ORACLE_BASE/admin/testdb/bdump'
- core_dump_dest='$ORACLE_BASE/admin/testdb/cdump'
- user_dump_dest='$ORACLE_BASE/admin/testdb/udump'
- #orapwd file=testdb password=urpasswd
- #pwd
- /opt/app/oracle/product/11gr2/grid/dbs
- #sqlplus /nolog
- SQL>conn sys/urpasswd as sysdba
- SQL>startup nomount pfile=inittestdb.ora
- SQL>create spfile from pfile;
- SQL>shutdown immediate
- SQL>ho vim createdb.sql
- SQL>ho cat createdb.sql
- CREATE DATABASE testdb USER SYS IDENTIFIED BY rlinux USER SYSTEM IDENTIFIED BY rlinux LOGFILE GROUP 1 ('/dev/sdb13') SIZE 50M, GROUP 2 ('/dev/sdb5') SIZE 50M MAXLOGFILES 30 MAXLOGMEMBERS 5 MAXLOGHISTORY 200 MAXDATAFILES 100 MAXINSTANCES 1 CHARACTER SET UTF8 NATIONAL CHARACTER SET AL16UTF16 DATAFILE '/dev/sdb6' SIZE 200M autoextend on next 10m maxsize unlimited EXTENT MANAGEMENT LOCAL SYSAUX DATAFILE '/dev/sdb7' SIZE 200M autoextend on next 10m maxsize unlimited DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/dev/sdb8' SIZE 200M autoextend on next 10m maxsize unlimited UNDO TABLESPACE undotbs DATAFILE '/dev/sdb9' SIZE 325M AUTOEXTEND ON MAXSIZE UNLIMITED;
- SQL>startup nomount
- SQL>@createdb.sql
- SQL>select * from v$database;
- #echo "chown -R oracle /dev/sdb*" >> /etc/rc.local
- #echo "chmod -R 775 /dev/sdb*" >> /etc/rc.local
- END!!!!
本文出自 “飞熊记事本” 博客,转载请与作者联系!