Skip to main content

Creating Oracle Instance In Silent Mode



Database creation using dbca is preferred by most Oracle DBAs, because it is a more automated approach, and your database is ready to use when DBCA completes. DBCA can be launched by the Oracle Universal Installer (OUI), depending upon the type of install that you select. It can also be used to delete a database or configure other options of a database.
Sometimes when working remotely, you may not have access to a GUI, or simply using GUI may be annoyingly slow for example when exporting display for a server installed in the cloud, as was my case.
In such situations and others, you can use dbca in silent mode to create your instance.
In this article we will look at how we can create a database using a non-interactive silent mode.
Creating Database Using DBCA Silent Mode
The “silent” argument is passed to DBCA to achieve this. Other options like password for SYS and SYSTEM users, which template to use and where to put datafiles are also provided to the DBCA as an argument.
Most of the options are optional and you can skip them. However, if you miss the mandatory option the DBCA command line will ask for their values before creating the database.
Some of the parameters which we will be used to create a database;
-Silent
Instructs dbca to run in silent mode
-createDatabase
The argument will instruct the DBCA to create a database.
-templateName
Specifies the template to use to create the database. A template is advantageous as you don’t have to specify a bevy of other options like datafile and control file locations.
-gdbname
The global database name.
-sid
The database instance name.
-characterSet
The character set that the newly created database will be using.
-memoryPercentage
The argument will specify the percentage of total memory that can be use by the SGA and PGA combined.
-emConfiguration
Whether the database should be configured to use EM or not.
Below are steps to achieve this;
1.   Confirm your ORACLE_HOME and ORACLE_BASE before proceeding


2.    Confirm the template to be used has the correct parameters. The template is locate at the $ORACLE_HOME/assistants/dbca/templates’ directory by default unless otherwise specified. Make changes to it if necessary
 
 
3.    Run dbca in silent mode



dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname tqv5 -sid tqv5 -responseFile NO_VALUE -characterSet AL32UTF8 -memoryPercentage 20 -emConfiguration NONE
 
You will be able to monitor the progress as seen above. The logfile can also be accessed.

 The beauty of the silent install is that it can be scheduled to run at any desired time as a cronjob.


The instance is successfully been created and can be verified,




