oracle非侵入式接入,Oracle 11g使用DBCA以非交互(静默)方式创建数据库

查看生成的模板文件

[Oracle@jyrac1 templates]$ ls -lrt

total 621628

-rw-r--r-- 1 oracle oinstall    11492 Feb 25  2009 New_Database.dbt

-rw-r--r-- 1 oracle oinstall      5106 Aug 15  2009 Data_Warehouse.dbc

-rw-r--r-- 1 oracle oinstall      4986 Aug 15  2009 General_Purpose.dbc

-rwxr-xr-x 1 oracle oinstall 258654208 Aug 15  2009 Seed_Database.dfb

-rwxr-xr-x 1 oracle oinstall  9748480 Aug 15  2009 Seed_Database.ctl

-rwxr-xr-x 1 oracle oinstall  1179648 Aug 15  2009 example.dmp

-rwxr-xr-x 1 oracle oinstall  22544384 Aug 15  2009 example01.dfb

-rw-r----- 1 oracle oinstall      5124 Mar 24 13:31 jycs.dbc

-rw-r----- 1 oracle oinstall    13476 Apr  8 10:12 jycstemplate.dbt

-rw-r----- 1 oracle oinstall 333955072 Apr  8 10:24 jycsCloneTemplate.dfb

-rw-r----- 1 oracle oinstall  9748480 Apr  8 10:24 jycsCloneTemplate.ctl

-rw-r----- 1 oracle oinstall      4903 Apr  8 10:24 jycsCloneTemplate.dbc

利用带数据文件的模板jycsCloneTemplate生成克隆数据库

[oracle@jyrac1 ~]$ dbca -silent -createDatabase -templateName jycsCloneTemplate.dbc -gdbName test -sid test -datafileJarLocation /u01/app/oracle/11.2.0/db/assistants/dbca/templates -datafileDestination /u01/app/oracle/oradata -responseFile NO_VALUE -characterset ZHS16GBK

Enter SYS user password:

Enter SYSTEM 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/test/test.log" for further details.

[oracle@jyrac1 ~]$ cat /u01/app/oracle/cfgtoollogs/dbca/test/test.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/test.

Database Information:

Global Database Name:test

System Identifier(SID):test

[oracle@jyrac1 ~]$ ps -ef  | grep pmon

oracle  12381    1  0 10:22 ?        00:00:00 ora_pmon_jycs

oracle  14396    1  0 10:39 ?        00:00:00 ora_pmon_test

oracle  14689 29918  0 10:41 pts/1    00:00:00 grep pmon

利用不带数据文件的模板生成新的数据库

[oracle@jyrac1 ~]$ dbca -silent -createDatabase -templateName New_Database.dbt -gdbname jytest  -sid jytest -datafileDestination /u01/app/oracle/oradata -responseFile NO_VALUE -characterset ZHS16GBK

Enter SYS user password:

Enter SYSTEM user password:

Creating and starting Oracle instance

1% complete

3% complete

Creating database files

4% complete

7% complete

Creating data dictionary views

8% complete

9% complete

10% complete

11% complete

12% complete

13% complete

14% complete

16% complete

17% complete

18% complete

19% complete

Adding Oracle JVM

25% complete

30% complete

36% complete

38% complete

Adding Oracle Text

40% complete

41% complete

Adding Oracle XML DB

43% complete

44% complete

45% complete

49% complete

Adding Oracle Multimedia

50% complete

60% complete

Adding Oracle OLAP

61% complete

62% complete

63% complete

64% complete

Adding Oracle Spatial

65% complete

66% complete

67% complete

71% complete

Adding Enterprise Manager Repository

73% complete

75% complete

Adding Oracle Application Express

78% complete

82% complete

Adding Oracle Warehouse Builder

86% complete

90% complete

Completing Database Creation

91% complete

92% complete

93% complete

96% complete

100% complete

Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/jytest/jytest.log" for further details.

[oracle@jyrac1 ~]$ cat /u01/app/oracle/cfgtoollogs/dbca/jytest/jytest.log

Creating and starting Oracle instance

DBCA_PROGRESS : 1%

DBCA_PROGRESS : 3%

Creating database files

DBCA_PROGRESS : 4%

DBCA_PROGRESS : 7%

Creating data dictionary views

DBCA_PROGRESS : 8%

DBCA_PROGRESS : 9%

DBCA_PROGRESS : 10%

DBCA_PROGRESS : 11%

DBCA_PROGRESS : 12%

DBCA_PROGRESS : 13%

DBCA_PROGRESS : 14%

DBCA_PROGRESS : 16%

DBCA_PROGRESS : 17%

DBCA_PROGRESS : 18%

DBCA_PROGRESS : 19%

Adding Oracle JVM

DBCA_PROGRESS : 25%

DBCA_PROGRESS : 30%

DBCA_PROGRESS : 36%

DBCA_PROGRESS : 38%

Adding Oracle Text

DBCA_PROGRESS : 40%

DBCA_PROGRESS : 41%

Adding Oracle XML DB

DBCA_PROGRESS : 43%

DBCA_PROGRESS : 44%

DBCA_PROGRESS : 45%

DBCA_PROGRESS : 49%

Adding Oracle Multimedia

DBCA_PROGRESS : 50%

DBCA_PROGRESS : 60%

Adding Oracle OLAP

DBCA_PROGRESS : 61%

DBCA_PROGRESS : 62%

DBCA_PROGRESS : 63%

DBCA_PROGRESS : 64%

Adding Oracle Spatial

DBCA_PROGRESS : 65%

DBCA_PROGRESS : 66%

DBCA_PROGRESS : 67%

DBCA_PROGRESS : 71%

Adding Enterprise Manager Repository

DBCA_PROGRESS : 73%

DBCA_PROGRESS : 75%

Adding Oracle Application Express

DBCA_PROGRESS : 78%

DBCA_PROGRESS : 82%

Adding Oracle Warehouse Builder

DBCA_PROGRESS : 86%

DBCA_PROGRESS : 90%

Completing Database Creation

DBCA_PROGRESS : 91%

DBCA_PROGRESS : 92%

DBCA_PROGRESS : 93%

DBCA_PROGRESS : 96%

DBCA_PROGRESS : 100%

Database creation complete. For details check the logfiles at:

/u01/app/oracle/cfgtoollogs/dbca/jytest.

Database Information:

Global Database Name:jytest

System Identifier(SID):jytest0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值