Skip to content

Insight and analysis of technology and business strategy

Oracle Silent Mode, Part 1: Installation Of 10.2 And 11.1 Databases

This post is the first of a series of ten posts that will explore some of the Oracle Universal Installer (OUI), Network Assistant (NETCA), Database Creation Assistant (DBCA), Database Upgrade Assistant (DBUA), and many more syntaxes you can use to script or speed up Oracle Installations. The agenda should follow the one below:

  1. Installation of 10.2 And 11.1 Databases (this post!)
  2. Patches of 10.2 And 11.1 databases
  3. Cloning Software and databases
  4. Install a 10.2 RAC Database
  5. Add a Node to a 10.2 RAC database
  6. Remove a Node from a 10.2 RAC database
  7. Install a 11.1 RAC Database
  8. Add a Node to a 11.1 RAC database
  9. Remove a Node from a 11.1 RAC database
  10. A ton of other stuff you should know

Actually, I may have to split the post #10 into ten more posts to cover all the other syntaxes you could use with Oracle Enterprise Manager, Application Server, or on Windows. Anyway, for now let’s focus on the very beginning: how to install 10.2 or 11.1 non-RAC database; how to apply the latest patch set; and how to create a instance database from a template.

Foreword

First, just because it’s on the Internet doesn’t make it true — even if it’s on the Pythian Blog. There will be a lot of syntaxes in those ten posts and even if they’ve been all tested, (1) the testing conditions are probably very different from your environment, and (2) the commands have been customized so that they appear generic. Be careful; it’s very likely that the syntaxes will be wrong for you. Test them yourself on a test environment and don’t execute them if you don’t understand what every part of them is supposed to do.

One of the reasons for these posts is that it’s kind of difficult to figure out by yourself how you should run one particular tool. The information is spread across the reference manuals, the response files, the online help, and sometimes Oracle Metalink or people that managed to make it work.

In addition, if the syntax looks similar for all the tools, they differ more than we can guess first. Let’s take some examples to illustrate that and to begin with the syntaxes:

  • the flags:You can use parameters to run the Assistants and the Universal Installer. To define the values of those parameters, you use a flag in the command you execute, and optionally a value for the flag. An example of such a use: runInstaller -responseFile /tmp/myresponseFile.rsp. For all the assistants, flags are set using the - character, except for netca, which uses the / character.
  • the “help” flag:The help flag is used to understand what you can do with most of these tools, so you should run runInstaller -help, dbua -help and dbca -help. For some reason netca doesn’t have that flag.
  • the “silent” flag:The silent flag enables running the assistant without an X Display on Unix and Linux. On OpenVMS, even if you use that flag, you need an X display. If you use netca on Unix or Linux with that flag, you don’t need an X display but you will have to set up the DISPLAY environment variable with some dummy value (like :0).
  • the “record” flag:The record flag is very useful because it creates a response file from an installation you run with the Graphical User Interface. It’s also easier to track what has been done when you use a tracking or a ticketing system. Unfortunately, this flag is available only with Oracle Universal Installer, but none of the assistants.

I hope knowledge of these commands will help you and speed up Oracle installations or upgrades. Enough of this foreword, let’s dig into how to create a 10.2 database from scratch. Once that’s done, we’ll do the same for an 11.1 database[1].

Oracle Database 10.2

Setup and Check the Prerequisites

Before you start the installation, make sure all the prerequisites are met. Use the Installation Guide of your platform to set them up. You’ll find the one you need at the URL below:

Refer to Metalink Note 169706.1 for the latest updates. An easy and fast way to make sure everything is in order is to use the Oracle RDA HCVE module. Below is an example of how to use it with the 4.11 release:

$ su - oracle

