不使用dbca進行手工建庫的過程

peng163fj發表於2015-07-15

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章