dbca静默建库和删除库

dbca查看帮助:

[oracle@wen ~]$ dbca -help

1)、运行静默建库语句

[oracle@wen ~]$ dbca -silent -cloneTemplate -gdbName wen -sid wen -sysPassword oracle -systemPassword oracle -emConfiguration LOCAL -dbsnmpPassword oracle -sysmanPassword oracle -responseFile /home/oracle/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/app/oracle/cfgtoollogs/dbca/wen/wen.log" for further details.

将wen库运行的users改名:

SQL> select username,account_status from dba_users where account_status=‘OPEN‘;

USERNAME                       ACCOUNT_STATUS

------------------------------ --------------------------------

SYSTEM                         OPEN

SYS                            OPEN

SYSMAN                         OPEN

DBSNMP                         OPEN

MGMT_VIEW                      OPEN

2)使用模板建库

模板位置:

[oracle@wen ~]$ ls $ORACLE_HOME/assistants/dbca/templates/

Data_Warehouse.dbc  example.dmp          New_Database.dbt   Seed_Database.dfb

example01.dfb       General_Purpose.dbc  Seed_Database.ctl

建库语句:

[oracle@wen ~]$ dbca -silent -createDatabase -templateName $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc -gdbName wcw -sid wcw -responseFile NO_VALUE -characterSet al32utf8 -nationalCharacterSet al16utf16

[oracle@wen oradata]$ dbca -silent -createDatabase -templateName $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc -gdbName wcw -sid wcw -responseFile NO_VALUE -characterSet al32utf8 -nationalCharacterSet al16utf16 -emConfiguration LOCAL -dbsnmpPassword oracle -sysmanPassword oracle

静默删除数据库:

[oracle@wen oradata]$ dbca -silent -deleteDatabase -sourceDB wen

Connecting to database

4% complete

9% complete

14% complete

19% complete

23% complete

28% complete

47% complete

Updating network configuration files

48% complete

52% complete

Deleting instance and datafiles

76% complete

100% complete

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

[oracle@wen oradata]$

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。