$ mkdir rda-4.11
$ cd rda-4.11
$ # Change the distribution accordingly to the latest
$ # RDA release and platform. Use your Metalink Credentials
$ ftp updates.oracle.com
ftp> cd 6854532
ftp> ls
ftp> get p6854532_4110_Linux-x86.zip
ftp> bye
$ unzip 6854532*.zip
$ cd rda
$ ./rda.pl -T hcve
Processing HCVE tests …
Available Pre-Installation Rule Sets: 
   1. Oracle Database 10g R1 (10.1.0) PreInstall (Linux-x86)
   2. Oracle Database 10g R1 (10.1.0) PreInstall (Linux AMD64)
   3. Oracle Database 10g R1 (10.1.0) PreInstall (IA-64 Linux)
   4. Oracle Database 10g R2 (10.2.0) PreInstall (Linux AMD64)
   5. Oracle Database 10g R2 (10.2.0) PreInstall (IA-64 Linux)
   6. Oracle Database 10g R2 (10.2.0) PreInstall (Linux-x86)
   7. Oracle Database 11g R1 (11.1.0) PreInstall (Linux AMD64)
   8. Oracle Database 11g R1 (11.1.0) PreInstall (Linux-x86)
   9. Oracle Application Server 10g (9.0.4) PreInstall (Linux)
  10. Oracle Application Server 10g R2 (10.1.2) PreInstall (Linux)
  11. Oracle Application Server 10g R3 (10.1.3) PreInstall (Linux AMD64)
  12. Oracle Application Server 10g R3 (10.1.3) PreInstall (IA-64 Linux)
  13. Oracle Application Server 10g R3 (10.1.3) PreInstall (Linux-x86)
  14. Oracle Portal PreInstall (Generic)

Available Post-Installation Rule Sets:
  15. Oracle Portal PostInstall (generic)
  16. RAC 10G DB and OS Best Practices (Linux)
  17. Data Guard PostInstall (Generic)

Enter the HCVE rule set number
Hit ‘Return’ to accept the default (1)
> 4
Enter value for < Planned ORACLE_HOME location or if set >
Hit ‘Return’ to accept the default ($ORACLE_HOME)
>
Test “Oracle Database 10g R2 (10.2.0) PreInstall (Linux AMD64)” executed at Sat Mar 15 15:52:17 2008
Test Results
~~~~~~~~~~~~
ID    NAME                 RESULT VALUE
===== ==================== ====== =================
   10 OS Certified?        FAILED Not certified
   20 User in /etc/passwd? PASSED userOK
   30 Group in /etc/group? PASSED GroupOK
   40 Input ORACLE_HOME    RECORD $ORACLE_HOME
   50 ORACLE_HOME Valid?   PASSED OHexists
   60 O_H Permissions OK?  FAILED NoWritePerm
   70 Umask Set to 022?    PASSED UmaskOK
   80 LDLIBRARYPATH Unset? FAILED IsSet
   90 JAVA_HOME Unset?     FAILED IsSet
  100 Other O_Hs in PATH?  FAILED OratabEntryInPath
  110 oraInventory Permiss PASSED oraInventoryOK
  120 /tmp Adequate?       PASSED TempSpaceOK
  130 Swap (in MB)         PASSED 3906
  140 RAM (in MB)          FAILED 1003
  150 Swap OK?             PASSED SwapToRAMOK
  160 Disk Space OK?       PASSED DiskSpaceOK
  170 Kernel Parameters OK PASSED KernelOK
  180 Got ld,nm,ar,make?   PASSED ld_nm_ar_make_found
  190 ulimits OK?          FAILED TimeNotDefin..>
  200 EL4 RPMs OK?         PASSED NotEnterprise
  204 RHEL3 RPMs OK?       PASSED NotRHEL3
  205 RHEL4 RPMs OK?       PASSED NotRHEL4
  209 SUSE SLES9 RPMs OK?  PASSED NotSuSE
  210 SUSE SLES10 RPMs OK? PASSED NotSuSE
  214 ip_local_port_range  PASSED ip_local_port_rangeOK
  220 Tainted Kernel?      PASSED NotVerifiable
  230 Other OUI Up?        PASSED NoOtherOUI
Result file: /home/arkzoyd/Customers/TPG/rda/output/RDA_HCVE_A201DB10R2_lna_res.htm

Install Oracle 10.2 Database Software

