ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 手动建库步骤 10g for linux

手动建库步骤 10g for linux

原创 Linux操作系统 作者:byfree 时间:2012-05-07 18:04:41 0 删除 编辑
1.设置SID
export ORACLE_SID=ocm
 
2.创建口令文件
orapwd file=/u01/app/oracle/product/10.2.0/db_1/dbs/orapwocm password=sys
 
3.准备参数文件init.ora
db_name=ocm
compatible=10.2.0
control_files=(/u01/app/oracle/oradata/control01.dbf,/u01/app/oracle/oradata/control02.dbf,/u01/app/oracle/oradata/control03.dbf)
sga_target=300M
db_block_size=8192
processes=300
undo_management=AUTO
background_dump_dest=/u01/app/oracle/admin/ocm/bdump
core_dump_dest=/u01/app/oracle/admin/ocm/cdump
user_dump_dest=/u01/app/oracle/admin/ocm/udump
准备好相应目录
 
4.连接instance
sqlplus / as sysdba
 
5.创建SPFILE(推荐)
create spfile from pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/init.ora';
shutdown;
exit
 
6.start instance
startup nomount
 
7.create database statement
CREATE DATABASE ocm
USER SYS IDENTIFIED BY sys
USER SYSTEM IDENTIFIED BY sys
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/redo01.log') SIZE 50M,
GROUP 2 ('/u01/app/oracle/oradata/redo02.log') SIZE 50M,
GROUP 3 ('/u01/app/oracle/oradata/redo03.log') SIZE 50M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/u01/app/oracle/oradata/system01.dbf' SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/u01/app/oracle/oradata/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE tbs_1
DATAFILE '/u01/app/oracle/oradata/tbs01.dbf' SIZE 100M REUSE(官方文档缺此行)
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs
DATAFILE '/u01/app/oracle/oradata/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
 
8.创建其它表空间(如需要)
 
9.Run Scripts to Build Data Dictionary Views
connect / as sysdba
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
exit
 
10.Run Scripts to Install Additional Options (Optional)
 
11.Back Up the Database

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

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

注册时间:2008-04-16

  • 博文量
    65
  • 访问量
    210709