database's docs

1.3.0 silent模式安装oracle 11G R2 之 安装database实例


0. 使用dbca安装数据库实例

1) 创建数据库相关目录

su - oracle
## Prepare directories for database datafiles and flash recovery area
mkdir /u01/app/oracle/oradata
mkdir /u01/app/oracle/flash_recovery_area

2) 配置dbca.rsp

## Configure database
cd /home/oracle/database/response/
cp dbca.rsp dbca.rsp.bak
vi dbca.rsp
*****************************
# --global database name
GDBNAME = "ORA11G.dbaora.com"

# --instance database name
SID = "ORA11G"

# --template name used to create database
TEMPLATENAME = "General_Purpose.dbc"

# --password for user sys
SYSPASSWORD = "oracle"

# --password for user system
SYSTEMPASSWORD = "oracle"

# --creates database console
EMCONFIGURATION = "LOCAL"

# --password for sysman user
SYSMANPASSWORD = "oracle"

# --password for dbsnmp user
DBSNMPPASSWORD = "oracle"

# --default directory for oracle database datafiles
DATAFILEDESTINATION=/u01/app/oracle/oradata

# --default directory for flashback dataa
RECOVERYAREADESTINATION=/u01/app/oracle/flash_recovery_area

# --storage used to create database
# --FS - it means OS data files
STORAGETYPE=FS

# --database character set
CHARACTERSET = "AL32UTF8"

# --national database character set
NATIONALCHARACTERSET= "AL16UTF16"

# --listener name to register database to
LISTENERS = "LISTENER"

# --force to install sample schemas on the database
SAMPLESCHEMA=TRUE

# --specify database type
# --has influence on some instance parameters
# OLTP: online transaction processing
DATABASETYPE = "OLTP"

# --force to use autmatic mamory management
AUTOMATICMEMORYMANAGEMENT = "TRUE"

# --defines size of memory used by the database
TOTALMEMORY = "800"
*****************************

3) 安装数据库实例

## run database installation
dbca -silent -responseFile /home/oracle/database/response/dbca.rsp
Copying database files
1% complete
3% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ORA11G/ORA11G.log" for further details.

4) 检查数据库实例状态

## 检测效果
sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 20 14:43:49 2016

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter db_name

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
db_name                  string     ORA11G
SQL>

## Check status of database console
emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
https://oel6.dbaora.com:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/oel6.dbaora.com_ORA11G/sysman/log