首先复制$ORACLE_HOME/assistants/dbca/templates
下的模板到安装跟目录
然后复制Oracle DB安装盘里面response目录下的dbca.rsp拷贝到本机上
修改dbca.rsp文件,将模板名和DB名添加进去
GDBNAME=orcl
SID=orcl
TEMPLATENAME=orcl.dbc{为了方便,将模板文件拷贝到dbca.rsp相同目录下}
这儿改为:TEMPLATENAME = "General_Purpose.dbc"
如果需要使用Oracle Enterprise Manager,则还需要修改以下参数如下:
EMCONFIGURATION=”LOCAL” SYSMANPASSWORD=”password” DBSNMPPASSWORD=”password”
执行以下命令使用DBCA根据模板创建新数据库
$./dbca –silent –createdatabase –responseFile /home/oracle/dbca.rsp
[oracle@oraclebk ~]$ dbca -silent -createdatabase -responseFile dbca.rsp
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/oracle/product/10.2/cfgtoollogs/dbca/fostTW/fostTW.log" for further details.
[oracle@oraclebk ~]$ cat /u01/oracle/product/10.2/cfgtoollogs/dbca/fostTW/fostTW.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. Check the logfiles at /u01/oracle/product/10.2/cfgtoollogs/dbca/fostTW for details.
Database Information:
Global Database Name:fostTW
System Identifier(SID):fostTWThe Database Control URL is http://oraclebk.localdomain:1158/em
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8183550/viewspace-669460/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8183550/viewspace-669460/