Once you’ve made sure all the prerequisites are met, you can get the Oracle distribution you plan to use. Obviously there are several ways to do that, but the supported way is to download it from the Oracle E-Delivery site, and using a staging location for those files is probably the fastest way to deploy new software to your servers. You can also download the software from OTN. Marc Fielding wrote an excellent paper that explains how to do it with lynx and wget.

Once the 10.2 database software is downloaded, you can:

    • unzip it if it’s a zip file:
      $ unzip 10201_database_linux32.zip
      $ cd database
      $ export DISTRIB=`pwd`
    • use cpio, if it’s a cpio file:
$ gunzip -c 10201_database_linux_x86_64.cpio.gz \
       | cpio -idmv
$ cd database
$ export DISTRIB=`pwd`

To install the software you’ve downloaded, you can copy and edit the response file, change the parameters according to your needs, and run the Universal Installer with that response file. You can also leave the response file as it is and set the variables you want to change as part of the command line you run. There are many advantages to this:

  • It’s easy to write and read, and it’s less error-prone than changing the content of a file.
  • It’s easy to share with others, and it helps others checking your commands.
  • It’s easy to store in a tracking/ticketing system or re-read if you use a tool to register the commands you’ve run on a system; it can be a simple script command or something more advanced like the one we use at Pythian.

To install the 10.2 database (assuming you use the default oracle user, oinstall and dba groups), the variables you need to set are the following:

  • ORACLE_HOME defines the location of the software you want to install; in the example that follows, we’ll use /u01/app/oracle/product/10.2.0/db_1.
  • ORACLE_HOME_NAME defines a name for the ORACLE_HOME and helps to avoid deleting an ORACLE_HOME inadvertently. To know what names have already been used, you can view the content of the inventory.xml file located in the Inventory of your server; in the example that follows, we’ll use ORADB102_Home1. On Linux, the set of commands you have to run are the one below:
    $ cd `/etc/oraInst.loc \
       |grep inventory_loc \
       |cut -d "=" -f 2`
    $ cd ContentsXML
    $ grep "HOME NAME" inventory.xml
  • n_configurationOption defines if you want to configure ASM or create a database with DBCA as part of the install. Use the value 3 install only the software.
  • For more details about all the variables you can use as part of the runInstaller command, you can view the content of the response files located in $DISTRIB/response.

Once you’ve decided what the values you want to use to install the software, you can run runInstaller in silent mode WITHOUT changing the content of the response file. Below is the command you can run to install the 10.2 database server Enterprise Edition:

$ runInstaller -silent                                 \
      -responseFile $DISTRIB/response/enterprise.rsp   \
       ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 \
       ORACLE_HOME_NAME=ORADB102_Home1                 \
       n_configurationOption=3

To install Oracle 10.2 database server Standard Edition or Standard Edition One, run:

$ runInstaller -silent                                 \
      -responseFile $DISTRIB/response/standard.rsp     \
       ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 \
       ORACLE_HOME_NAME=ORADB102_Home1                 \
       n_configurationOption=3

Once the software is installed, you can create the oraInst.loc file if it’s the first Oracle software you install on the server. To proceed, connect as root and navigate to the newly-created Oracle Inventory:

# cd /u01/app/oraInventory
# ./orainstRoot.sh

Then run the root.sh script from the ORACLE_HOME you’ve created. Connect as root and run:

# cd /u01/app/oracle/product/10.2.0/db_1
# ./root.sh

Apply The Latest Patch Set to the Oracle 10.2 Database Software

Once you’ve installed the base release, you can apply whatever Patch Set you need to apply. In order to proceed, download it first from Metalink. Note #398595.1 details how to do that from FTP. Below is an example for the 10.2.0.4 Patch Set for Linux x86-64:

$ ftp updates.oracle.com
Connected to bigip-updates.oracle.com.
220 FTP server ready.
Name (updates.oracle.com:arkzoyd): arkzoyd@xxx
331 Username OK, please send password.
Password:
230-
230-  Welcome to the Oracle Patch Download FTP Server
230-
230- For detailed help, use command "quote site help".
230
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd 6810189
250 Changed directory OK.
ftp> ls
200 PORT command OK.
150 Opening data connection for file listing.
total 1
p6810189_10204_AIX5L.zip
p6810189_10204_HPUX-IA64.zip
p6810189_10204_Linux-x86-64.zip
p6810189_10204_Linux-x86.zip
p6810189_10204_MSWIN-x86-64.zip
p6810189_10204_Solaris-64.zip
p6810189_10204_Win32.zip
226 Listing complete. Data connection has been closed.
ftp> get p6810189_10204_Linux-x86-64.zip
ftp> bye

