ITPub博客

首页 > 数据库 > Oracle > 不使用dbca进行手工建库的过程

不使用dbca进行手工建库的过程

原创 Oracle 作者:peng163fj 时间:2015-07-15 13:32:56 0 删除 编辑

1.创建目录
[oracle@orcl oradata]$ mkdir rmsdb
[oracle@orcl oradata]$ ls
rmsdb
[oracle@orcl oradata]$ chmod -R 775 rmsdb/


[oracle@orcl rmsdb]$ cd  $ORACLE_BASE/admin
[oracle@orcl admin]$ mkdir  -p adump
[oracle@orcl admin]$ mkdir -p flash_recovery_area




2.创建密码文件
cd $ORACLE_HOME/dbs
orapwd file=orapwdrmsdb password=Passw0rd entries=30


#把init.ora消除注释
cat init.ora|grep -v ^$|grep -v ^# >initrmsdb.ora



3.修改init文件
vi initrmsdb.ora 


db_name='rmsdb'
processes = 550
audit_file_dest='/u01/oracle/app/admin/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='/u01/oracle/app/admin/flash_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/u01/oracle/app/admin/diag'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=500
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
control_files = (/u01/oracle/app/oradata/rmsdb/control1.ctl, /u01/oracle/app/oradata/rmsdb/control2.ctl)
compatible ='11.2.0'




4.修改create database
vi /home/oracle/createdb.sql
CREATE DATABASE rmsdb
   USER SYS IDENTIFIED BY Passw0rd
   USER SYSTEM IDENTIFIED BY Passw0rd
   LOGFILE GROUP 1 ('/u01/oracle/app/oradata/rmsdb/redo01a.log','/u01/oracle/app/oradata/rmsdb/redo01b.log') SIZE 100M BLOCKSIZE 512,
           GROUP 2 ('/u01/oracle/app/oradata/rmsdb/redo02a.log','/u01/oracle/app/oradata/rmsdb/redo02b.log') SIZE 100M BLOCKSIZE 512,
           GROUP 3 ('/u01/oracle/app/oradata/rmsdb/redo03a.log','/u01/oracle/app/oradata/rmsdb/redo03b.log') SIZE 100M BLOCKSIZE 512
   MAXLOGFILES 5
   MAXLOGMEMBERS 5
   MAXLOGHISTORY 1
   MAXDATAFILES 100
   CHARACTER SET ZHS16GBK
   NATIONAL CHARACTER SET AL16UTF16
   EXTENT MANAGEMENT LOCAL
   DATAFILE '/u01/oracle/app/oradata/rmsdb/system01.dbf' SIZE 325M REUSE
   SYSAUX DATAFILE '/u01/oracle/app/oradata/rmsdb/sysaux01.dbf' SIZE 325M REUSE
   DEFAULT TABLESPACE users
      DATAFILE '/u01/oracle/app/oradata/rmsdb/users01.dbf'
      SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
   DEFAULT TEMPORARY TABLESPACE tempts1
      TEMPFILE '/u01/oracle/app/oradata/rmsdb/temp01.dbf'
      SIZE 20M REUSE
   UNDO TABLESPACE undotbs1
      DATAFILE '/u01/oracle/app/oradata/rmsdb/undotbs01.dbf'
      SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

sql>@/home/oracle/createdb.sql
sql>@/u01/oracle/app/product/11.2.0/dbhome_1/rdbms/admin/catalog.sql
sql>@/u01/oracle/app/product/11.2.0/dbhome_1/rdbms/admin/catproc.sql


SELECT dbms_registry_sys.time_stamp('CATPROC') AS timestamp FROM DUAL;


select status from v$instance;




来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21302630/viewspace-1733933/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-11-20

  • 博文量
    155
  • 访问量
    390337