Benjamin Zhang

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

【Oracle安装部署】静默安装Oracle12C数据库(NON-CDB)

25 Mar 2019 » Oracle

静默安装Oracle12C软件

1.版本查看

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

2.配置环境变量

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

3.静默安装Oracle数据库

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

日志如下:

[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Copying database files
1% complete
2% complete
18% complete
33% complete
Creating and starting Oracle instance
35% complete
40% complete
44% complete
49% complete
50% complete
53% complete
55% complete
Completing Database Creation
56% complete
57% complete
58% complete
62% complete
65% complete
66% complete
Executing Post Configuration Actions
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 12.2.0.1.0 Production on Mon Mar 25 15:51:04 2019

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/12.2/db_1/dbs/arch
Oldest online log sequence     1
Current log sequence           1

SQL> column open_mode format a12;
SQL> select name,open_mode,cdb from v$database;

NAME                        OPEN_MODE    CDB
--------------------------- ------------ ---------
ARPDB                       READ WRITE   NO

SQL> select name from v$datafile
  2  UNION
  3  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