DBCA ile silent modda Oracle 12c RAC veritabanı oluşturulması
12c ile dbca aracında bazı değişiklikler yapıldı. DBCA ile container ve pluggable database oluşturulabilmektedir. Dilerseniz createAsContainerDatabase parametresini false yaparak container olmadan da veritabanı oluşturabilirsiniz. initParams ile veritabanındaki parametrelerin belirtilmesinde bir takım değişiklikler oldu. Artık name ve value belirterek veritabanı açılış parametreleri veriliyor. Birden fazla olduğunda virgül ile ayrılması gerekiyor.
DBCA ile kullanılabilecek tüm parametreleri aşağıdaki gibi görebilirsiniz.
[oracle@orcldb01 ~]$ dbca -createDatabase -help -createDatabase - Command to Create a database. -responseFile | (-gdbName,-templateName) -responseFile - <Fully qualified path for a response file> -gdbName <Global database name> -templateName <Name of an existing template in default location or the complete template path> [-characterSet <Character set for the database>] [-createAsContainerDatabase <true | false>] [-numberOfPDBs <Number of pluggable databases to be created, default is 0>] [-pdbAdminPassword <PDB Administrator user Password, required only while creating new PDB>] [-pdbName <Pluggable database name>] [-pdbOptions <A comma separated list of name:value pairs with database options to enable/disable. For example JSERVER:true,DV:false>] [-pdbStorageMAXSizeInMB <value>] [-pdbStorageMAXTempSizeInMB <value>] [-useLocalUndoForPDBs <true | false> Specify false to disable local undo tablespace for PDBs.] [-createListener <Create a new listener to register your database. Specify in format, LISTENER_NAME:PORT>] [-customScripts <A comma separated list of SQL scripts which needs to be run post db creation.The scripts are run in order they are listed>] [-databaseConfigType <SINGLE | RAC | RACONENODE>] [-RACOneNodeServiceName <Service name for the service to be created for RAC One Node database. This option is mandatory when the databaseConfigType is RACONENODE>] [-databaseType <MULTIPURPOSE | DATA_WAREHOUSING | OLTP>] [-datafileDestination <Destination directory for all database files>] [-datafileJarLocation <Directory to place the datafiles in compressed format>] [-dbOptions <A comma separated list of name:value pairs with database options to enable/disable. For example JSERVER:true,DV:false>] [-dvConfiguration <true | false> Specify true to configure and enable database vault.] -dvUserName <Specify database vault owner user name> -dvUserPassword <Specify database vault owner password> [-dvAccountManagerName <Specify separate database vault account manager>] [-dvAccountManagerPassword <Specify database vault account manager password>] [-emConfiguration <DBEXPRESS | CENTRAL | BOTH | NONE>] [-dbsnmpPassword <DBSNMP user password>] [-emExpressPort <EM database express port number. Generally used during createDatabase>] [-emPassword <EM Admin user password>] [-emUser <EM Admin username to add or modify targets>] [-omsHost <EM management server host name>] [-omsPort <EM management server port number>] [-enableArchive <true | false> Specify true to enable archive>] [-archiveLogDest <Specify archive log destinations separated by comma. If archive log destination is not specified, fast recovery area location will be used for archive log files.>] [-archiveLogMode <AUTO|MANUAL , the default is Automatic archiving>] [-initParams <Comma separated list of name=value pairs>] [-initParamsEscapeChar <Specify escape character for comma when a specific initParam has multiple values.If the escape character is not specified backslash is the default escape character>] [-listeners <A comma separated list of listeners that the database can be configured with>] [-memoryMgmtType <AUTO|AUTO_SGA|CUSTOM_SGA>] [-memoryPercentage | -totalMemory] [-memoryPercentage <Percentage of physical memory for oracle database>] [-totalMemory <Memory allocated for Oracle in MB>] [-nationalCharacterSet <National character set for the database>] [-nodelist <Node names separated by comma for the database>] [-olsConfiguration <true | false> Specify true to configure and enable Oracle Label Security.] [-configureWithOID This flag configures Oracle Label Security with OID.] [-oracleHomeUserName <Specify Oracle Home User Name>] [-oracleHomeUserPassword <Specify Oracle Home User Password>] [-policyManaged | -adminManaged] [-policyManaged <Policy managed database, default option is Admin managed database>] -serverPoolName <Specify the single server pool name in case of create server pool or comma separated list in case of existing server pools> [-createServerPool <Create a new server pool, which will be used by the database>] [-cardinality <Specify the cardinality of the new server pool that is to be created, default is the number of qualified nodes>] [-force <To create server pool by force when adequate free servers are not available. This may affect the database which is already in running mode>] [-pqCardinality <value>] [-pqPoolName <value>] [-pqPoolName <value>] [-adminManaged <Admin managed database, this is default option>] [-recoveryAreaDestination <Destination directory for all recovery files. Specify "NONE" for disabling Fast Recovery Area>] [-recoveryAreaSize <Fast Recovery Area Size in MB>] [-redoLogFileSize <Size of each redo log file in MB>] [-registerWithDirService <true | false>] -dirServiceUserName <User name for directory service> [-databaseCN <Database common name>] [-dirServicePassword <Password for directory service>] [-walletPassword <Password for database wallet>] [-runCVUChecks <Specify "true" in order to run Cluster Verification Utility checks periodically for RAC databases.>] [-sampleSchema <true | false>] [-sid <Database system identifier>] [-storageType < FS | ASM >] -datafileDestination <Destination directory for all database files> [-asmsnmpPassword <ASMSNMP password for ASM monitoring>] [-sysPassword <SYS user password>] [-systemPassword <SYSTEM user password>] [-useOMF <true | false> Specify true to use Oracle-Managed Files.] [-useWalletForDBCredentials <true | false> Specify true to load database credentials from wallet] -dbCredentialsWalletLocation <Path of the directory containing the wallet files> [-dbCredentialsWalletPassword <Password to open wallet with auto login disabled>] [-variables <Comma separated list of name=value pairs>] [-variablesFile <File name of the variable-value pair for variables in the template>]
Aşağıdaki komut ile dbca silent modda veritabanı oluşturmak mümkündür.
Container database olmadan :
dbca -silent \ -createDatabase \ -createAsContainerDatabase false \ -nodelist orcldb01,orcldb02 \ -templateName General_Purpose.dbc \ -gdbName TEST \ -sid TEST \ -SysPassword welcome1 \ -SystemPassword welcome1 \ -emConfiguration none \ -redoLogFileSize 1024 \ -recoveryAreaDestination +RECO \ -storageType ASM \ -asmsnmpPassword welcome1 \ -asmSysPassword welcome1 \ -diskGroupName DATA \ -recoveryGroupName RECO \ -datafileDestination DATA \ -listeners LISTENER \ -registerWithDirService false \ -characterSet AL32UTF8 \ -nationalCharacterSet AL16UTF16 \ -databaseType MULTIPURPOSE \ -memoryMgmtType AUTO_SGA \ -totalMemory 10240 \ -sampleSchema false \ -initParams \ name='audit_file_dest' value='/u01/app/oracle/admin/TEST/adump', \ name='compatible' value='12.2.0.0.0', \ name='db_create_file_dest' value='+DATA_EXA', \ name='db_recovery_file_dest_size' value=5048893440, \ name='db_create_online_log_dest_1' value='+DATA', \ name='db_create_online_log_dest_2' value='+RECO', \ name='db_recovery_file_dest' value='+RECO', \ name='diagnostic_dest' value='/u01/app/oracle', \ name='parallel_max_servers' value=8, \ name='session_cached_cursors' value=100, \ name='processes' value=500, \ name='db_files' value=600, \ name='open_cursors' value=800
Container database şeklinde :
dbca -silent \ -createDatabase \ -createAsContainerDatabase true \ -numberOfPDBs 2 \ -pdbAdminPassword welcome1 \ -pdbName PDB1 \ -nodelist orcldb01,orcldb02 \ -templateName General_Purpose.dbc \ -gdbName TEST \ -sid TEST \ -SysPassword welcome1 \ -SystemPassword welcome1 \ -emConfiguration none \ -redoLogFileSize 1024 \ -recoveryAreaDestination +RECO \ -storageType ASM \ -asmsnmpPassword welcome1 \ -asmSysPassword welcome1 \ -diskGroupName DATA \ -recoveryGroupName RECO \ -datafileDestination DATA \ -listeners LISTENER \ -registerWithDirService false \ -characterSet AL32UTF8 \ -nationalCharacterSet AL16UTF16 \ -databaseType MULTIPURPOSE \ -memoryMgmtType AUTO_SGA \ -totalMemory 10240 \ -sampleSchema false \ -initParams \ name='audit_file_dest' value='/u01/app/oracle/admin/TEST/adump', \ name='compatible' value='12.2.0.0.0', \ name='db_create_file_dest' value='+DATA', \ name='db_recovery_file_dest_size' value=5048893440, \ name='db_create_online_log_dest_1' value='+DATA', \ name='db_create_online_log_dest_2' value='+RECO', \ name='db_recovery_file_dest' value='+RECO', \ name='diagnostic_dest' value='/u01/app/oracle', \ name='parallel_max_servers' value=8, \ name='session_cached_cursors' value=100, \ name='processes' value=500, \ name='db_files' value=600, \ name='open_cursors' value=800
NOT : recoveryAreaDestination ile FRA belirtilirken +GRUP_ADI şeklinde başında + olacak şekilde verilmelidir. db_recovery_file_dest_size parametresi ile boyut belirtilirken , byte cinsinden olmalıdır.