--===================================
--使用DBCA创建数据库
--===================================
关于如何创建恢复目录数据库及恢复目录脚本,此处省略,请参考:
一、规划数据库
1.创建数据库的目的(高可用性、并发性、数据装载)
2.数据库的应用类型(OLAP,OLTP)
3.数据库存储结构的设计
4.数据库的名称、字符集
5.db_block 块的大小
6.数据库容量的初始大小及增幅
二、建库前需要确认的问题(创建后不可修改)
1.数据库字符集(建议使用AL32UTF8,该字符集支持XML)
2.数据库的名称(SID)
3.数据块的大小
以下是可调整的设置,建议提前确定
1.SGA大小sga_max_size
2.日志缓冲区大小log_buffer
3.最大允许进程数
其他注意事项
1.文件存储方式(文件系统/RAW/ASM)
2.数据文件、日志文件大小、存储位置
3.表空间的构成
三、建库的几种方法
1.通过OUI安装软件后自动调用DBCA来创建
2.手动调用DBCA创建(图型化界面,跨平台)
3.手动执行命令创建
四、查看数据库是否已经创建
方式一:以下方式可以查看使用DBCA已创建的数据库
[oracle@robinson isqlplus]$ more /etc/oratab
/*
#
# This file is used by ORACLE utilities.It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator.A new line terminates
# the entry.Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#$ORACLE_SID:$ORACLE_HOME:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/u01/app/oracle/10g:N
Test:/u01/app/oracle/10g:N
*/
方式二:以下方式查看手动创建的数据库
[oracle@robinson isqlplus]$ ls $ORACLE_BASE/admin /*查看没有使用DBCA创建的数据库*/
Testorcl
[oracle@robinson isqlplus]$ ls /u01/app/oracle/oradata/Test /*如存在文件则表示已安装该库*/
control01.ctlcontrol03.ctlredo01.logredo03.logsystem01.dbfundotbs01.dbf
control02.ctlexample01.dbfredo02.logsysaux01.dbftemp01.dbfusers01.dbf
五、使用DBCA创建数据库
1.打开Linux中的命令行模式
2.在root帐户下执行xhost +
3.切换到oracle 帐户,执行DBCA
4.按提示操作完毕