Oracle 10g AND Oracle 11g手工建库案例

操作系统: RedHat EL6

OracleOracle 10g and Oracle 11g

手工建库相对来说很容易实现,本案例是从10g和11g,通过手工建库的方式做一个简单的对比,可以看出11g和10g之间的一个简单的差异!

VMware+Linux+Oracle 10G RAC全程详细图解

案例二:

在Oracle 11g 环境下手工建库

DB_NAME='test1'

INSTANCE_NAME='test1'

1、建立Instance的初始化参数文件和口令文件

[oracle@rh6 dbs]$cat inittest1.ora

db_name='test1'

memory_target=400m //Oracle 11g增加了内存自动管理

processes = 150

audit_file_dest='$ORACLE_BASE/admin/test1/adump'

audit_trail ='db'

db_block_size=8192

db_domain=''

open_cursors=300

remote_login_passwordfile='EXCLUSIVE'

undo_tablespace='UNDOTBS1'

# You may want to ensure that control files are created on separate physical

# devices

control_files = /u01/app/oracle/oradata/test1/control01.ctl

compatible ='11.2.0'

[oracle@rh6 dbs]$ orapwd file=orapwtest1 password=oracle entries=3

 

2、建立数据库相关的目录

Oracle 11g增加了diagnostic directory,默认的为$ORACLE_BASE

[oracle@rh6 dbs]$ mkdir -p $ORACLE_BASE/admin/test1/adump

[oracle@rh6 dbs]$ mkdir -p /u01/app/oracle/oradata/test1

3、建立建库脚本

[oracle@rh6 ~]$ cat cr_db.sql

CREATE DATABASE test1

USER SYS IDENTIFIED BY oracle

USER SYSTEM IDENTIFIED BY oracle

LOGFILE

GROUP 1 ('/u01/app/oracle/oradata/test1/redo01a.log') SIZE 50M ,

GROUP 2 ('/u01/app/oracle/oradata/test1/redo02a.log') SIZE 50M

MAXLOGFILES 10

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 200

CHARACTER SET zhs16gbk

DATAFILE '/u01/app/oracle/oradata/test1/system01.dbf' SIZE 325M REUSE

SYSAUX DATAFILE '/u01/app/oracle/oradata/test1/sysaux01.dbf' SIZE 325M REUSE

DEFAULT TEMPORARY TABLESPACE tempts1

TEMPFILE '/u01/app/oracle/oradata/test1/temp01.dbf'

SIZE 100M REUSE

UNDO TABLESPACE undotbs1

DATAFILE '/u01/app/oracle/oradata/test1/undotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

 

4、启动Instance并建立数据库

[oracle@rh6 ~]$ export ORACLE_SID=test1

[oracle@rh6 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Wed May 21 10:59:58 2014

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

10:59:59 SYS@ test1>startup nomount;

ORACLE instance started.

Total System Global Area 417546240 bytes

Fixed Size 2213936 bytes

Variable Size 268437456 bytes

Database Buffers 142606336 bytes

Redo Buffers 4288512 bytes

11:00:12 SYS@ test1>@/home/oracle/cr_db

Database created.

Elapsed: 00:01:23.44

11:01:51 SYS@ test1>

建库告警日志:

CREATE TABLESPACE sysaux DATAFILE '/u01/app/oracle/oradata/test1/sysaux01.dbf' SIZE 325M REUSE

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE

Wed May 21 11:01:08 2014

Completed: CREATE TABLESPACE sysaux DATAFILE '/u01/app/oracle/oradata/test1/sysaux01.dbf' SIZE 325M REUSE

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE

processing ?/rdbms/admin/dplsql.bsq

processing ?/rdbms/admin/dtxnspc.bsq

CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE '/u01/app/oracle/oradata/test1/undotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

Wed May 21 11:01:23 2014

Successfully onlined Undo Tablespace 2.

Completed: CREATE UNDO TABLESPACE UNDOTBS1 DATAFILE '/u01/app/oracle/oradata/test1/undotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

CREATE TEMPORARY TABLESPACE TEMPTS1 TEMPFILE '/u01/app/oracle/oradata/test1/temp01.dbf'

SIZE 100M REUSE

Completed: CREATE TEMPORARY TABLESPACE TEMPTS1 TEMPFILE '/u01/app/oracle/oradata/test1/temp01.dbf'

SIZE 100M REUSE

ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMPTS1

Completed: ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMPTS1

ALTER DATABASE DEFAULT TABLESPACE SYSTEM

Completed: ALTER DATABASE DEFAULT TABLESPACE SYSTEM

processing ?/rdbms/admin/dfmap.bsq

processing ?/rdbms/admin/denv.bsq

processing ?/rdbms/admin/drac.bsq

processing ?/rdbms/admin/dsec.bsq

processing ?/rdbms/admin/doptim.bsq

processing ?/rdbms/admin/dobj.bsq

processing ?/rdbms/admin/djava.bsq

processing ?/rdbms/admin/dpart.bsq

Wed May 21 11:01:34 2014

processing ?/rdbms/admin/drep.bsq

processing ?/rdbms/admin/daw.bsq

processing ?/rdbms/admin/dsummgt.bsq

processing ?/rdbms/admin/dtools.bsq

processing ?/rdbms/admin/dexttab.bsq

processing ?/rdbms/admin/ddm.bsq

processing ?/rdbms/admin/dlmnr.bsq

processing ?/rdbms/admin/ddst.bsq

Wed May 21 11:01:43 2014

SMON: enabling tx recovery

Starting background process SMCO

Wed May 21 11:01:44 2014

SMCO started with pid=17, OS id=2816

Wed May 21 11:01:50 2014

replication_dependency_tracking turned off (no async multimaster replication found)

Starting background process QMNC

Wed May 21 11:01:50 2014

QMNC started with pid=20, OS id=2826

Completed: CREATE DATABASE test1

USER SYS IDENTIFIED BY ****USER SYSTEM IDENTIFIED BY ****LOGFILE

GROUP 1 ('/u01/app/oracle/oradata/test1/redo01a.log') SIZE 50M ,

GROUP 2 ('/u01/app/oracle/oradata/test1/redo02a.log') SIZE 50M

MAXLOGFILES 10

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 200

CHARACTER SET zhs16gbk

DATAFILE '/u01/app/oracle/oradata/test1/system01.dbf' SIZE 325M REUSE

SYSAUX DATAFILE '/u01/app/oracle/oradata/test1/sysaux01.dbf' SIZE 325M REUSE

DEFAULT TEMPORARY TABLESPACE tempts1

TEMPFILE '/u01/app/oracle/oradata/test1/temp01.dbf'

SIZE 100M REUSE

UNDO TABLESPACE undotbs1

DATAFILE '/u01/app/oracle/oradata/test1/undotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

更多详情见请继续阅读下一页的精彩内容

10gRAC-10.2.0.4-dbca建库时配置OEM遇到BUG-p8350262

Oracle 11g R2 手动建库(create database manually)

Oracle 11g + ASM DBCA 建库问题解决心得

Linux下Oracle 10g手工建库全过程

Oracle 9i数据库手工建库过程简记

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/e03abfe133f5a36ccf81dfd4194c1dfa.html