oracle 静默 添加实例,11gR2单实例dbca静默建库-Oracle

11gR2单实例dbca静默建库

[oracle@rh64 ~]$ dbca -help

dbca [-silent | -progressOnly | -customCreate] { } | { [ [options] ] -responseFile } [-continueOnNonFatalErrors ]

Please refer to the manual for details.

You can enter one of the following command:

Create a database by specifying the following parameters:

-createDatabase

-templateName

[-cloneTemplate]

-gdbName

[-sid ]

[-sysPassword ]

[-systemPassword ]

[-emConfiguration ------->>>>是否配置EM

-dbsnmpPassword

-sysmanPassword

[-hostUserName

-hostUserPassword

-backupSchedule ]

[-centralAgent ]]

[-disableSecurityConfiguration

[-datafileDestination | -datafileNames ]

[-redoLogFileSize ] ------>>>>redolog大小,一般默认就是50M

[-recoveryAreaDestination ]

[-datafileJarLocation ]

[-storageType < FS | ASM > ----->>>>设定存储类型是ASM还是文件系统

[-asmsnmpPassword ]

-diskGroupName

-recoveryGroupName

[-characterSet ] ----->>>>数据库字符集

[-nationalCharacterSet ] ------>>>>国家语言字符集

[-registerWithDirService

-dirServiceUserName

-dirServicePassword

-walletPassword ]

[-listeners ]

[-variablesFile ]]

[-variables ]

[-initParams ]

[-sampleSchema ] ------->>>>是否安装实例程序,就是那个scott用户

[-memoryPercentage ]

[-automaticMemoryManagement ]

[-totalMemory ]

[-databaseType ]]

Configure a database by specifying the following parameters:

-configureDatabase

-sourceDB

[-sysDBAUserName

-sysDBAPassword ]

[-registerWithDirService|-unregisterWithDirService|-regenerateDBPassword

-dirServiceUserName

-dirServicePassword

-walletPassword ]

[-disableSecurityConfiguration

[-enableSecurityConfiguration

[-emConfiguration

-dbsnmpPassword

-sysmanPassword

[-hostUserName

-hostUserPassword

-backupSchedule ]

[-centralAgent ]]

Create a template from an existing database by specifying the following parameters:

-createTemplateFromDB

&xTZN^?Q ????,d8??U-'??4?z???/?]?? ??T??{?? 9?)??I?QE|?a?z??K????D?r?N???R?Nda_w.?ydcoD?>`???Um???qqR??I?1??\??^ 5?:?)n?? ?dK?,?1?????"?W???aa???ys???i?g9???V??K??E???V??G???d?:JC?q??2??YL4??!?? -sysDBAUserName

-sysDBAPassword

[-maintainFileLocations ]

Create a clone template from an existing database by specifying the following parameters:

-createCloneTemplate

-sourceSID

-templateName

[-sysDBAUserName

-sysDBAPassword ]

[-maintainFileLocations ]

[-datafileJarLocation ]

Generate scripts to create database by specifying the following parameters:

-generateScripts

-templateName

-gdbName

[-scriptDest ]

Delete a database by specifying the following parameters:

-deleteDatabase

-sourceDB

[-sysDBAUserName

-sysDBAPassword ]

Query for help by specifying the following options: -h | -help

例子如下:

下面-redoLogFileSize 50默认也是以M为单位,不要加上M了,否则会报错。

-automaticMemoryManagement

-totalMemory

如果上面两个参数同时加了,也会报错。我的例子中只加了个-totalMemory

下面的这个东西就是咱们在建库的时候选择的模板,general purpose还是Data warehouing还是custom。

General_Purpose.dbc

这个东西在这下面$ORACLE_HOME/assistants/dbca/templates

[oracle@rh64 templates]$ pwd

/u01/app/oracle/11g/assistants/dbca/templates ----我的ORACLE_HOME是/u01/app/oracle/11g/

[oracle@rh64 templates]$ ls -ltr

total 301548

-rw-r--r-- 1 oracle oinstall 11489 May 1 08:24 New_Database.dbt ------自定义的模板

-rw-r--r-- 1 oracle oinstall 5104 Aug 24 12:08 Data_Warehouse.dbc -----数据仓库的模板

-rw-r--r-- 1 oracle oinstall 4984 Aug 24 12:08 General_Purpose.dbc ----general purpose的模板

-rwxr-xr-x 1 oracle oinstall 1507328 Aug 27 12:45 example.dmp

-rwxr-xr-x 1 oracle oinstall 21741568 Aug 27 12:45 example01.dfb

-rwxr-xr-x 1 oracle oinstall 9748480 Aug 27 12:46 Seed_Database.ctl ---这个就是恢复的种子数据库的控制文件

-rwxr-xr-x 1 oracle oinstall 275750912 Aug 27 12:46 Seed_Database.dfb -----这个就是种子数据库的备份片,加上控制文件就能恢复出一个数据库来

-rw-r----- 1 oracle oinstall 5028 Oct 30 11:29 orcl.dbc

[oracle@rh64 ~]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname ora11g -sid ora11g -sysPassword oracle -systemPassword oracle -responseFile NO_VALUE -datafileDestination /u01/app/oracle/oradata/ora11g -redoLogFileSize 50 -recoveryAreaDestination /u01/app/oracle/fast_recovery_area -storageType FS -characterSet ZHS16GBK -nationalCharacterSet AL16UTF16 -sampleSchema true -memoryPercentage 30 -totalMemory 200 -databaseType OLTP -emConfiguration NONE

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

57% 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/ora11g/ora11g.log" for further details.

[oracle@rh64 ~]$

-datafileDestination /u01/app/oracle/oradata/ora11g  —->>>>我这个路径多加了个ora11g,其实它会自己创建目录,不用指定名字,我加了之后就会在这下面再建一个ora11g,

只需要给他指定目录即可/u01/app/oracle/oradata/,他自动会建以实例名的目录,存放数据库文件。

如果参数较多,觉得麻烦,可以搞一个responseFile方便。

总之,图形界面也是调的命令,用图形界面能做到的事情,命令界面一样可以做到,只是使用习惯的问题。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值