Once the Patch Set is downloaded, you can unzip it as below:

$ unzip p6810189_10204_Linux-x86-64.zip
$ cd Disk1
$ export DISTRIB=`pwd`

To apply the Patch Set, stop all the software (Instances, Listener, EM Console) running on top of the software you plan to upgrade, and run the Universal Installer with the correct ORACLE_HOME and ORACLE_HOME_NAME , WITHOUT changing the content of the patchset.rsp response file, as below:

$ runInstaller -silent                                 \
      -responseFile $DISTRIB/response/patchset.rsp     \
       ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 \
       ORACLE_HOME_NAME=ORADB102_Home1

(Note that the command doesn’t care if you patch an Enterprise or a Standard Edition Release.) Then run the root.sh script from the ORACLE_HOME you’ve created. Connected as root and run:

# cd /u01/app/oracle/product/10.2.0/db_1
# ./root.sh

Start the listener

You don’t need to create a listener.ora file if you use its default port (1521) and dynamic service registration. Just start the listener as below:

$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
$ export PATH=$ORACLE_HOME/bin:$PATH
$ lsnrctl start

(Optional) Create an ASM instance with DBCA

If you plan to use ASM from the newly installed ORACLE_HOME, you can use DBCA to configure it in silent mode, but first you need to configure and start the Cluster Synchronization Service Daemon that is mandatory for ASM. In order to start that daemon and add it to the startup process of your operation system, connect as root and run the command below:

# /u01/app/oracle/product/10.2.0/db_1/bin/localconfig reset

In order to create an ASM instance and a Disk Group, you must run dbca in silent mode with the following parameters:

  • -silent must be use to run without any X Display
  • -configureASM defines the DBCA operation, i.e configures ASM
  • -asmSysPassword defines the password for the SYS user that will be created in the password file (e.g change_on_install)
  • -diskString defines what will be contained in the asm_diskstring init parameter for the instance (e.g. /dev/sd*)
  • -diskList defines the list of disks to be part of the Diskgroups to be added (e.g. /dev/sdb,/dev/sdc)
  • -diskGroupName defines the name of the diskgroup to be added (e.g. DGDATA)
  • -redundancy defines the redundancy type for the Diskgroup (e.g. EXTERNAL)
  • -emConfiguration allows you to register the ASM configuration in Enterprise Manager GridControl if an Agent has been installed previously (e.g. NONE)

The commands below creates an ASM instance and add a new and first diskgroup:

$ dbca -silent                        \
    -configureASM                     \
    -asmSysPassword change_on_install \
    -diskString "/dev/sd*"            \
    -diskList "/dev/sdb,/dev/sdc"     \
    -diskGroupName DGDATA             \
    -redundancy EXTERNAL              \
    -emConfiguration NONE

Create a Database from a Template with DBCA

