如何使用dbca创建bigfile类型的system表空间

在第六步选择数据库类型时,选择custom类型

step 6 choose custom database template

在第十二步的时候,选择customize storage location

choose customize storage location

increase tablespace size
在选择将tablesapce设置位bigfile类型的时候,要将tablespace的大小设置的大一些,否则会在后面创建数据库的时候碰到错误
file size specified is too samll

increase tablespace size

设置tablespace为bigfile tablespace
将数据库设置位bigfile tablespace,一定要点击 apply 按钮,否则不会保存这个设置

set tablespace to bigfile tablespace
How To Create SYSTEM And SYSAUX Tablespace As Bigfile Tablespace Using DBCA

You have to use the custom option and not one of the templates.

you have to configure using the Advance Option and choose the Custom Database template, the other templates do not allow modifying the datafile to bigfile tablespaces

Step 12 of 15 is the create database options page. In right-hand side below generate database creation scripts is a button Customize Storage Locations

This will open a window showing the files to be created , click on the tablespace you wish to modify and select the options table, there is a box that needs to be checked Use Bigfile Tablespace

Do this for each tablespace that you want create as bigfile tablespace.

重点需要注意的地方
第一就是一定要选择‘custom database’在第三步,第二就是在第十二步的时候一定点击apply按钮,否则不会保存bigfile的选择

使用手工建库 如果创建bigfile的tablespace

https://blog.csdn.net/conic9833/article/details/100262825

####################################################################
开门见山:

  一次偶然的机会看到以下语句:

CREATE DATABASE ORCL

USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
SET DEFAULT BIGFILE TABLESPACE
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/orcl/disk1/redo01a.log',
                 '/u01/app/oracle/oradata/orcl/disk2/redo01b.log') SIZE 100M BLOCKSIZE 512,
        GROUP 2 ('/u01/app/oracle/oradata/orcl/disk2/redo02a.log',
                 '/u01/app/oracle/oradata/orcl/disk3/redo02b.log') SIZE 100M BLOCKSIZE 512,
        GROUP 3 ('/u01/app/oracle/oradata/orcl/disk3/redo03a.log',
                 '/u01/app/oracle/oradata/orcl/disk4/redo03b.log') SIZE 100M BLOCKSIZE 512
MAXLOGFILES 50
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 300         -- Maybe you should think about it. 300 is not enough to a huge DB.
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/orcl/disk1/system01.dbf' SIZE 500M REUSE autoextend on
SYSAUX DATAFILE '/u01/app/oracle/oradata/orcl/disk2/sysaux01.dbf' SIZE 325M REUSE autoextend on
DEFAULT TABLESPACE users DATAFILE '/u01/app/oracle/oradata/orcl/disk4/users01.dbf'
    SIZE 50M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
smallfile DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/u01/app/oracle/oradata/orcl/disk5/temp01.dbf'
    SIZE 20M REUSE autoextend on
UNDO TABLESPACE undotbs1 DATAFILE '/u01/app/oracle/oradata/orcl/disk3/undotbs1.dbf'
    SIZE 20M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

能动手,决不吵吵:
由于要准备OCM考试,顺手拿来练练手工建库。结果并未成功:

ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-01501: CREATE DATABASE failed
ORA-01519: error while processing file ‘?/rdbms/admin/dtxnspc.bsq’ near line 20
ORA-00604: error occurred at recursive SQL level 1
ORA-32772: BIGFILE is invalid option for this type of tablespace
Process ID: 22927
Session ID: 1 Serial number: 3

A. 查看 ?/rdbms/admin/dtxnspc.bsq 第20行
# 创建永久表空间,说明已经到创建system表空间的时候报错,不支持BIGFILE???
# 经 cn.bing.com 搜索发现有人声称 system,sysaux 表空间不支持 bigfile tablespace( 没有官方声明连接,保留意见 )。
# 继续搜索发现一博客,用实验展示如何使用『set default bigfile tablespace』手工建库。
# 依样画葫芦,居然成功了。事实证明system, sysaux表空间不支持 bigfile tablespace的说法为臆断。
B. 分析,排错
# 认真分析成功的例子,使用了 db_create_file_dest 参数所以建库语句非常简洁( 保留,以便证实 )
# 将失败语句改装成OMF风格,再来,还是失败!

create database PROD1
user sys identified by oracle
user system identified by oracle
logfile group 1 size 50m,
group 2 size 50m
maxlogmembers 5
maxloghistory 1
maxlogfiles 50
maxdatafiles 1000
character set zhs16gbk
national character set al16utf16
set default bigfile tablespace
extent management local
datafile size 400m
sysaux datafile size 300m
default tablespace users
smallfile default temporary tablespace temp1 tempfile size 100m
undo tablespace undotbs1;
# 经过几番努力和头脑风暴,突然想起前几天使用dbca产生的脚本进行建库
# (生产环境需要11g+rawdevice,11g已经不让在界面上使用rawdevice )的过程。
# 关键点是『 default tablespace users 』在dbca所产生的scripts目录中创建 users 表空间的语句,
# 并非出现在 CreateDB.sql 中而是建库结束后单独一个文件出现
# 尝试删除 default tablespace users 那一行,再执行,成功。
C. 总结,猜想
# 从此次经历看来,由于 Create database 的内部机理所限,对非关键表空间的考虑似乎并不到位( 个人猜测未证实过 )。
# 然而,如果执行 Create Database 语句 成功后立刻马上创建 users 表空间是可以成功的。
# 综上所述,我们不妨把 default tablespace users 放在 Create database 语句的最后一行试试

create database PROD1
user sys identified by oracle
user system identified by oracle
logfile group 1 size 50m,
group 2 size 50m
maxlogmembers 5
maxloghistory 1
maxlogfiles 50
maxdatafiles 1000
character set zhs16gbk
national character set al16utf16
set default bigfile tablespace
extent management local
datafile size 400m
sysaux datafile size 300m
smallfile default temporary tablespace temp1 tempfile size 100m
undo tablespace undotbs1
default tablespace users
# 结果,果然也成功了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值