ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle11g 手动建库

oracle11g 手动建库

原创 Linux操作系统 作者:fywocp 时间:2013-11-21 10:10:12 0 删除 编辑
(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/,如需转载,请注明出处,否则将追究法律责任。

下一篇: oracle数据块概述
请登录后发表评论 登录
全部评论

注册时间:2013-11-19

  • 博文量
    16
  • 访问量
    110995