Whether you use ASM or not, the fastest way to create a database is to use DBCA in silent mode with a template. As we’ll discuss in the next post, you can use a default template or a template you’ve created earlier. In order to create that database, you must use the following parameters:

  • -silent must be use to run without any X Display
  • -createDatabase defines the DBCA operation, i.e create a database
  • -templateName defines the name of the template you want to use to create your database. The template files are located in $ORACLE_HOME/assistants/dbca/templates and end with the .dbc extension (e.g General_Purpose.dbc)
  • -gdbName defines the global database name of the database. That impacts the dbname and db_domain parameters. (e.g. ORCL)
  • -sid defines the instance SID (e.g. ORCL).
  • -SysPassword defines the password for the SYS user that will be created in the password file and in the database (e.g change_on_install)
  • -SystemPassword defines the password for the SYSTEM user (e.g manager)
  • -emConfiguration enables to register create an Enterprise Manager Database Control or to register the database in an existing Enterprise Manager GridControl if an Agent has been installed previously (e.g. NONE)
  • -datafileDestination defines the location of all the files the the files remains on a filesystem
  • -storageType enables to specify the type of storage you want to use. It can be a filesystem (FS) , ASM (ASM) or a set of raw devices (RAW).
  • -asmSysPassword defines the password for the ASM SYS user. This parameter is mandatory if you plan to use an existing ASM instance (e.g change_on_install)
  • -diskGroupName defines the name of the diskgroup to be used if ASM is used (e.g. DGDATA)
  • -characterSet defines the character set to be used (e.g. WE8ISO8859P15);
  • -initParams enables to use specific initialization parameters
  • -memoryPercentage specify the values for SGA_TARGET and PGA_AGGREGATE_TARGET as a percentage of the total memory of the system.

I strongly recommended that, once the database is created, you change the SYS and SYSTEM password from the SQL*Plus password command to avoid leaving any trace of it. You should also resize the SGA and PGA Aggregate accordingly to your needs.

You’ll find below an example of the use of DBCA to create a database stored in the /u01/oradata/ORCL filesystem:

$ dbca -silent                           \
       -createDatabase                   \
       -templateName General_Purpose.dbc     \
       -gdbName ORCL                     \
       -sid ORCL                         \
       -SysPassword change_on_install    \
       -SystemPassword manager           \
       -emConfiguration NONE             \
       -datafileDestination /u01/oradata \
       -storageType FS                   \
       -characterSet WE8ISO8859P15       \
       -memoryPercentage 40

You’ll find below an example of the use of DBCA to create a database stored in the ASM +DGDATA diskgroup:

$ dbca -silent                             \
       -createDatabase                     \
       -templateName General_Purpose.dbc       \
       -gdbName ORCL                       \
       -sid ORCL                           \
       -SysPassword change_on_install      \
       -SystemPassword manager             \
       -emConfiguration NONE               \
       -storageType ASM                    \
         -asmSysPassword change_on_install \
         -diskGroupName DGDATA             \
       -characterSet WE8ISO8859P15         \
       -memoryPercentage 40

Oracle Database 11.1

Setup and Check the Prerequisites

See the 10.2 section for more details.

Install Oracle 11.1 Database Software

Once you’ve made sure all the prerequisites are met, get the Oracle distribution you plan to use. Obviously there are several ways to do that. The supported way is to download it from Oracle E-Delivery site and using a staging location for those files. This is probably the fastest way to deploy new software to your servers. You can also download the software from OTN; Marc Fielding has written an excellent paper that explains how to do it from wget.

Once the 11.1 database software is downloaded, you can unzip it:

$ unzip linux.x64_11gR1_database.zip
$ cd database
$ export DISTRIB=`pwd`

To install the software you’ve downloaded, you can copy and edit the response file, change the parameters according to your needs, and run the Universal Installer with that response file. YOU CAN ALSO leave the response file as it is and set the variables you want to change as part of the command line you run. There are many advantages of doing that:

  • It’s easy to write, read, and less error-prone than changing the content of a file.
  • It’s easy to share with others, and it helps others checking your commands.
  • It’s easy to store in a tracking/ticketing system or re-read if you use a tool to register the commands you’ve run on a system; it can be a simple script command or something more advanced like the one we can use at Pythian.

To install the 11.1 database, and assuming you use the default oracle user, oinstall and dba groups, the variables you need to set are the following:

  • ORACLE_BASE defines the ORACLE_BASE value that is now mandatory with 11.1
  • ORACLE_HOME defines the location of the software you want to install; in the example that follows, we’ll use /u01/app/oracle/product/11.1.0/db_1.
  • ORACLE_HOME_NAME defines a name for the ORACLE_HOME and helps to avoid inadvertently deleting an ORACLE_HOME. To know what names have already been used, you can view the content of the inventory.xml file located in the Inventory of your server; in the example that follows, we’ll use ORADB111_Home1. On Linux, the set of commands you have to run are the one below:
    $ cd `/etc/oraInst.loc \
       |grep inventory_loc \
       |cut -d "=" -f 2`
    $ cd ContentsXML
    $ grep "HOME NAME" inventory.xml
  • n_configurationOption defines if you want to configure ASM or create a database with DBCA as part of the install. Use the value “3” install the software only.
  • FROM_LOCATION defines the location of the products.xml file and may
    have to be set with 11.1.0.6. That’s because for some platforms, the value of that variable is not set correctly in the default response files.
  • For more details about all the variables you can use as part of the runInstaller command, you can view the content of the response files located in $DISTRIB/response

