#SID=welson
1、在$ORACLE_BASE/SID/ 创建dump文件夹,设置日志存放目录
????
$cd $ORACLE_BASE/ $mkdir welson $cd welson $mkdir adump $mkdir bdump $mkdir cdump $mkdir udump
?2、设置数据文件存放目录:
?
???
$cd $ORACLE_BASE/oradata/ $mkdir welson
?3、创建密码文件,设为oracle
?
?
$cd $ORACLE_HOME/dbs $orapwd file=orapwwelson password=oracle
?
?
3、创建$ORACLE_HOME/dbs/initSID.ora文件,其中,SID为实例名称
内容:
?
*.control_files='/u01/app/oradata/welson/control01.ctl','/u01/app/oradata/welson/control02.ctl' *.db_name='welson' *.db_block_size=8192 *.undo_management='AUTO' *.undo_tablespace='UNDOTBS1' *.sga_target=285212672
?可根据实际情况对文件内容进行修改。
?
4、根据3中创建的参数文件创建spfile,启动数据库实例,执行建库脚本
?
$export ORACLE_SID=welson $sqlplus "/as sysdba" SQL>create spfile from pfile; File created SQL>startup nomount ...
?
create database welson user sys identified by oracle user system identified by oracle logfile group 1 ('/u01/app/oradata/welson/redo01.log') size 50M, group 2 ('/u01/app/oradata/welson/redo02.log') size 50M, group 3 ('/u01/app/oradata/welson/redo03.log') size 50M maxlogfiles 5 maxlogmembers 5 maxloghistory 1 maxdatafiles 500 maxinstances 1 character set AL32UTF8 national character set UTF8 datafile '/u01/app/oradata/welson/system.dbf' size 500M extent management local sysaux datafile '/u01/app/oradata/welson/sysaux01.dbf' size 500M default tablespace users01 datafile '/u01/app/oradata/welson/user01.dbf' size 100M default temporary tablespace temp tempfile '/u01/app/oradata/welson/temp01.dbf' size 50M undo tablespace undotbs1 datafile '/u01/app/oradata/welson/undo.dbf' size 50M;
?5、执行脚本
????? @?/rdbms/admin/catalog.sql
????? @?/rdbms/admin/catproc.sql
?
???