当前位置:操作系统 > Unix/Linux >>

11gR2单实例dbca静默建库

11gR2单实例dbca静默建库
 
[oracle@rh64 ~]$ dbca -help
dbca  [-silent | -progressOnly | -customCreate] {<command> <options> }  | { [<command> [options] ] -responseFile  <response file > } [-continueOnNonFatalErrors <true | false>]
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 <name of an existing template in default location or the complete template path>
                [-cloneTemplate]
                -gdbName <global database name>
                [-sid <database system identifier>]
                [-sysPassword <SYS user password>]
                [-systemPassword <SYSTEM user password>]
                [-emConfiguration <CENTRAL|LOCAL|ALL|NONE>  ------->>>>是否配置EM
                        -dbsnmpPassword <DBSNMP user password>
                        -sysmanPassword <SYSMAN user password>
                        [-hostUserName <Host user name for EM backup job>
                         -hostUserPassword <Host user password for EM backup job>
                         -backupSchedule <Daily backup schedule in the form of hh:mm>]
                        [-centralAgent <Enterprise Manager central agent home>]]
                [-disableSecurityConfiguration <ALL|AUDIT|PASSWORD_PROFILE|NONE>
                [-datafileDestination <destination directory for all database files> |  -datafileNames <a text file containing database objects such as controlfiles, tablespaces, redo log files and spfile to their corresponding raw device file names mappings in name=value format.>]
                [-redoLogFileSize <size of each redo log file in megabytes>]  ------>>>>redolog大小,一般默认就是50M
                [-recoveryAreaDestination <destination directory for all recovery files>]
                [-datafileJarLocation  <location of the data file jar, used only for clone database creation>]
                [-storageType < FS | ASM >  ----->>>>设定存储类型是ASM还是文件系统
                        [-asmsnmpPassword     <ASMSNMP password for ASM monitoring>]
                         -diskGroupName   <database area disk group name>
                         -recoveryGroupName       <recovery area disk group name>
                [-characterSet <character set for the database>]  ----->>>>数据库字符集
                [-nationalCharacterSet  <national character set for the database>]   ------>>>>国家语言字符集
                [-registerWithDirService <true | false> 
                        -dirServiceUserName    <user name for directory service>
                        -dirServicePassword    <password for directory service >
                        -walletPassword    <password for database wallet >]
                [-listeners  <list of listeners to configure the database with>]
                [-variablesFile   <file name for the variable-value pair for variables in the template>]]
                [-variables  <comma separated list of name=value pairs>]
                [-initParams <comma separated list of name=value pairs>]
                [-sampleSchema  <true | false> ]   ------->>>>是否安装实例程序,就是那个scott用户
                [-memoryPercentage <percentage of physical memory for Oracle>]
                [-automaticMemoryManagement ]
                [-totalMemory <memory allocated for Oracle in MB>]
                [-databaseType <MULTIPURPOSE|DATA_WAREHOUSING|OLTP>]]


Configure a database by specifying the following parameters:
        -configureDatabase
                -sourceDB    <source database sid>
                [-sysDBAUserName     <user name  with SYSDBA privileges>
                 -sysDBAPassword     <password for sysDBAUserName user name>]
                [-registerWithDirService|-unregisterWithDirService|-regenerateDBPassword <true | false> 
                        -dirServiceUserName    <user name for directory service>
                        -dirServicePassword    <password for directory service >
                        -walletPassword    <password for database wallet >]
                [-disableSecurityConfiguration <ALL|AUDIT|PASSWORD_PROFILE|NONE>
                [-enableSecurityConfiguration <true|false>
                [-emConfiguration <CENTRAL|LOCAL|ALL|NONE>
                        -dbsnmpPassword <DBSNMP user password>
                        -sysmanPassword <SYSMAN user password>
                        [-hostUserName <Host user name for EM backup job>
                         -hostUserPassword <Host user password for EM backup job>
                         -backupSchedule <Daily backup schedule in the form of hh:mm>]
                        [-centralAgent <Enterprise Manager central agent home>]]

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     <user name  with SYSDBA privileges>
                -sysDBAPassword     <password for sysDBAUserName user name>
                [-maintainFileLocations <true | false>]

Create a clone template from an existing database by specifying the following parameters:
        -createCloneTemplate
                -sourceSID    <source database sid>
                -templateName      <new template name>
                [-sysDBAUserName     <user name  with SYSDBA privileges>
                 -sysDBAPassword     <password for sysDBAUserName user name>]
                [-maintainFileLocations <true | false>]
                [-datafileJarLocation       <directory to place the datafiles in a compressed format>]

Generate scripts to create database by specifying the following parameters:
        -generateScripts
                -templateName <name of an existing template in default location or the complete template path>
                -gdbName <global database name>
                [-scriptDest       <destination for all the scriptfiles>]

Delete a database by specifying the following parameters:
        -deleteDatabase
                -sourceDB    <source database sid>
                [-sysDBAUserName     <user name  with SYSDBA privileges>
                 -sysDBAPassword     <password for sysDBAUserName user name>]
Query for help by specifying the following options: -h | -help


例子如下:

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

-automaticMemoryManagement 
-totalMemory <memory allocated for Oracle in MB>

如果上面两个参数同时加了,也会报错。我的例子中只加了个-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 2
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,