Once you’ve decided what values you want to use to install the software, you can run runInstallerin silent mode WITHOUTchanging the content of the response file. Below is the command you can run to install the 11.1 database server Enterprise Edition:

$ runInstaller -silent                                 \
      -responseFile $DISTRIB/response/enterprise.rsp   \
       FROM_LOCATION=$DISTRIB/stage/products.xml       \
       ORACLE_BASE=/u01/app/oracle                     \
       ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 \
       ORACLE_HOME_NAME=ORADB111_Home1                 \
       n_configurationOption=3

To install Oracle 11.1 database server Standard Edition or Standard Edition One, run:

$ runInstaller -silent                                 \
      -responseFile $DISTRIB/response/standard.rsp     \
       FROM_LOCATION=$DISTRIB/stage/products.xml       \
       ORACLE_BASE=/u01/app/oracle                     \
       ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 \
       ORACLE_HOME_NAME=ORADB111_Home1                 \
       n_configurationOption=3

Once the software installed, you can create the oraInst.loc file if it’s the first Oracle software you install on the server. To proceed, connect as root and navigate to the newly created Oracle Inventory:

# cd /u01/app/oraInventory
# ./orainstRoot.sh

Then run the root.sh script from the ORACLE_HOME you’ve created. Connect as root and run:

# cd /u01/app/oracle/product/11.1.0/db_1
# ./root.sh

Apply The Latest Patch Set to the Oracle 11.1 Database Software

For now, there is no Patch Set for Oracle 11.1. We can assume, however, that 11.1.0.7 will be available soon. It’s already available in the list of patches in the “Patches and Updates” section of Metalink. The syntax will probably be very similar to the 10.2.0.4 Patch Set. To retrieve the syntax, however, you can review the reponse files by running the Universal Installer in Graphic Mode with the -record parameter set.

Start the listener

You don’t need to create a listener.ora file if you use its default port (1521) and dynamic service registration. Just start the listener as below:

$ export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
$ export PATH=$ORACLE_HOME/bin:$PATH
$ lsnrctl start

(Optional) Create an ASM instance with DBCA

If you plan to use ASM from the newly installed ORACLE_HOME, you can use DBCA to configure it in silent mode, but first you need to configure and start the Cluster Synchonisation Service Daemon which is mandatory for ASM. In order to start that daemon and add it to the startup process of your operation system, connect as root and run the command below:

# /u01/app/oracle/product/11.1.0/db_1/bin/localconfig reset

In order to create an ASM instance and a Disk Group, you must run dbca in silent mode with the following parameters:

  • -silent must be used to run without any X Display
  • -configureASM defines the DBCA operation, i.e configure ASM
  • -asmSysPassword defines the password for the SYS user that will be created in the password file (e.g change_on_install)
  • -diskString defines what will be contained in the asm_diskstring init parameter for the instance (e.g. /dev/sd*)
  • -diskList defines the list of disks to be part of the Diskgroups being added (e.g. /dev/sdb,/dev/sdc)
  • -diskGroupName defines the name of the diskgroup being added (e.g. DGDATA)
  • -redundancy defines the redundancy type for the Diskgroup (e.g. EXTERNAL)
  • -emConfiguration enables registration of the ASM configuration in Enterprise Manager GridControl if an Agent has been installed previously (e.g. NONE)

The commands below creates an ASM instance and add a new and first diskgroup:

