(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/o cp/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
完成!
$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/o cp/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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25427762/viewspace-777167/