Comments

  1. You can also create an instance using CREATE DATABASE command.

    option1:

    STEPS:
    1. create a pfile with the following entries:
    db_name='testdb'
    control_files='/location_1/control01.ctl','/location_2/control02.ctl'

    2. startup nomount pfile='/u01/app/oracle/product/12.1/db_1/dbs/inittestdb.ora'
    3. create spfile from pfile='/u01/app/oracle/product/12.1/db_1/dbs/inittestdb.ora';
    4. shu immediate
    5. startup nomount ---> to start the db using the newly created spfile
    6. issue create database command:

    CREATE DATABASE playdb2
    USER SYS IDENTIFIED BY pass123
    USER SYSTEM IDENTIFIED BY pass123
    LOGFILE GROUP 1 ('/playground/app/oracle/oradata/playdb2/redo01a.log','/playground/app/oracle/oradata/playdb2/redo01b.log') SIZE 50M BLOCKSIZE 512,
    GROUP 2 ('/playground/app/oracle/oradata/playdb2/redo02a.log','/playground/app/oracle/oradata/playdb2/redo02b.log') SIZE 50M BLOCKSIZE 512,
    GROUP 3 ('/playground/app/oracle/oradata/playdb2/redo03a.log','/playground/app/oracle/oradata/playdb2/redo03b.log') SIZE 50M BLOCKSIZE 512
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 100
    CHARACTER SET AL32UTF8
    NATIONAL CHARACTER SET AL16UTF16
    EXTENT MANAGEMENT LOCAL (if not specified the db creates dictionary-managed tbs which are deprecated)
    DATAFILE '/playground/app/oracle/oradata/playdb2/system01.dbf' SIZE 325M REUSE ----> REUSE:- if df exists reuse it
    SYSAUX DATAFILE '/playground/app/oracle/oradata/playdb2/sysaux01.dbf' SIZE 325M REUSE
    DEFAULT TABLESPACE users DATAFILE '/playground/app/oracle/oradata/playdb2/users01.dbf' SIZE 100M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
    DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE '/playground/app/oracle/oradata/playdb2/temp01.dbf' SIZE 20M REUSE
    UNDO TABLESPACE undotbs DATAFILE '/playground/app/oracle/oradata/playdb2/undotbs01.dbf' SIZE 100M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

    6. run scripts to build data dictionary views as sysdba in the following order:

    SQL> @?/rdbms/admin/catalog.sql
    SQL> @?/rdbms/admin/catproc.sql
    SQL> @?/rdbms/admin/utlrp.sql

    --
    option2: Using Oracle Managed Files
    --
    1. create pfile:

    DB_CREATE_FILE_DEST='/u01/app/oracle/oradata'
    db_name='testdb'
    memory_target=1G

    2. startup DB using the newly create pfile:
    startup nomount pfile='/u01/app/oracle/product/12.1/db_1/dbs/inittest.ora'
    create spfile from pfile='/u01/app/oracle/product/12.1/db_1/dbs/inittest.ora';
    shu immediate
    startup nomount

    3. Issue create database command

    CREATE DATABASE playdb3
    USER SYS IDENTIFIED BY oracle
    USER SYSTEM IDENTIFIED BY oracle
    EXTENT MANAGEMENT LOCAL
    DEFAULT TEMPORARY TABLESPACE temp
    UNDO TABLESPACE undotbs1
    DEFAULT TABLESPACE users;

    run scripts above after creation
    SQL> @?/rdbms/admin/catalog.sql
    SQL> @?/rdbms/admin/catproc.sql
    SQL> @?/rdbms/admin/utlrp.sql

    Verify your DB

    ReplyDelete

Post a Comment

Popular posts from this blog

OBIEE 11g Error "Selected item is not of valid selection type" In Agent When Select Dashboard Page For Content

OBIEE 11g Error"Selected item is not of valid selection type" This error applies to OBIEE - version 11.1.1.7.0 and later . When you try to choose a dashboard page for delivery content in an agent, it constantly fails with the error message " Selected item is not of valid selection type ”.  Solution: This error may happen, when there is an added extra space after the end of the name of the dashboard page. For example, instead of "PAGE", it is "PAGE   "  It may happen with a space at the beginning of the name also. Removal of the extra space by renaming the dashboard page will correct the error.

Setting User Defined JVM Memory Arguments in JDeveloper 11g Integrated WebLogic Server

Setting User Defined JVM Memory Arguments in JDeveloper 11g Integrated WebLogic Server This guide explains how to set your own predefined JVM memory arguments for the JDeveloper WebLogic container at startup for the integrated WebLogic server.   This will help avoid java.lang.OutOfMemoryError s experienced on heavy java processes and also improve on the integrated JDeveloper WebLogic server’s performance overall. Steps Locate the file: setDomainEnv.cmd which should be at: [JDeveloper Working Directory]\jdeveloper\system.xxx.xx.xx\DefaultDomain\bin                                 i.             Note: [JDeveloper Working Directory] will be "C:\Documents and Settings\<username>\Application...

Oracle BI Scheduler Error: [nqSError:76015]

Oracle BI Scheduler Error: [nqSError:76015]. The active Oracle BI Scheduler instance in the cluster could not be determined This solution applies to Oracle Business Intelligence Server Enterprise Edition - Version 11.1.1.7 and later The above error appears when a user is unable to save and edit an iBOT/Agent job This is because the data source details are incorrect and not matching with the data connection from tnsnames.ora file To resolve the error, 1.        Log in to Enterprise Manager 2.        Navigate to coreapplication 3.        Open the Deployment tab and navigate to scheduler 4.        Lock and Edit configuration 5.        Copy connection details from tnsnames.ora file NB Don’t include the TNS alias, only copy the connection string after the equal (=) sign. Spaces are OK: For example: (DESCRIPTION=(ADDRES...