Oracle 11g使用DBCA以非交互(静默)方式创建数据库(一)

2014-11-24 17:27:03 · 作者: · 浏览: 2

Configure a database by specifying the following parameters:
-configureDatabase
-sourceDB
[-sysDBAUserName
-sysDBAPassword ]
[-registerWithDirService|-unregisterWithDirService|-regenerateDBPassword
-dirServiceUserName
-dirServicePassword
-walletPassword ]
[-disableSecurityConfiguration
[-enableSecurityConfiguration
[-emConfiguration
-dbsnmpPassword
-symanPassword
[-hostUserName
-hostUserPassword
-backupSchedule ]
[-smtpServer
-emailAddress ]
[-centralAgent ]]


使用现有数据库创建模板的参数如下:
Create a template from an existing database by specifying the following parameters:
-createTemplateFromDB
-sourceDB ::> < 服务采用 :: 格式
-templateName 新的模板名
-sysDBAUserName 具有SYSDBA权限的用户名
-sysDBAPassword 具有SYSDBA权限的用户名的口令
[-maintainFileLocations ]


使用现有数据库创建复制模板的参数如下:
Create a clone template from an existing database by specifying the following parameters:
-createCloneTemplate
-sourceSID 源数据库 sid
-templateName 新的模板名
[-sysDBAUserName 具有SYSDBA权限的用户名
-sysDBAPassword ] 具有SYSDBA权限的用户名的口令
[-maintainFileLocations ]
[-datafileJarLocation ] 存放压缩格式数据文件的目录


Generate scripts to create database by specifying the following parameters:
-generateScripts
-templateName
-gdbName
[-scriptDest ]
通过指定以下参数来删除数据库
Delete a database by specifying the following parameters:
-deleteDatabase
-sourceDB
[-sysDBAUserName
-sysDBAPassword ]

使用silent模式可以通过数据库创建模析和通过模板来创建数据库


通过模板来创建数据库
[oracle@jyrac1 ~]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname ora11g -sid ora11g -responseFile NO_VALUE -characterSet AL32UTF8 -memoryPercentage 30 -emConfiguration LOCAL
Enter SYS user password:


Enter SYSTEM user password:


Enter DBSNMP user password:


Enter SYSMAN user password:


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/ora11g/ora11g.log" for further details.
[oracle@jyrac1 ~]$ cat /u01/app/oracle/cfgtoollogs/dbca/ora11g/ora11g.log
Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 3%
DBCA_PROGRESS : 11%
DBCA_PROGRESS : 18%
DBCA_PROGRESS : 26%
DBCA_PROGRESS : 37%
Creating and starting Oracle instance
DBCA_PROGRESS : 40%
DBCA_PROGRESS : 45%
DBCA_PROGRESS : 50%
DBCA_PROGRESS : 55%
DBCA_PROGRESS : 56%
DBCA_PROGRESS : 60%
DBCA_PROGRESS : 62%
Completing Database Creation
DBCA_PROGRESS : 66%
DBCA_PROGRESS : 70%
DBCA_PROGRESS : 73%
DBCA_PROGRESS : 85%
DBCA_PROGRESS : 96%
DBCA_PROGRESS : 100%
Database creation complete. For details check the logfiles at:
/u01/app/oracle/cfgtoollogs/dbca/ora11g.
Database Information:
Global Database Name:ora11g
System Identifier(SID):ora11gThe Database Control URL is https://jyrac1:5500/em


Management Repository has been placed in secure mode wherein Enterprise Manag