oracle11g 手動建庫

fywocp發表於2013-11-21
(1)建立密碼檔案
 $orapwd file=orapwocp password=oracle;
(2)建立目錄
$mkdir -p /u01/app/oracle/oradata/ocp
(3)設定引數檔案
$vim $ORACLE_HOME/dbs/initocp.ora
mv init.ora initocp.ora
  
CONTROL_FILES='/u01/app/oracle/oradata/ocp/control01.ctl','/u01/
app/oracle/oradata/ocp/control02.ctl','/u01/app/oracle/oradata/ocp/control03.ctl'
aq_tm_processes=0
db_block_size=8192
db_domain=""
db_file_multiblock_read_count=16
db_name=ocp
instance_name=ocp
dispatchers="(PROTOCOL=TCP) (SERVICE=ocpXDB)"
job_queue_processes=10
nls_length_semantics=BYTE
open_cursors=300
pga_aggregate_target=94371840
processes=150
remote_login_passwordfile=EXCLUSIVE
resource_manager_plan=""
sessions=170
sga_target=285212672
undo_management=AUTO
undo_retention=900
undo_tablespace=UNDOTBS1

(4)建庫指令碼
CREATE DATABASE ocp
   USER SYS IDENTIFIED BY oracle
   USER SYSTEM IDENTIFIED BY oracle
   MAXLOGFILES 5
   MAXLOGMEMBERS 5
   MAXLOGHISTORY 1
   MAXDATAFILES 100
   CHARACTER SET US7ASCII
   NATIONAL CHARACTER SET AL16UTF16
   EXTENT MANAGEMENT LOCAL
   LOGFILE 
GROUP 1 ('/u01/app/oracle/oradata/ocp/redo01.log') SIZE 50M,
GROUP 2 ('/u01/app/oracle/oradata/ocp/redo02.log') SIZE 50M,
GROUP 3 ('/u01/app/oracle/oradata/ocp/redo03.log') SIZE 50M
DATAFILE 
'/u01/app/oracle/oradata/ocp/system01.dbf' SIZE 500M REUSE
SYSAUX DATAFILE '/u01/app/oracle/oradata/ocp/sysaux01.dbf' SIZE 500M REUSE
DEFAULT TEMPORARY TABLESPACE temp
TEMPFILE '/u01/app/oracle/oradata/ocp/temp01.dbf'SIZE 20M REUSE
UNDO TABLESPACE undotbs1
DATAFILE '/u01/app/oracle/oradata/ocp/undotbs01.dbf'SIZE 200M 
REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
  (5)執行指令碼
  @?/rdbms/admin/catalog.sql
  @?/rdbms/admin/catproc.sql
        @?/sqlplus/admin/pupbld.sql
完成!


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25427762/viewspace-777167/,如需轉載,請註明出處,否則將追究法律責任。

相關文章