oracle 11g 手工建库

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle 11g 手工建库相关的知识,希望对你有一定的参考价值。

创建密码文件

cd $ORACLE_HOME/dbs

orapwd file=orapwogg02 password=oracle entries=5


mkdir -p $ORACLE_BASE/flash_recovery_area

mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/adump

mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/dpdump

mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/pfile

mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/scripts


cd $ORACLE_HOME

cd dbs


cat init.ora|grep -v ^$|grep -v ^# > initicsdb.ora


vim 编辑icsdb.sh 文件


db_name=‘icsdb‘      #此处设置为SID

memory_target=450M   #SGA 大小

processes = 150      #连接数

audit_file_dest=‘/oracle/admin/icsdb/adump‘

audit_trail =‘db‘

db_block_size=8192   #块大小

db_domain=‘‘

db_recovery_file_dest=‘/oracle/flash_recovery_area‘  #指定快速恢复区路径

db_recovery_file_dest_size=2G

diagnostic_dest=‘/oracle‘   #oracle 软件安装目录

dispatchers=‘(PROTOCOL=TCP) (SERVICE=ORCLXDB)‘

open_cursors=300

remote_login_passwordfile=‘EXCLUSIVE‘

undo_tablespace=‘UNDOTBS‘      #指定control 文件路径

control_files = (/ora_data/icsdb/control01.ctl, /ora_data/icsdb/control02.ctl)

compatible =‘11.2.0‘



启动实例到nomount状态

sqlplus  / as sysdba

SQL> startup nomount pfile=‘$ORACLE_HOME/dbs/initicsdb.ora‘

SQL> create spfile from pfile;



运行如下脚本:

CREATE DATABASE icsdb

   USER SYS IDENTIFIED BY sys_password

   USER SYSTEM IDENTIFIED BY system_password

   LOGFILE GROUP 1 (‘/ora_data/icsdb/redo01a.log‘,‘/ora_data/icsdb/redo01b.log‘) SIZE 100M BLOCKSIZE 512,

           GROUP 2 (‘/ora_data/icsdb/redo02a.log‘,‘/ora_data/icsdb/redo02b.log‘) SIZE 100M BLOCKSIZE 512,

           GROUP 3 (‘/ora_data/icsdb/redo03a.log‘,‘/ora_data/icsdb/redo03b.log‘) SIZE 100M BLOCKSIZE 512

   MAXLOGFILES 5

   MAXLOGMEMBERS 5

   MAXLOGHISTORY 1

   MAXDATAFILES 100

   CHARACTER SET US7ASCII

   NATIONAL CHARACTER SET AL16UTF16

   EXTENT MANAGEMENT LOCAL

   DATAFILE ‘/ora_data/icsdb/system01.dbf‘ SIZE 325M REUSE

   SYSAUX DATAFILE ‘/ora_data/icsdb/sysaux01.dbf‘ SIZE 325M REUSE

   DEFAULT TABLESPACE users

      DATAFILE ‘/ora_data/icsdb/users01.dbf‘

      SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

   DEFAULT TEMPORARY TABLESPACE tempts1

      TEMPFILE ‘/ora_data/icsdb/temp01.dbf‘

      SIZE 50M REUSE

   UNDO TABLESPACE undotbs

      DATAFILE ‘/ora_data/icsdb/undotbs01.dbf‘

      SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

      


#create oracle dictionary information

 

@?/rdbms/admin/catalog.sql

@?/rdbms/admin/catproc.sql

 

conn / as system

@?/sqlplus/admin/pupbld.sql

 

The database was created successfully


本文出自 “记录点滴学习生活” 博客,请务必保留此出处http://ureysky.blog.51cto.com/2893832/1918307

以上是关于oracle 11g 手工建库的主要内容,如果未能解决你的问题,请参考以下文章

oracle11g 手工建库步骤

oracle 11g 端口号怎么找

Aix Oracle11g裸设备建库

oracle 11g rac dbca建库时提示创建监听

Oracle11gR2--手工建库&dbca建库

linux下oracle手工建库过程