• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

12Cdbcasilent

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

 

 

dbca needs a template file to create a database. These template can be found in $ORACLE_HOME/assistants/dbca/templates.
We will use here the default New_Database.dbt template file to create a container database named UXOCDB with one PDB on ASM storage with DATA and FRA diskgroups.
DBCA will install all database components when it is created as container database.

# Execute dbca with ASM option
[oracle]$ dbca -silent \
-createDatabase \
-templateName New_Database.dbt \
-gdbName UXOCDB \
-sid UXOCDB     \
-SysPassword orasyspw \
-SystemPassword orasystempw \
-createAsContainerDatabase true \
-numberofPDBs 1 \
-pdbName UXOPDB \
-pdbAdminPassword orapdbadmpw \
-emConfiguration none  \
-redoLogFileSize 100   \
-recoveryAreaDestination FRA \
-storageType ASM             \
-asmsnmpPassword asmsnmppw \
-diskGroupName DATA \
-recoveryGroupName FRA \
-listeners LISTENER   \
-registerWithDirService false \
-characterSet AL32UTF8 \
-nationalCharacterSet AL16UTF16 \
-databaseType MULTIPURPOSE \
-automaticMemoryManagement true \
-totalMemory 2048 \
-sampleSchema  true \
-initparams audit_file_dest='/u01/app/oracle/admin/UXOCDB/adump' \
-initparams compatible='12.1.0' \
-initparams db_create_file_dest='+DATA' \
-initparams db_create_online_log_dest_1='+DATA' \
-initparams db_create_online_log_dest_2='+FRA' \
-initparams db_recovery_file_dest='+FRA' \
-initparams diagnostic_dest='/u01/app/oracle' \
-initparams parallel_max_servers=8 \
-initparams processes=400
 
Cleaning up failed steps
1% complete
Registering database with Oracle Restart
3% complete
Creating and starting Oracle instance
4% complete
6% complete
Creating database files
9% complete
Creating data dictionary views
10% complete
12% complete
14% complete
15% complete
16% complete
18% complete
Adding Oracle JVM
23% complete
28% complete
32% complete
34% complete
Adding Oracle Text
36% complete
37% complete
Adding Oracle Multimedia
38% complete
46% complete
Adding Oracle OLAP
50% complete
Adding Oracle Spatial
56% complete
Adding Oracle Label Security
62% complete
Adding Oracle Application Express
65% complete
68% complete
Adding Oracle Database Vault
75% complete
Creating cluster database views
81% complete
Completing Database Creation
82% complete
83% complete
84% complete
86% complete
89% complete
90% complete
Creating Pluggable Databases
92% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/UXOCDB/UXOCDB1.log" for further 
 
 
##碰到一个问题,dbca -slient 不指定 LISTENERS ,结果出现一个问题,dbca 将listener.ora 的信息 注册到 tnsnames.ora
 
sample:
 
[Thread-20] [ 2017-03-20 17:17:09.681 GMT+08:00 ] [NetworkUtils.addTNSEntry:4582]  addTNSEntry:name=centrprod
[Thread-20] [ 2017-03-20 17:17:09.682 GMT+08:00 ] [NetworkUtils.addTNSEntry:4583]  addTNSEntry:addr=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=15023))
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.4.123)(PORT=15021))
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.4.30)(PORT=15011))

在/etc/tnsnames.ora 显示如下:
 
LISTENER_db=
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.4.123)(PORT = 15021))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.4.30)(PORT = 15011))

 
fixed:
1.在listener.ora 文件 找到正确的listener.ora 如listener1
 
dbca -slient LISTENERS = listener1
 
 
2.template 参数说明
 

Examples on Silent operations of NETCA and DBCA in Oracle 12c

 #-----------------------------------------------------------------------------
# Name          : LISTENERS
# Datatype      : String
# Description   : Specifies list of listeners to register the database with.
#                 By default the database is configured for all the listeners specified in the
#                 $ORACLE_HOME/network/admin/listener.ora
# Valid values  : The list should be comma separated like "listener1,listener2".
# Mandatory     : NO
#-----------------------------------------------------------------------------
#LISTENERS = "listener1,listener2"

oracle@solaris112:~$ find $ORACLE_HOME -name *.rsp
/u01/app/oracle/product/12.1.0/dbhome_1/inventory/response/db_install.rsp
/u01/app/oracle/product/12.1.0/dbhome_1/inventory/response/oracle.server_EE.rsp
/u01/app/oracle/product/12.1.0/dbhome_1/assistants/netca/netca.rsp
/u01/app/oracle/product/12.1.0/dbhome_1/assistants/netca/netca_custom.rsp
/u01/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/dbca.rsp
/u01/app/oracle/product/12.1.0/dbhome_1/network/install/netca_typ.rsp
/u01/app/oracle/product/12.1.0/dbhome_1/network/install/netca_clt.rsp


oracle@solaris112:~$ cat /u01/app/oracle/product/12.1.0/dbhome_1/assistants/netca/netca.rsp|grep -v ^$|grep -v ^#
[GENERAL]
RESPONSEFILE_VERSION="12.1"
CREATE_TYPE="CUSTOM"
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}


oracle@solaris112:~$ netca -silent -responsefile /u01/app/oracle/product/12.1.0/dbhome_1/assistants/netca/netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /u01/app/oracle/product/12.1.0/dbhome_1/assistants/netca/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control:
      /u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

oracle@solaris112:~$ cp /u01/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/dbca.rsp /u01/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/dbca_orcl2.rsp

oracle@solaris112:~$ cat /u01/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/dbca_orcl2.rsp|grep -v ^$|grep -v ^#
[GENERAL]
RESPONSEFILE_VERSION = "12.1.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "orcl2.dbaglobe.com"
SID = "orcl2"
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "password"
SYSTEMPASSWORD = "password"
CHARACTERSET = "WE8MSWIN1252"
NATIONALCHARACTERSET= "AL16UTF16"
SAMPLESCHEMA=TRUE
TOTALMEMORY = "1200"


oracle@solaris112:~$ dbca -silent -responseFile /u01/app/oracle/product/12.1.0/dbhome_1/assistants/dbca/dbca_orcl2.rsp
Cleaning up failed steps
5% complete
Copying database files
7% complete
9% complete
16% complete
23% complete
30% complete
37% complete
41% complete
Creating and starting Oracle instance
43% complete
48% complete
53% complete
58% complete
62% complete
63% complete
64% complete
67% complete
Completing Database Creation
71% complete
74% complete
78% complete
88% complete
99% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl2/orcl21.log" for further details.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++实现策略(Strategy)模式发布时间:2022-07-13
下一篇:
C语言野指针与空指针发布时间:2022-07-13
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap