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
或
[oracle@wen oradata]$ dbca -silent -createDatabase -templateName $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc -gdbName wcw -sid wcw -emConfiguration LOCAL -dbsnmpPassword oracle -sysmanPassword oracle -responseFile NO_VALUE
静默删除数据库:
[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.
克隆数据库
1、通过已有的orcl库静默方式创建一个模板出来:
[oracle@wen ~]$ dbca -silent -createCloneTemplate -sourceSID orcl -templateName chavin
Gathering information from the source database
4% complete
8% complete
13% complete
17% complete
22% complete
Backup datafiles
28% complete
88% complete
Creating template file
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/silent0.log" for further details.
2、通过上文创建模板创建数据库
[oracle@wen ~]$ dbca -silent -createDatabase -templateName $ORACLE_HOME/assistants/dbca/templates/chavin.dbc -gdbName chavin -sid chavin -sysPassword oracle -systemPassword oracle -responseFile NO_VALUE
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
41% complete
46% complete
51% complete
56% complete
57% complete
58% complete
61% 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/chavin/chavin.log" for further details.
最新文章
- freeswitch注册过程分析
- [NHibernate]关联映射
- Android SDK在线更新镜像服务器
- texstudio on ubuntu 12.04
- C语言 百炼成钢3
- Java算法-快速排序
- Autolayout及VFL经验分享
- 解决CSS各种IE各种兼容问题(Google解决方案)
- 调试中除了在URL上加时间戳外,如何避免js、css被返回304状态?
- Permutations,Permutations II,Combinations
- Dom元素的Property和Attribute
- 《java.util.concurrent 包源码阅读》24 Fork/Join框架之Work-Stealing
- 新概念英语(1-117)Tommy's breakfast
- Windows平台安装及配置Hadoop(不借助cygwin)
- 如何在Visual Studio和CodeBlocks中反编译C++代码
- zabbix升级遇到连接不上数据库的问题
- SpringMVC的HandlerMapping(处理器映射器)
- js获取过滤条件中参数的快捷方式
- 登录tomcat服务器首页直接跳转到项目
- 【AI】微软人工智能学习笔记(二)