$ dbca -silent                        \
    -configureASM                     \
    -asmSysPassword change_on_install \
    -diskString "/dev/sd*"            \
    -diskList "/dev/sdb,/dev/sdc"     \
    -diskGroupName DGDATA             \
    -redundancy EXTERNAL              \
    -emConfiguration NONE

Create a Database from a Template with DBCA

Wether you use ASM or not, the fastest way to create a database is to use DBCA in silent mode with a template. You can use a default template or a template you’ve created earlier as we’ll discuss in the next post. In order to create that database, you must use the following parameters:

  • -silent must be use to run without any X Display
  • -createDatabase defines the DBCA operation, i.e create a database
  • -templateName defines the name of the template you want to use to create your database. The template files are located in $ORACLE_HOME/assistants/dbca/templates and end with the .dbc extension (e.g General_Purpose.dbc)
  • -gdbName defines the global database name of the database. That impacts the dbname and db_domain parameters. (e.g. ORCL)
  • -sid defines the instance SID (e.g. ORCL).
  • -SysPassword defines the password for the SYS user that will be created in the password file and in the database (e.g change_on_install)
  • -SystemPassword defines the password for the SYSTEM user (e.g manager)
  • -emConfiguration allows you to register an Enterprise Manager Database Control or to register the database in an existing Enterprise Manager GridControl if an Agent has been installed previously (e.g. NONE)
  • -datafileDestination defines the location of all the files remaining on a filesystem
  • -redoLogFileSize allows you to define the redolog file size in MB (e.g. 100)
  • -storageType allows you to specify the type of storage you want to use. It can be a filesystem (FS), ASM (ASM), or a set of raw devices (RAW).
  • -asmSysPassword defines the password for the ASM SYS user. This parameter is mandatory if you plan to use an existing ASM instance (e.g change_on_install)
  • -diskGroupName defines the name of the diskgroup if ASM is used (e.g. DGDATA)
  • -characterSet defines the character set to be used (e.g. WE8ISO8859P15);
  • -initParams enables specific initialization parameters
  • -totalMemory specify the value for MEMORY_TARGET in megabytes (e.g. 500)

I strongly recommend that, once the database is created, you change the SYS and SYSTEM password from the SQL*Plus password command to avoid leaving any trace of it. You should also resize the SGA and PGA Aggregate according to your needs.

Below is an example of the use of DBCA to create a database stored in the /u01/oradata/ORCL filesystem:

$ dbca -silent                           \
       -createDatabase                   \
       -template General_Purpose.dbc     \
       -gdbName ORCL                     \
       -sid ORCL                         \
       -SysPassword change_on_install    \
       -SystemPassword manager           \
       -emConfiguration NONE             \
       -datafileDestination /u01/oradata \
       -redoLogFileSize 100              \
       -storageType FS                   \
       -characterSet WE8ISO8859P15       \
       -totalMemory 500

You’ll find below an example of the use of DBCA to create a database stored in the ASM +DGDATA diskgroup:

$ dbca -silent                             \
       -createDatabase                     \
       -template General_Purpose.dbc       \
       -gdbName ORCL                       \
       -sid ORCL                           \
       -SysPassword change_on_install      \
       -SystemPassword manager             \
       -emConfiguration NONE               \
       -redoLogFileSize 100                \
       -storageType ASM                    \
         -asmSysPassword change_on_install \
         -diskGroupName DGDATA             \
       -characterSet WE8ISO8859P15         \
       -totalMemory 500

More to come

There are actually several tools, such as Oracle Provisioning Pack or Third Party tools, that will enable you to speed up your database installations. Creating “Gold Images” of the Oracle Database Software and Database Templates is another way; I will cover that in part three of this series.

My own record for installing the 10.2.0.4 software and creating a database on a Linux x86_64 server is less than eight minutes; that time includes one minute to download the 10.2.0.1 release from OTN with Lynx, and two minutes to download the Patch Set. But I bet you’ll soon beat me!

1. The syntaxes of this post are for Unix and Linux; They slightly differ on Windows; The tenth post of this series will cover the Windows differences.
^back

Top Categories

  • There are no suggestions because the search field is empty.

Tell us how we can help!

dba-cloud-services
Upcoming-Events-banner