Benjamin Zhang

目前就职于中科院计算机网络信息中心,主要兴趣集中在数据库,操作系统,中间件。

【Oracle安装部署】静默安装Oracle11gR2数据库(DBCA)

22 Mar 2019 » Oracle

静默安装Oracle11gR2数据库

1.版本查看

数据库版本的信息: 11.2.0.4
OS            : Linux x86_64

2.配置环境变量

数据库的数据目录:/u01/app/oracle/oradata
保证能使用dbca命令.
[root@db ~]# su - oracle
[oracle@db ~]$ which dbca
/u01/app/oracle/product/11.2.0/db_1/bin/dbca

3.静默安装Oracle数据库

oracle@localhost ~]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName arpdb.arp.com -sid arpdb -sysPassword sys -systemPassword sys -emConfiguration NONE -datafileDestination /u01/app/oracle/oradata -storageType FS -characterSet AL32UTF8

日志如下:

Copying database files
1% complete
3% complete
11% complete
18% complete
26% 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/arpdb/arpdb.log" for further details.

4.数据库检测

[oracle@db ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Tue Mar 26 11:09:52 2019

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


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

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     3
Current log sequence           5

SQL> select name,open_mode from v$database;

NAME                        OPEN_MODE
--------------------------- ------------
ARPDB                       READ WRITE

SQL> select name from v$datafile UNION select name from v$tempfile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/arpdb/sysaux01.dbf
/u01/app/oracle/oradata/arpdb/system01.dbf
/u01/app/oracle/oradata/arpdb/temp01.dbf
/u01/app/oracle/oradata/arpdb/undotbs01.dbf
/u01/app/oracle/oradata/arpdb/users01.dbf