oracle 11g 手工建库

创建密码文件

cd $ORACLE_HOME/dbs

orapwd file=orapwogg02 password=oracle entries=5


mkdir -p $ORACLE_BASE/flash_recovery_area

mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/adump

mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/dpdump

mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/pfile

mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/scripts


cd $ORACLE_HOME

cd dbs


cat init.ora|grep -v ^$|grep -v ^# > initicsdb.ora


vim 编辑icsdb.sh 文件


db_name='icsdb' #此处设置为SID

memory_target=450M #SGA 大小

processes = 150 #连接数

audit_file_dest='/oracle/admin/icsdb/adump'

audit_trail ='db'

db_block_size=8192 #块大小

db_domain=''

db_recovery_file_dest='/oracle/flash_recovery_area' #指定快速恢复区路径

db_recovery_file_dest_size=2G

diagnostic_dest='/oracle' #oracle 软件安装目录

dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'

open_cursors=300

remote_login_passwordfile='EXCLUSIVE'

undo_tablespace='UNDOTBS' #指定control 文件路径

control_files = (/ora_data/icsdb/control01.ctl,/ora_data/icsdb/control02.ctl)

compatible ='11.2.0'



启动实例到nomount状态

sqlplus / as sysdba

sql> startup nomount pfile='$ORACLE_HOME/dbs/initicsdb.ora'

sql> create spfile from pfile;



运行如下脚本:

CREATE DATABASE icsdb

USER SYS IDENTIFIED BY sys_password

USER SYSTEM IDENTIFIED BY system_password

LOGFILE GROUP 1 ('/ora_data/icsdb/redo01a.log','/ora_data/icsdb/redo01b.log') SIZE 100M BLOCKSIZE 512,

GROUP 2 ('/ora_data/icsdb/redo02a.log','/ora_data/icsdb/redo02b.log') SIZE 100M BLOCKSIZE 512,

GROUP 3 ('/ora_data/icsdb/redo03a.log','/ora_data/icsdb/redo03b.log') SIZE 100M BLOCKSIZE 512

MAXLOGFILES 5

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 100

CHARACTER SET US7ASCII

NATIONAL CHARACTER SET AL16UTF16

EXTENT MANAGEMENT LOCAL

DATAFILE '/ora_data/icsdb/system01.dbf' SIZE 325M REUSE

SYSAUX DATAFILE '/ora_data/icsdb/sysaux01.dbf' SIZE 325M REUSE

DEFAULT TABLESPACE users

DATAFILE '/ora_data/icsdb/users01.dbf'

SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

DEFAULT TEMPORARY TABLESPACE tempts1

TEMPFILE '/ora_data/icsdb/temp01.dbf'

SIZE 50M REUSE

UNDO TABLESPACE undotbs

DATAFILE '/ora_data/icsdb/undotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;


#create oracle dictionary information

@?/rdbms/admin/catalog.sql

@?/rdbms/admin/catproc.sql

conn / as system

@?/sqlplus/admin/pupbld.sql

The database was created successfully

相关文章

数据库版本:11.2.0.4 RAC(1)问题现象从EM里面可以看到,在23号早上8:45~8:55时,数据库等待会话暴增...
(一)问题背景最近在对一个大约200万行数据的表查看执行计划时,发现存在异常,理论上应该返回100多万...
(一)删除备份--DELETE命令用于删除RMAN备份记录及相应的物理文件。当使用RMAN执行备份操作时,会在RM...
(1)DRA介绍 数据恢复顾问(Data Recovery Advise)是一个诊断和修复数据库的工具,DRA能够修复数据文...
RMAN(Recovery Manager)是Oracle恢复管理器的简称,是集数据库备份(backup)、修复(restore)和恢复...
(1)备份对象 可以使用RMAN进行的备份对象如下: --整个数据库:备份所有的数据文件和控制文件; --数...