These two days have installed several sets of Oracle databases for the development environment, with 11.2.0.4 versions also available in 12.2.0.1 versions. Because of the complexity of the network environment, there is no way to use the graphical interface installation, can only be installed in silent mode, before also written about the silent installation of database software and create an instance of the blog http://hbxztc.blog.51cto.com/1587495/ 1884833 interested can be consulted, these two days with the same method, but before you see someone in the sharing of the use of DBCA silent method to create a database instance, has not tried, while the installation of idle time to study a bit, here also do a simple sharing.
DBCA has two ways to install instances silently: One is to use Responsefile, and the other is to use the command line directly. This test is made in a responsefile way.
The use of Responsefile way naturally need to have Responsefile file, this file can be found in the database decompression package Directory response directory, can also be in the $oracle_home/assistants/dbca/ Directory to locate the. The file is called DBCA.RSP.
To create a process:
1. Copy a DBCA.RSP file for modification to be used when creating an instance.
[Email protected] dbca]$ pwd
/u01/app/oracle/product/11.2/db1/assistants/dbca
[email protected] dbca]$ CP dbca.rsp/home/oracle
2. Modify the Dbca.rsp file you just copied
The parameters in the partial file are explained here
Responsefile_version = "11.2.0" #指定版本号
Operation_type = "CreateDatabase" #指定使用dbca要做的操作, here to create an instance select CreateDatabase, if you want to delete the instance is DeleteDatabase
#创建实例有只需要修改创建实例部分的参数就可以了, see #-----------------------* * * * End of createdatabase section * * *----------------------- - part of the configuration is done.
[CreateDatabase]
Gdbname = "DBS" #数据库的Global database name
SID = "DBS" #数据库的实例名
Syspassword = "123456" #指定sys用户密码
Systempassword = "123456" #指定system用户密码
Datafiledestination =/home/oracle/11201/dbs #指定数据文件存放的目录
CHARACTERSET = "ZHS16GBK" #指定字符集
nationalcharacterset= "Al16utf16" #指定国家字符集
DatabaseType = "OLTP" #指定实例的类型
Automaticmemorymanagement = "TRUE" #指定使用自动内存管理
TotalMemory = "#指定使用内存的大小" in MB
The above parameters are used to create a single instance of the parameters, DBCA.RSP file There are many other parameters, if there are further requirements can be self-modifying the corresponding requirements
3. Start creating a DB instance
Execute the following command to create an instance in a few minutes:
[Email protected] 11201]$ DBCA-SILENT-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/dbs/dbs1.log ' for further details.
4. Check if the instance is normal
[Email protected] 11201]$ Sqlplus/as SYSDBA
Sql*plus:release 11.2.0.1.0 Production on Tue Mar 14 20:55:55 2017
Copyright (c) 1982, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options
[Email protected]>select status from V$instance;
STATUS
------------------------------------
OPEN
[Email protected]>select name from V$datafile;
NAME
---------------------------------------------------
/home/oracle/11201/dbs/dbs/system01.dbf
/home/oracle/11201/dbs/dbs/sysaux01.dbf
/home/oracle/11201/dbs/dbs/undotbs01.dbf
/home/oracle/11201/dbs/dbs/users01.dbf
Here's a brief explanation of why this is so fast, you can see the log from the alert log
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/8E/A8/wKiom1jH6afz00z2AABlramsDW8333.png "title=" 1.PNG "alt=" Wkiom1jh6afz00z2aablramsdw8333.png "/> can see that the data file was recovered from copy, not newly created, which also explains why the first row of logs when the instance was created is" Copying Database files "for a reason.
Speaking of which, there are three types of instances created, such as:
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/8E/A6/wKioL1jH6nahrNxJAAGjjkvOvwQ138.png "title=" 1.PNG "alt=" Wkiol1jh6nahrnxjaagjjkvovwq138.png "/> can see three types of instances created, including" General Purpose or Transaction Processiong "and" Data Warehose "corresponds to the OLTP system and the Data Warehouse, and the" includes datafiles "behind them is" yes "to indicate that the backup of the data file is used to restore it when it is created using either method. Finally, you can modify the character set. such as alert log
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/8E/A8/wKiom1jH6_7z3vdkAAAJcZm5eAc771.png "title=" 1.PNG "alt=" Wkiom1jh6_7z3vdkaaajczm5eac771.png "/>
The custom database is not a data file to recover, but a newly created data file, so it takes a relatively long time to create an instance, because it needs to run a data dictionary.
This article briefly describes how to create an instance using the Responsefile method, and the other way is to use the command line directly, you can view the command parameters with the dbca-h command
[[email protected] trace]$ dbca -hdbca [-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>[-clonetemplate]-gdbname <global database name>[-policyManaged | -adminManaged <Policy managed or Admin managed database, default is admin managed database>][-createserverpool <to create serverpool which will be used by the database to Be created>][-force <to create serverpool by force when adequate free servers are not available. This may affect already Running database>]-serverpoolname <one serverpool name in case of create server pool and comma separated list of serverPool Name in case of use serverpool>-[cardinality <specify cardinality for new serverpool to be created, default is the number of qualified nodes>][-sid <database system identifier>][-syspassword <sys user password>][-systempassword <system user password>][- emconfiguration <central|local| all| nobackup| noemail| None>-dbsnmppassword <dbsnmp user password>-sysmanpassword <sysman user password>[-hostUserName <Host user name for EM backup job> -hostuserpassword
Official Document: http://docs.oracle.com/cd/E11882_01/install.112/e47689/app_nonint.htm#LADBI1353
This article is from the "DBA fighting!" blog, so be sure to keep this source http://hbxztc.blog.51cto.com/1587495/1906532
DBCA creating a DB instance in silent mode