Saminnet-Search Article Wiki Forum Piwigo SNS Cloud vtiger Sugar
Install 12c ASM

  • Oracle
    • WebLogic Reset (212) Tue04,11:01am

      WebLogicŤĶ∑Śčē„Āô„āč„Āü„Ā≥„Āę„ɶ„Éľ„ā∂Śźć„Ā®„ÉĎ„āĻ„ÉĮ„Éľ„ÉČ„āíŤĀě„ĀĄ„Ā¶„Āć„Ā¶ÁÖ©„āŹ„Āó„Āč„Ā£„Āü„Āģ„ĀߌõěťĀŅ„Āó„Āü„É°„ÉĘ„Äā ¬†¬†¬† security„Éē„ā©„Éę„ÉÄ„āíšĹúśąź ¬†¬†¬† $ mkdir $DOMAIN_HOME/servers/AdminServer/security ¬†¬†¬† boot.properties„āíšĹúśąź¬†¬†¬† boot.properties ¬†¬†¬† username=weblogic¬†¬†¬† password=password ¬†¬†¬† ‚ÄĽŚĻ≥śĖá„ĀßOK ¬†¬†¬† nohup & „ĀßWeblogic„āíŤĶ∑Śčē ¬†¬†¬† $ nohup sh $DOMAIN_HOME/startWebLogic.sh & ¬†¬†¬† ‚ÄĽnohup.out„Āꌟź„Āč„āĆ„āč„Āģ„ĀĆ„ĀĄ„āĄ„Ā†„Ā£„Āü„āČťĀ©ŚĹď„Āę„É™„ÉÄ„ā§„ɨ„āĮ„Éą„Āē„Āõ„āč ¬†¬†¬† boot.properties„ĀĆśöóŚŹ∑ŚĆĖ„Āē„āĆ„Ā¶„āč„Āď„Ā®„āíÁĘļŤ™ć ¬†¬†¬† $ ca…

      Read More...

Install 12c ASM

Background & Overview

The following documentation provides instructions for building an Oracle 12c database with ASM residing on RedHat (Version 6.7, Kernel version 2.6.32). Use the command cat /etc/*release* to check the Oracle Linux OS version and uname -r to check the Kernel level.

Further reference documentation about Oracle 12c and Oracle Linux is detailed in the Other References section below.

Assumptions

This document expects and assumes the following:

  • The instructions are carried out by a qualified DBA.
  • All necessary client software, e.g. Telnet and X-Server is available.
  • All references to¬†SID¬†should be replaced with correct database name as derived using a suitable database naming standard.
  • All¬†$variable¬†references assume the¬†.profile¬†as described in the¬†File Listings¬†section has been implemented and run.

Useful Information

  • Read the¬†Known Issues¬†section below.

Software

File Name Description Byte Count MD5 Hash
linuxamd64_12102_database_1of2.zip Database Binaries File 1 1673544724 080435a40bd4c8dff6399b231a808e9a
linuxamd64_12102_database_2of2.zip Database Binaries File 2 1014530602 30f20ef9437442b8282ce3984546c982
linuxamd64_12102_grid_1of2.zip Grid Infrastructure Binaries File 1 1747043545 d793c2ba5db9008b79077bff8d27a219
linuxamd64_12102_grid_2of2.zip Grid Infrastructure Binaries File 2 646972897 0e18a9abb80427baf18f85865b1ecd5d
p20996835_121020_Linux-x86-64 Grid Infrastructure and DB PSU 1031691784 F32C00880F4311A20D6D2174ABE95C38
p6880880_121010_Linux-x86-64 OPatch Version 12.1.0.1.8 52853599 f3978f9d719f8f345ca8cca386683a59

Step-By-Step Guide - Pre-Requisites

1. Ensure the Oracle Linux version is 6 or higher.

  • cat /etc/*release*

2. Ensure the Oracle Linux Kernel version for both nodes is 2.6.18 or higher.

  • uname -r

3. As a minimum ensure RedHat has the following packages installed on both nodes.

unzip (x86_64)
xorg-x11-utils-7.5-6.el6.x86_64
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (i686)
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (i686)
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (i686)
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6 (i686)
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6 (i686)
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (i686)
libXext-1.1 (x86_64)
libXext-1.1 (i686)
libXtst-1.0.99.2 (x86_64)
libXtst-1.0.99.2 (i686)
libX11-1.3 (x86_64)
libX11-1.3 (i686)
libXau-1.0.5 (x86_64)
libXau-1.0.5 (i686)
libxcb-1.5 (x86_64)
libxcb-1.5 (i686)
libXi-1.3 (x86_64)
libXi-1.3 (i686)
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)

4. Set the kernel parameters in /etc/sysctl.conf for both nodes as follows. NOTE If the current value for any parameter is higher than the value listed below, do not change the value of that parameter.

shmmax - Half the server memory
shmmni - 4096 (or greater)
fs.file-max - 6815744 (or greater)
fs.aio-max-nr - 1048576 (or greater)
net.core.rmem_default - 262144 (or greater)
net.core.rmem_max - 4194304 or greater)
net.core.wmem_default - 262144 (or greater)
net.core.wmem_max - 1048576 (or greater)
sem - 250 32000 100 128 (or greater)
net.ipv4.ip_local_port_range - 9000 65535

5. Ensure oracle account and dba group exists on both nodes.

6. Update the following file /etc/security/limits.conf on both nodes.

oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 20480
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768

7. Ensure the following line in the /etc/pam.d/login file existis on both nodes.

session required pam_limits.so

8. Create the .profile - see File Listings section below.

9. Install ASMLIB.

10. Create a single partition on each device to be used by ASM.

11. Create the ASM disks. For this installation the following disks will need to be created.

  • asm-data01
  • asm-fra01
  • asm-redo01
  • asm-redo02

12. Check to confirm the disk are set-up correctly

  • /usr/sbin/oracleasm listdisks

13. Unzip the files

  • Log on as Oracle
  • cd /u01/app/oracle/SOFTWARE
  • unzip linuxamd64_12102_database_1of2.zip
  • unzip linuxamd64_12102_database_2of2.zip
  • unzip linuxamd64_12102_grid_1of2.zip
  • unzip linuxamd64_12102_grid_2of2.zip
  • unzip p6880880_121010_Linux-x86-64
  • unzip p20996835_121020_Linux-x86-64

Step-By-Step Guide - ASM Binary Installs

1. Log on to Oracle.

2. Unset ORACLE_HOME and GRID_HOME

  • unset ORACLE_HOME
  • unset GRID_HOME
  • unset ORACLE_SID
  • unset TNS_ADMIN

3. Install Grid Infrastructure Using the GUI

  • cd /u01/app/oracle/SOFTWARE/grid
  • ./runInstaller

4. Follow the instructions as detailed in the screenshots here

5. When prompted run the root scripts in the order specified

  • Log on as root
  • /u01/app/oraInventory/orainstRoot.sh
  • /u01/app/oracle/product/12.1.0/grid/root.sh

Step-By-Step Guide - Configure ASM

1. Create the extra Disk Groups

  • . oraenv
  • ORACLE_SID = [oracle] ? +ASM
  • sqlplus / as sysasm
  • SQL>¬†CREATE DISKGROUP FRA01 EXTERNAL REDUNDANCY DISK ‚Äė/dev/asm-fra001‚Ä≤ ATTRIBUTE ‚ÄėCOMPATIBLE.ASM‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôCOMPATIBLE.RDBMS‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôAU_SIZE‚Äô=‚Äô4M';
  • SQL>¬†CREATE DISKGROUP REDO01 EXTERNAL REDUNDANCY DISK ‚Äė/dev/asm-redo001‚Ä≤ ATTRIBUTE ‚ÄėCOMPATIBLE.ASM‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôCOMPATIBLE.RDBMS‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôAU_SIZE‚Äô=‚Äô4M';
  • SQL>¬†CREATE DISKGROUP REDO02 EXTERNAL REDUNDANCY DISK ‚Äė/dev/asm-redo002‚Ä≤ ATTRIBUTE ‚ÄėCOMPATIBLE.ASM‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôCOMPATIBLE.RDBMS‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôAU_SIZE‚Äô=‚Äô4M';

2. Update parameter file with new Diskgroups

  • SQL>¬†ALTER SYSTEM SET ASM_DISKGROUPS=‚ÄôFRA01‚Ä≤, ‚ÄėREDO01‚Ä≤, ‚ÄėREDO02‚Ä≤ SCOPE=BOTH SID=‚Äô+ASM‚Äô

3. Configure ASM to use huge pages

  • . oraenv
  • ORACLE_SID = [oracle] ? MYDB001
  • SQL>¬†sqlplus / as sysdba
  • SQL>¬†shutdown immediate;
  • SQL>¬†quit
  • . oraenv
  • ORACLE_SID = [oracle] ? +ASM
  • SQL>¬†sqlplus / as sysasm
  • SQL>¬†alter system set memory_max_target=0 scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†alter system set memory_target=0 scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†alter system set sga_target=1088M scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†alter system set use_large_pages=‚ÄôONLY‚Äô scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†shutdown immediate;
  • SQL>¬†startup;
  • SQL>¬†quit
  • . oraenv
  • ORACLE_SID = [oracle] ? MYDB001
  • SQL>¬†sqlplus / as sysdba
  • SQL>¬†startup

Step-By-Step ‚Äď Oracle Database Binary Install

1. Log on to Oracle

2. Unset variables

  • unset ORACLE_BASE
  • unset ORACLE_HOME
  • unset GRID_HOME
  • unset ORACLE_SID
  • unset TNS_ADMIN

3. Install Database Software

  • cd /u01/app/oracle/SOFTWARE/database
  • ./runInstaller

4. Follow the instructions as detailed in the screenshots here and when prompted run root.sh.

  • cd /u01/app/oracle/product/12.1.0/dbhome_1
  • ./root.sh

5. Create a symbolic link for TNS directory entries to stop dbca from failing on DB creation and on crsct startup.

  • cd /u01/app/oracle/product/12.1.0/dbhome_1/network/admin
  • ln -s /u01/app/oracle/product/12.1.0/grid/network/admin/tnsnames.ora
  • ln -s /u01/app/oracle/product/12.1.0/grid/network/admin/sqlnet.ora
  • ln -s /u01/app/oracle/product/12.1.0/grid/network/admin/listener.ora

Step-By-Step ‚Äď Oracle Database Creation

1. Log on to Oracle

2. Create the database using dbca

  • cd /u01/app/oracle/product/12.1.0/dbhome_1/bin
  • ./dbca

3. Follow the instructions as detailed in the screenshots here


Step-By-Step ‚Äď Grid and Database Patching

1. Log on as Oracle

2. Install the latest version of OPatch in the GI home and DB home

  • unzip p6880880_121010_Linux-x86-64.zip -d /u01/app/oracle/product/12.1.0/grid
  • unzip p6880880_121010_Linux-x86-64.zip -d /u01/app/oracle/product/12.1.0/dbhome_1

3. Check the version of OPatch

  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/grid
  • $ORACLE_HOME/OPatch/opatch version
  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
  • $ORACLE_HOME/OPatch/opatch version

4. Validate the oraInventory

  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/grid
  • $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/12.1.0/grid
  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
  • $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/12.1.0/dbhome_1

5. Log on as root

6. Create a Grid OCM response file

  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/grid
  • $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /tmp/GI_ocm.rsp
    • Press return when prompted for an email
    • Answer ‚ÄúYes‚ÄĚ to remain uninformed of updates

7. Analyze the patch for conflicts with other patches already installed

  • $ORACLE_HOME/OPatch/opatchauto apply /u01/app/oracle/SOFTWARE/20996835 -analyze -ocmrf /tmp/GI_ocm.rsp

8. Patch the Grid Infrastructure home and the Database Home

  • $ORACLE_HOME/OPatch/opatchauto apply /u01/app/oracle/SOFTWARE/20996835 -ocmrf /tmp/GI_ocm.rsp

Step-By-Step ‚Äď Database Configuration (Optional and Site Specific)

1. Log on as Oracle

2. Set some database options and rename the spfile in ASM

  • . oraenv
  • ORACLE_SID = [oracle] ? MYDB001
  • SQL>¬†sqlplus / as sysdba
  • SQL>¬†alter database flashback on;
  • SQL>¬†alter database force logging;
  • SQL>¬†alter system set cursor_sharing=force scope=spfile sid=‚Äô*';
  • SQL>¬†alter system set control_file_record_keep_time =14 scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†alter system set use_large_pages =‚ÄôONLY‚Äô scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†BEGIN;
  • SQL>¬†exec dbms_auto_task_admin.disable(
  • SQL>¬†client_name => ‚Äėauto optimizer stats collection‚Äô, operation => NULL, window_name => NULL);
  • SQL>¬†END;
  • SQL>¬†/
  • SQL>¬†create pfile=‚Äô/tmp/temporary.ora‚Äô from spfile;
  • SQL>¬†shutdown immediate;
  • SQL>¬†startup pfile=‚Äô/tmp/temporary.ora‚Äô
  • SQL>¬†create spfile=‚Äô+DATA01/MYDB001/spfileMYDB001.ora‚Äô from pfile=‚Äô/tmp/temporary.ora‚Äô
  • SQL>¬†shutdown immediate
  • SQL>¬†quit
  • rm /tmp/temporary.ora
  • cd $ORACLE_HOME/dbs
  • echo ‚Äú+DATA01/MYDB001/spfileMYDB001.ora‚ÄĚ > initMYDB001.ora
  • sqlplus / as sysdba
  • SQL>¬†startup
  • SQL>¬†show parameter spfile
  • Check the new spfile has been picked up
  • SQL>¬†quit
  • rman
  • RMAN>¬†connect target /
  • RMAN>¬†configure controlfile autobackup on;
  • RMAN>¬†quit

3. Implement DCD on the databases.

  • cd $TNS_ADMIN
  • vi sqlnet.ora
  • Add the following line to the sqlnet.ora file.
  • SQLNET.EXPIRE_TIME = 10

Security Compliance (Recommended, but optional)

The following steps should be performed once the database has been built to ensure that the environment conforms to Oracle's Best Practices and also ensures that it doesn't fall foul of Internal Audit.

1. Remove the GRANT EXECUTE TO PUBLIC privilege from potentially harmful packages.

  • sqlplus '/ as sysdba'
  • SQL>¬†revoke execute on utl_file from public;
  • SQL>¬†revoke execute on dbms_random from public;
  • SQL>¬†revoke execute on utl_http from public;
  • SQL>¬†revoke execute on utl_smtp from public;
  • SQL>¬†revoke execute on utl_tcp from public;
  • SQL>¬†exit

2. Ensure the following user-ids' passwords, where applicable, have been changed:

  • SYS
  • SYSTEM
  • DBSNMP
  • OUTLN
  • CTXSYS
  • PERFSTAT

3. Adjust the database DEFAULT TABLESPACE settings so that the SYSTEM tablespace is not used inappropriately.

  • sqlplus '/ as sysdba'
  • SQL>¬†alter database default tablespace users;
  • SQL>¬†alter user sys default tablespace system;
  • SQL>¬†alter user system default tablespace system;

4. Correct any users that already have SYSTEM as their DEFAULT TABLESPACE

  • sqlplus '/ as sysdba'
  • SQL>¬†select username, default_tablespace from dba_users where default_tablespace = 'SYSTEM';
  • SQL>¬†alter user <user name> default tablespace <non-SYSTEM tablespace>;
  • SQL>¬†exit

5. Lock and expire potentially harmful built-in user-ids.

  • sqlplus '/ as sysdba'
  • SQL>¬†alter user &user_idpassword expire account lock;
    • Repeat for each user as required.
  • SQL>¬†exit

Regression

To restore the environment back to its initial state, perform the following

1. Shutdown the environment

2. Remove all database files, binaries, trace files and administration logs using the deinstall tool - seeDeinstall Section below.


File Listings

oracle .profile

#----------------------------------------------------------------------
# Configure Terminal Settings.
#----------------------------------------------------------------------

stty susp ^Z
stty quit ^C
stty erase ^?
export ORACLE_TERM=vt100

#----------------------------------------------------------------------
# Configure Shell Settings.
#----------------------------------------------------------------------

set -o vi
export PATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/ccs/bin:$PATH
export EDITOR=vi
export HOSTNAME=`hostname`
export PS1='$LOGNAME@$HOSTNAME:$ORACLE_SID> '
export TMPDIR=/tmp
export TEMP=/tmp
export TMOUT=7200
umask 022

#----------------------------------------------------------------------
# Configure Aliases.
#----------------------------------------------------------------------

alias ll="ls -la"
alias lt="ls -lrt|tail"
alias bdf="df -h"

#----------------------------------------------------------------------
# Configure Oracle Settings.
#----------------------------------------------------------------------

export ORACLE_BASE=/u01/app/oracle
export SQLPATH=$ORACLE_BASE/DBA/SQL
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export OPATCH_LIB=/u01/app/oracle/SOFTWARE/OPATCH/OPatch
export PATH=$ORACLE_HOME/bin:$PATH:$OPATCH_LIB
export GRID_HOME==$ORACLE_BASE/product/12.1.0/grid
export TNS_ADMIN=$GRID_HOME/network/admin

oratab

MYDB001:/u01/app/oracle/product/12.1.0/dbhome_1:Y
+ASM1:/u01/app/oracle/product/12.1.0/grid:N

File Systems

--- /u01 --- /app --- /oraInventory
|aaaaaaaaaaaaaa|
|aaaaaaaaaaaaaa--- /oracle --- /software
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /dba --- /scripts
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa|aaaaaaa--- /sql
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /diag
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /product ---/12.1.0 ---/dbhome_1
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /product ---/12.1.0 ---/grid
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /admin --- /SID --- /adump
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--- /pfile


Example GRID Infrastructure Install

12c_GridInfra_001.jpg

  • Select¬†Install and Configure Grid Infrastructure for a Standalone Server
  • Click¬†Next

12c_GridInfra_002a.jpg

  • Select the languages you require. In this instance all languages have been chosen.
  • Click¬†Next

12c_GridInfra_003.jpg

  • Set¬†Disk group name¬†to¬†DATA01
  • Set¬†Allocation Unit Size¬†to¬†4MB
  • Click¬†Change Discovery Path

12c_GridInfra_004.jpg

  • Set¬†Disk Discovery Path¬†to¬†/dev/asm¬†(or to the path of your ASM LUNs)
  • Click¬†OK

12c_GridInfra_005.jpg

  • Ensure the radial button¬†Candidate Disks¬†is selected.
  • Select the disks you want added to disk group¬†DATA01¬†by ticking the box.
  • Click¬†Next

12c_GridInfra_006.jpg

  • Select the radial button¬†Use same passwords for these accounts
  • The passwords can be changed to something more suitable later.
  • Click¬†Next

12c_GridInfra_007.jpg

  • If presented with this screen click¬†Yes
  • As mentioned above, the passwords can be changed to something more suitable later

12c_GridInfra_008.jpg

  • For this installation no Grid Agent is going to be configured.
  • Click¬†NEXT

12c_GridInfra_009.jpg

  • In this installation the same OS group is going to be used. This may not be suitable for all environments.
  • Set¬†Oracle ASM Administrator (OSASM) Group¬†to¬†dba
  • Set¬†Oracle ASM DBA (OSDBA for ASM) Group¬†to¬†dba
  • Set¬†Oracle ASM Operator (OSOPER for ASM) Group (Optional)¬†to¬†dba
  • Click¬†Next

12c_GridInfra_010.jpg

  • If this is okay for the environment being built, click¬†YES

12c_GridInfra_011.jpg

  • Ensure¬†Oracle base¬†is set to¬†/u01/app/oracle
  • Ensure¬†Software location¬†is set to¬†/u01/app/oracle/product/12.1.0/grid
  • The fields should already be populated with the above values.
  • They can be changed, but it is recommended to keep the defaults.
  • Click¬†Next

12c_GridInfra_012.jpg

  • Ensure¬†Inventory Directory¬†is set to¬†/u01/app/oraInventory
  • The field should already be populated with the value above.
  • The¬†Inventory Directory¬†can be changed, but it is recommended to keep the defaults.
  • Click¬†Finish

12c_GridInfra_013.jpg

  • In this environment the¬†root¬†password is known, so configuration scripts will be run automatically.
  • Tick¬†Automatically run configuration scripts
  • Select the radial button¬†Use "root" user credential
  • Ensure the¬†Password¬†is set
  • Click¬†Next

12c_GridInfra_014.jpg

  • Wait for the verification process to complete.
  • This screen will move on automatically.

12c_GridInfra_015.jpg

  • For demonstration purposes, this installation has some issues.
  • The¬†Fix & Check Again¬†button can be used to fix any issues.
  • Note that not all issues can be fixed and it may be necessary to refer the issues to a Unix Administrator
  • Click¬†Check Again¬†when all issues have been resolved.

12c_GridInfra_016.jpg

  • Review this screen and click¬†Install
  • At this point a¬†Response File¬†can be saved by clicking¬†Save Response File‚Ķ
  • A response file can be used for automated deployments.

12c_GridInfra_017.jpg

  • Wait for the installation to complete.
  • This screen will move on automatically.

12c_GridInfra_018.jpg

  • Click¬†Close

Example Database Binary Install

12c_DBInstall_001.jpg

  • Un-tick the¬†I wish to receive security updates via My Oracle Support¬†box.
    • NB¬†This is site specific and should be reviewed.
  • Click¬†Next.

12c_DBInstall_002.jpg

  • Click¬†Yes¬†to remain uninformed.

12c_DBInstall_003.jpg

  • Select¬†Install database software only
  • Click¬†Next.

12c_DBInstall_004.jpg

  • Ensure¬†Single instance database installation¬†is selected.
  • Click¬†Next.

12c_DBInstall_005.jpg

  • Select the languages you require. In this instance all languages have been chosen.
  • Click¬†Next

12c_DBInstall_006.jpg

  • Set¬†Database edition¬†to¬†Enterprise Edition (6.4GB)
  • Click¬†Next

12c_DBInstall_007.jpg

  • Ensure¬†Oracle base¬†is set to¬†/u01/app/oracle
  • Ensure¬†Software location¬†is set to¬†/u01/app/oracle/product/12.1.0/dbhome_1
  • The fields should already be populated with the above values.
  • They can be changed, but it is recommended to keep the defaults.
  • Click¬†Next

12c_DBInstall_008.jpg

  • In this installation different OS groups will be used. Optional groups will be left blank.
  • This may not be suitable for all environments.
  • Set¬†Database Administrator (OSDBA) Group¬†to¬†dba
  • Leave¬†Database Operator (OSOPER) Group (Optional)¬†blank.
  • Set¬†Database Backup and Recovery (OSBACKUPDBA) Group¬†to¬†bckpdba
  • Set¬†Data Guard administrative (OSDGDBA) Group¬†to¬†dgdba
  • Set¬†Encryption Key Management administrative (OSKMDBA) Group¬†to¬†kmdba
  • Click¬†Next

12c_DBInstall_009.jpg

  • Wait for the verification process to complete.
  • This screen moves on automatically when complete.

12c_DBInstall_010.jpg

  • For demonstration purposes, this installation has some issues.
  • The¬†Fix & Check Again¬†button can be used to fix any issues.
  • Note that not all issues can be fixed and it may be necessary to refer the issues to a Unix Administrator
  • Click¬†Check Again¬†when all issues have been resolved.

12c_DBInstall_011.jpg

  • Review this screen and click¬†Install
  • At this point a¬†Response File¬†can be saved by clicking¬†Save Response File‚Ķ
  • A response file can be used for automated deployments.

12c_DBInstall_012.jpg

  • Wait for the installation process to complete.
  • This screen will move on automatically.

12c_DBInstall_013.jpg

  • Get a UNIX administrator to run the¬†Configuration Scripts¬†as the¬†root¬†user.
  • Click¬†OK¬†when the¬†Configuration Scripts¬†have completed successfully.

12c_DBInstall_014.jpg

  • Click¬†Close

Example Database Creation

12c_Create_001.jpg

  • Select¬†Create Database
  • Click¬†Next.

12c_Create_002.jpg

  • Select¬†Advanced Mode.
  • Click¬†Next.

12c_Create_003.jpg

  • Select¬†General Purpose or Transaction Processing.
  • Click¬†Next.

12c_Create_004.jpg

  • Set¬†Global Database Name¬†to¬†MYDB001.MYDOMAIN.COM
  • Ensure¬†SID¬†has been populated with¬†MYDB001
  • Click¬†Next.

12c_Create_005.jpg

  • For this installation no Grid Agent is going to be configured.
  • Click¬†Next

12c_Create_006.jpg

Set and confirm the passwords for the SYS and SYSTEM user.
Click Next


12c_Create_007.jpg

  • For this database, the¬†GRID¬†listener will be used. This may not be suitable for all environments.
  • Tick the box alongside¬†LISTENER
  • Click¬†Next

12c_Create_008.jpg

  • Ensure¬†Database files Storage Type¬†is set to¬†Automatic Storage Management (ASM)
  • Select¬†Use Common Location for All Database Files
  • Set¬†File Location¬†to¬†+DATA01
  • Tick¬†Use Oracle-Managed Files
  • Ensure¬†Recovery files Storage Type¬†is set to¬†Automatic Storage Management (ASM)
  • Tick¬†Specify Fast Recovery Area
  • Set¬†Fast Recovery Area¬†to¬†+FRA01
  • Set the¬†Fast Recovery Area Size¬†to a suitable value
  • Tick¬†Enable Archiving
  • Click¬†Multiplex Redo Logs and Control Files‚Ķ

12c_Create_009.jpg

  • Set¬†Location 1¬†to¬†+REDO01
  • Set¬†Location 2¬†to¬†+REDO02
  • Click¬†OK

12c_Create_010.jpg

  • Click¬†Next

12c_Create_011.jpg

  • In this installation¬†Sample Schemas¬†and¬†Database Vault & Label Security¬†will be left as default.
  • Click¬†Next.

12c_Create_012.jpg

  • For this installation¬†Automatic Shared Memory Management¬†will be used.
  • Set¬†SGA Size¬†and¬†PGA Size¬†to suitable values.
  • Click the¬†Sizing¬†tab.

12c_Create_013.jpg

  • Set the¬†Processes¬†value to a suitable number for the environment.
  • Click the¬†Character Sets¬†tab.

12c_Create_014a.jpg

  • These settings are dependent on the environment being built.
  • Select¬†Use Unicode (AL32UTF8)¬†- Most systems would use this value.
  • Set¬†National Character Set¬†to¬†UTF8 - Unicode 3.0 UTF-8 Universal character set, CESU-8 compliant¬†- Most systems would use this value.
  • Set a¬†Default Language
  • Set a¬†Default Territory
  • Click the¬†Connection Mode¬†tab.

12c_Create_015.jpg

  • Select¬†Dedicated Server Mode
  • Click¬†All Initialization Parameters...

12c_Create_016.jpg

  • Click¬†Show Advanced Parameters

12c_Create_017.jpg

  • Set the¬†Initialization Parameters¬†appropriately.
  • In this installation the following parameters have been set in the DBCA GUI
  • control_files¬†have been set to use¬†+DATA01¬†and¬†+FRA01
  • db_create_online_log_dest_1¬†has be set to use¬†+REDO01
  • db_create_online_log_dest_2¬†has be set to use¬†+REDO02
  • Click¬†Close

12c_Create_018.jpg

  • Click¬†Next.

12c_Create_019.jpg

  • Click¬†Customize Storage Locations‚Ķ

12c_Create_019b.jpg

  • Add additional¬†REDO¬†logs if required.
  • Click¬†Ok

12c_Create_019c.jpg

  • Tick¬†Create Database
  • If required at this point, a¬†Database Template¬†can be created by ticking¬†Save as Database Template
  • Set a¬†Name¬†for the¬†Database Template¬†if the¬†Save as Database Template¬†box has been ticked.
  • The database creation scripts can be created by ticking¬†Generate Database Creation Scripts
  • Click¬†Next

12c_Create_020.jpg

  • Review the summary page
  • Click¬†Finish

12c_Create_021.jpg

  • This screen will move on automatically.

12c_Create_022.jpg

  • Set-up the passwords by clicking on¬†Password Management¬†if required.
  • Click¬†Close.

Other References

  • None Currently

Known Issues

  • None Currently

Deinstalling Oracle 12g Binaries and Database

With 12.1 the deinstallation tool is located in the Oracle home directory after installation.

Step-by-Step

1. Run this tool from ORACLE_HOME first.

  • cd $ORACLE_HOME/deinstall
  • ./deinstall
  • When prompted for the database name enter the¬†SID¬†you want to remove.
    • NB¬†This will remove the database binaries too.
  • When asked¬†Do you still want to modify the details of SID database(s)? [n]:Answer¬†N
    • NB¬†You would answer¬†Y¬†if you wanted to amend the database configuration.
  • The tool should now complete okay after performing several tasks.

2. Now run the tool from the GRID_HOME.

Background & Overview

The following documentation provides instructions for building an Oracle 12c database with ASM residing on RedHat (Version 6.7, Kernel version 2.6.32). Use the command cat /etc/*release* to check the Oracle Linux OS version and uname -r to check the Kernel level.

Further reference documentation about Oracle 12c and Oracle Linux is detailed in theOther References section below.

Assumptions

This document expects and assumes the following:

  • The instructions are carried out by a qualified DBA.
  • All necessary client software, e.g. Telnet and X-Server is available.
  • All references to¬†SID¬†should be replaced with correct database name as derived using a suitable database naming standard.
  • All¬†$variable¬†references assume the¬†.profile¬†as described in the¬†File Listings¬†section has been implemented and run.

Useful Information

Software

File Name Description Byte Count MD5 Hash
linuxamd64_12102_database_1of2.zip Database Binaries File 1 1673544724 080435a40bd4c8dff6399b231a808e9a
linuxamd64_12102_database_2of2.zip Database Binaries File 2 1014530602 30f20ef9437442b8282ce3984546c982
linuxamd64_12102_grid_1of2.zip Grid Infrastructure Binaries File 1 1747043545 d793c2ba5db9008b79077bff8d27a219
linuxamd64_12102_grid_2of2.zip Grid Infrastructure Binaries File 2 646972897 0e18a9abb80427baf18f85865b1ecd5d
p20996835_121020_Linux-x86-64 Grid Infrastructure and DB PSU 1031691784 F32C00880F4311A20D6D2174ABE95C38
p6880880_121010_Linux-x86-64 OPatch Version 12.1.0.1.8 52853599 f3978f9d719f8f345ca8cca386683a59

Step-By-Step Guide - Pre-Requisites

1. Ensure the Oracle Linux version is 6 or higher.

  • cat /etc/*release*

2. Ensure the Oracle Linux Kernel version for both nodes is 2.6.18 or higher.

  • uname -r

3. As a minimum ensure RedHat has the following packages installed on both nodes.

unzip (x86_64)
xorg-x11-utils-7.5-6.el6.x86_64
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (i686)
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (i686)
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (i686)
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6 (i686)
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6 (i686)
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (i686)
libXext-1.1 (x86_64)
libXext-1.1 (i686)
libXtst-1.0.99.2 (x86_64)
libXtst-1.0.99.2 (i686)
libX11-1.3 (x86_64)
libX11-1.3 (i686)
libXau-1.0.5 (x86_64)
libXau-1.0.5 (i686)
libxcb-1.5 (x86_64)
libxcb-1.5 (i686)
libXi-1.3 (x86_64)
libXi-1.3 (i686)
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)

4. Set the kernel parameters in /etc/sysctl.conf for both nodes as follows. NOTE If the current value for any parameter is higher than the value listed below, do not change the value of that parameter.

shmmax - Half the server memory
shmmni - 4096 (or greater)
fs.file-max - 6815744 (or greater)
fs.aio-max-nr - 1048576 (or greater)
net.core.rmem_default - 262144 (or greater)
net.core.rmem_max - 4194304 or greater)
net.core.wmem_default - 262144 (or greater)
net.core.wmem_max - 1048576 (or greater)
sem - 250 32000 100 128 (or greater)
net.ipv4.ip_local_port_range - 9000 65535

5. Ensure oracle account and dba group exists on both nodes.

6. Update the following file /etc/security/limits.conf on both nodes.

oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 20480
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768

7. Ensure the following line in the /etc/pam.d/login file existis on both nodes.

session required pam_limits.so

8. Create the .profile - see File Listings section below.

9. Install ASMLIB.

10. Create a single partition on each device to be used by ASM.

11. Create the ASM disks. For this installation the following disks will need to be created.

  • asm-data01
  • asm-fra01
  • asm-redo01
  • asm-redo02

12. Check to confirm the disk are set-up correctly

  • /usr/sbin/oracleasm listdisks

13. Unzip the files

  • Log on as Oracle
  • cd /u01/app/oracle/SOFTWARE
  • unzip linuxamd64_12102_database_1of2.zip
  • unzip linuxamd64_12102_database_2of2.zip
  • unzip linuxamd64_12102_grid_1of2.zip
  • unzip linuxamd64_12102_grid_2of2.zip
  • unzip p6880880_121010_Linux-x86-64
  • unzip p20996835_121020_Linux-x86-64

Step-By-Step Guide - ASM Binary Installs

1. Log on to Oracle.

2. Unset ORACLE_HOME and GRID_HOME

  • unset ORACLE_HOME
  • unset GRID_HOME
  • unset ORACLE_SID
  • unset TNS_ADMIN

3. Install Grid Infrastructure Using the GUI

  • cd /u01/app/oracle/SOFTWARE/grid
  • ./runInstaller

4. Follow the instructions as detailed in the screenshots here

5. When prompted run the root scripts in the order specified

  • Log on as root
  • /u01/app/oraInventory/orainstRoot.sh
  • /u01/app/oracle/product/12.1.0/grid/root.sh

Step-By-Step Guide - Configure ASM

1. Create the extra Disk Groups

  • . oraenv
  • ORACLE_SID = [oracle] ? +ASM
  • sqlplus / as sysasm
  • SQL>¬†CREATE DISKGROUP FRA01 EXTERNAL REDUNDANCY DISK ‚Äė/dev/asm-fra001‚Ä≤ ATTRIBUTE ‚ÄėCOMPATIBLE.ASM‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôCOMPATIBLE.RDBMS‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôAU_SIZE‚Äô=‚Äô4M';
  • SQL>¬†CREATE DISKGROUP REDO01 EXTERNAL REDUNDANCY DISK ‚Äė/dev/asm-redo001‚Ä≤ ATTRIBUTE ‚ÄėCOMPATIBLE.ASM‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôCOMPATIBLE.RDBMS‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôAU_SIZE‚Äô=‚Äô4M';
  • SQL>¬†CREATE DISKGROUP REDO02 EXTERNAL REDUNDANCY DISK ‚Äė/dev/asm-redo002‚Ä≤ ATTRIBUTE ‚ÄėCOMPATIBLE.ASM‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôCOMPATIBLE.RDBMS‚Äô=‚Äô12.1.0.0.0‚Ä≤,‚ÄôAU_SIZE‚Äô=‚Äô4M';

2. Update parameter file with new Diskgroups

  • SQL>¬†ALTER SYSTEM SET ASM_DISKGROUPS=‚ÄôFRA01‚Ä≤, ‚ÄėREDO01‚Ä≤, ‚ÄėREDO02‚Ä≤ SCOPE=BOTH SID=‚Äô+ASM‚Äô

3. Configure ASM to use huge pages

  • . oraenv
  • ORACLE_SID = [oracle] ? MYDB001
  • SQL>¬†sqlplus / as sysdba
  • SQL>¬†shutdown immediate;
  • SQL>¬†quit
  • . oraenv
  • ORACLE_SID = [oracle] ? +ASM
  • SQL>¬†sqlplus / as sysasm
  • SQL>¬†alter system set memory_max_target=0 scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†alter system set memory_target=0 scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†alter system set sga_target=1088M scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†alter system set use_large_pages=‚ÄôONLY‚Äô scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†shutdown immediate;
  • SQL>¬†startup;
  • SQL>¬†quit
  • . oraenv
  • ORACLE_SID = [oracle] ? MYDB001
  • SQL>¬†sqlplus / as sysdba
  • SQL>¬†startup

Step-By-Step ‚Äď Oracle Database Binary Install

1. Log on to Oracle

2. Unset variables

  • unset ORACLE_BASE
  • unset ORACLE_HOME
  • unset GRID_HOME
  • unset ORACLE_SID
  • unset TNS_ADMIN

3. Install Database Software

  • cd /u01/app/oracle/SOFTWARE/database
  • ./runInstaller

4. Follow the instructions as detailed in the screenshots here and when prompted run root.sh.

  • cd /u01/app/oracle/product/12.1.0/dbhome_1
  • ./root.sh

5. Create a symbolic link for TNS directory entries to stop dbca from failing on DB creation and on crsct startup.

  • cd /u01/app/oracle/product/12.1.0/dbhome_1/network/admin
  • ln -s /u01/app/oracle/product/12.1.0/grid/network/admin/tnsnames.ora
  • ln -s /u01/app/oracle/product/12.1.0/grid/network/admin/sqlnet.ora
  • ln -s /u01/app/oracle/product/12.1.0/grid/network/admin/listener.ora

Step-By-Step ‚Äď Oracle Database Creation

1. Log on to Oracle

2. Create the database using dbca

  • cd /u01/app/oracle/product/12.1.0/dbhome_1/bin
  • ./dbca

3. Follow the instructions as detailed in the screenshots here


Step-By-Step ‚Äď Grid and Database Patching

1. Log on as Oracle

2. Install the latest version of OPatch in the GI home and DB home

  • unzip p6880880_121010_Linux-x86-64.zip -d /u01/app/oracle/product/12.1.0/grid
  • unzip p6880880_121010_Linux-x86-64.zip -d /u01/app/oracle/product/12.1.0/dbhome_1

3. Check the version of OPatch

  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/grid
  • $ORACLE_HOME/OPatch/opatch version
  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
  • $ORACLE_HOME/OPatch/opatch version

4. Validate the oraInventory

  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/grid
  • $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/12.1.0/grid
  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
  • $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/12.1.0/dbhome_1

5. Log on as root

6. Create a Grid OCM response file

  • export ORACLE_HOME=/u01/app/oracle/product/12.1.0/grid
  • $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /tmp/GI_ocm.rsp
    • Press return when prompted for an email
    • Answer ‚ÄúYes‚ÄĚ to remain uninformed of updates

7. Analyze the patch for conflicts with other patches already installed

  • $ORACLE_HOME/OPatch/opatchauto apply /u01/app/oracle/SOFTWARE/20996835 -analyze -ocmrf /tmp/GI_ocm.rsp

8. Patch the Grid Infrastructure home and the Database Home

  • $ORACLE_HOME/OPatch/opatchauto apply /u01/app/oracle/SOFTWARE/20996835 -ocmrf /tmp/GI_ocm.rsp

Step-By-Step ‚Äď Database Configuration (Optional and Site Specific)

1. Log on as Oracle

2. Set some database options and rename the spfile in ASM

  • . oraenv
  • ORACLE_SID = [oracle] ? MYDB001
  • SQL>¬†sqlplus / as sysdba
  • SQL>¬†alter database flashback on;
  • SQL>¬†alter database force logging;
  • SQL>¬†alter system set cursor_sharing=force scope=spfile sid=‚Äô*';
  • SQL>¬†alter system set control_file_record_keep_time =14 scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†alter system set use_large_pages =‚ÄôONLY‚Äô scope=spfile sid=‚Äô*‚Äô;
  • SQL>¬†BEGIN;
  • SQL>¬†exec dbms_auto_task_admin.disable(
  • SQL>¬†client_name => ‚Äėauto optimizer stats collection‚Äô, operation => NULL, window_name => NULL);
  • SQL>¬†END;
  • SQL>¬†/
  • SQL>¬†create pfile=‚Äô/tmp/temporary.ora‚Äô from spfile;
  • SQL>¬†shutdown immediate;
  • SQL>¬†startup pfile=‚Äô/tmp/temporary.ora‚Äô
  • SQL>¬†create spfile=‚Äô+DATA01/MYDB001/spfileMYDB001.ora‚Äô from pfile=‚Äô/tmp/temporary.ora‚Äô
  • SQL>¬†shutdown immediate
  • SQL>¬†quit
  • rm /tmp/temporary.ora
  • cd $ORACLE_HOME/dbs
  • echo ‚Äú+DATA01/MYDB001/spfileMYDB001.ora‚ÄĚ > initMYDB001.ora
  • sqlplus / as sysdba
  • SQL>¬†startup
  • SQL>¬†show parameter spfile
  • Check the new spfile has been picked up
  • SQL>¬†quit
  • rman
  • RMAN>¬†connect target /
  • RMAN>¬†configure controlfile autobackup on;
  • RMAN>¬†quit

3. Implement DCD on the databases.

  • cd $TNS_ADMIN
  • vi sqlnet.ora
  • Add the following line to the sqlnet.ora file.
  • SQLNET.EXPIRE_TIME = 10

Security Compliance (Recommended, but optional)

The following steps should be performed once the database has been built to ensure that the environment conforms to Oracle's Best Practices and also ensures that it doesn't fall foul of Internal Audit.

1. Remove the GRANT EXECUTE TO PUBLIC privilege from potentially harmful packages.

  • sqlplus '/ as sysdba'
  • SQL>¬†revoke execute on utl_file from public;
  • SQL>¬†revoke execute on dbms_random from public;
  • SQL>¬†revoke execute on utl_http from public;
  • SQL>¬†revoke execute on utl_smtp from public;
  • SQL>¬†revoke execute on utl_tcp from public;
  • SQL>¬†exit

2. Ensure the following user-ids' passwords, where applicable, have been changed:

  • SYS
  • SYSTEM
  • DBSNMP
  • OUTLN
  • CTXSYS
  • PERFSTAT

3. Adjust the database DEFAULT TABLESPACE settings so that the SYSTEM tablespace is not used inappropriately.

  • sqlplus '/ as sysdba'
  • SQL>¬†alter database default tablespace users;
  • SQL>¬†alter user sys default tablespace system;
  • SQL>¬†alter user system default tablespace system;

4. Correct any users that already have SYSTEM as their DEFAULT TABLESPACE

  • sqlplus '/ as sysdba'
  • SQL>¬†select username, default_tablespace from dba_users where default_tablespace = 'SYSTEM';
  • SQL>¬†alter user <user name> default tablespace <non-SYSTEM tablespace>;
  • SQL>¬†exit

5. Lock and expire potentially harmful built-in user-ids.

  • sqlplus '/ as sysdba'
  • SQL>¬†alter user &user_idpassword expire account lock;
    • Repeat for each user as required.
  • SQL>¬†exit

Regression

To restore the environment back to its initial state, perform the following

1. Shutdown the environment

2. Remove all database files, binaries, trace files and administration logs using the deinstall tool - seeDeinstall Section below.


File Listings

oracle .profile

#----------------------------------------------------------------------
# Configure Terminal Settings.
#----------------------------------------------------------------------

stty susp ^Z
stty quit ^C
stty erase ^?
export ORACLE_TERM=vt100

#----------------------------------------------------------------------
# Configure Shell Settings.
#----------------------------------------------------------------------

set -o vi
export PATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/ccs/bin:$PATH
export EDITOR=vi
export HOSTNAME=`hostname`
export PS1='$LOGNAME@$HOSTNAME:$ORACLE_SID> '
export TMPDIR=/tmp
export TEMP=/tmp
export TMOUT=7200
umask 022

#----------------------------------------------------------------------
# Configure Aliases.
#----------------------------------------------------------------------

alias ll="ls -la"
alias lt="ls -lrt|tail"
alias bdf="df -h"

#----------------------------------------------------------------------
# Configure Oracle Settings.
#----------------------------------------------------------------------

export ORACLE_BASE=/u01/app/oracle
export SQLPATH=$ORACLE_BASE/DBA/SQL
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export OPATCH_LIB=/u01/app/oracle/SOFTWARE/OPATCH/OPatch
export PATH=$ORACLE_HOME/bin:$PATH:$OPATCH_LIB
export GRID_HOME==$ORACLE_BASE/product/12.1.0/grid
export TNS_ADMIN=$GRID_HOME/network/admin

oratab

MYDB001:/u01/app/oracle/product/12.1.0/dbhome_1:Y
+ASM1:/u01/app/oracle/product/12.1.0/grid:N

File Systems

--- /u01 --- /app --- /oraInventory
|aaaaaaaaaaaaaa|
|aaaaaaaaaaaaaa--- /oracle --- /software
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /dba --- /scripts
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa|aaaaaaa--- /sql
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /diag
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /product ---/12.1.0 ---/dbhome_1
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /product ---/12.1.0 ---/grid
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /admin --- /SID --- /adump
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--- /pfile


Example GRID Infrastructure Install

12c_GridInfra_001.jpg

  • Select¬†Install and Configure Grid Infrastructure for a Standalone Server
  • Click¬†Next

12c_GridInfra_002a.jpg

  • Select the languages you require. In this instance all languages have been chosen.
  • Click¬†Next

12c_GridInfra_003.jpg

  • Set¬†Disk group name¬†to¬†DATA01
  • Set¬†Allocation Unit Size¬†to¬†4MB
  • Click¬†Change Discovery Path

12c_GridInfra_004.jpg

  • Set¬†Disk Discovery Path¬†to¬†/dev/asm¬†(or to the path of your ASM LUNs)
  • Click¬†OK

12c_GridInfra_005.jpg

  • Ensure the radial button¬†Candidate Disks¬†is selected.
  • Select the disks you want added to disk group¬†DATA01¬†by ticking the box.
  • Click¬†Next

12c_GridInfra_006.jpg

  • Select the radial button¬†Use same passwords for these accounts
  • The passwords can be changed to something more suitable later.
  • Click¬†Next

12c_GridInfra_007.jpg

  • If presented with this screen click¬†Yes
  • As mentioned above, the passwords can be changed to something more suitable later

12c_GridInfra_008.jpg

  • For this installation no Grid Agent is going to be configured.
  • Click¬†NEXT

12c_GridInfra_009.jpg

  • In this installation the same OS group is going to be used. This may not be suitable for all environments.
  • Set¬†Oracle ASM Administrator (OSASM) Group¬†to¬†dba
  • Set¬†Oracle ASM DBA (OSDBA for ASM) Group¬†to¬†dba
  • Set¬†Oracle ASM Operator (OSOPER for ASM) Group (Optional)¬†to¬†dba
  • Click¬†Next

12c_GridInfra_010.jpg

  • If this is okay for the environment being built, click¬†YES

12c_GridInfra_011.jpg

  • Ensure¬†Oracle base¬†is set to¬†/u01/app/oracle
  • Ensure¬†Software location¬†is set to¬†/u01/app/oracle/product/12.1.0/grid
  • The fields should already be populated with the above values.
  • They can be changed, but it is recommended to keep the defaults.
  • Click¬†Next

12c_GridInfra_012.jpg

  • Ensure¬†Inventory Directory¬†is set to¬†/u01/app/oraInventory
  • The field should already be populated with the value above.
  • The¬†Inventory Directory¬†can be changed, but it is recommended to keep the defaults.
  • Click¬†Finish

12c_GridInfra_013.jpg

  • In this environment the¬†root¬†password is known, so configuration scripts will be run automatically.
  • Tick¬†Automatically run configuration scripts
  • Select the radial button¬†Use "root" user credential
  • Ensure the¬†Password¬†is set
  • Click¬†Next

12c_GridInfra_014.jpg

  • Wait for the verification process to complete.
  • This screen will move on automatically.

12c_GridInfra_015.jpg

  • For demonstration purposes, this installation has some issues.
  • The¬†Fix & Check Again¬†button can be used to fix any issues.
  • Note that not all issues can be fixed and it may be necessary to refer the issues to a Unix Administrator
  • Click¬†Check Again¬†when all issues have been resolved.

12c_GridInfra_016.jpg

  • Review this screen and click¬†Install
  • At this point a¬†Response File¬†can be saved by clicking¬†Save Response File‚Ķ
  • A response file can be used for automated deployments.

12c_GridInfra_017.jpg

  • Wait for the installation to complete.
  • This screen will move on automatically.

12c_GridInfra_018.jpg

  • Click¬†Close

Example Database Binary Install

12c_DBInstall_001.jpg

  • Un-tick the¬†I wish to receive security updates via My Oracle Support¬†box.
    • NB¬†This is site specific and should be reviewed.
  • Click¬†Next.

12c_DBInstall_002.jpg

  • Click¬†Yes¬†to remain uninformed.

12c_DBInstall_003.jpg

  • Select¬†Install database software only
  • Click¬†Next.

12c_DBInstall_004.jpg

  • Ensure¬†Single instance database installation¬†is selected.
  • Click¬†Next.

12c_DBInstall_005.jpg

  • Select the languages you require. In this instance all languages have been chosen.
  • Click¬†Next

12c_DBInstall_006.jpg

  • Set¬†Database edition¬†to¬†Enterprise Edition (6.4GB)
  • Click¬†Next

12c_DBInstall_007.jpg

  • Ensure¬†Oracle base¬†is set to¬†/u01/app/oracle
  • Ensure¬†Software location¬†is set to¬†/u01/app/oracle/product/12.1.0/dbhome_1
  • The fields should already be populated with the above values.
  • They can be changed, but it is recommended to keep the defaults.
  • Click¬†Next

12c_DBInstall_008.jpg

  • In this installation different OS groups will be used. Optional groups will be left blank.
  • This may not be suitable for all environments.
  • Set¬†Database Administrator (OSDBA) Group¬†to¬†dba
  • Leave¬†Database Operator (OSOPER) Group (Optional)¬†blank.
  • Set¬†Database Backup and Recovery (OSBACKUPDBA) Group¬†to¬†bckpdba
  • Set¬†Data Guard administrative (OSDGDBA) Group¬†to¬†dgdba
  • Set¬†Encryption Key Management administrative (OSKMDBA) Group¬†to¬†kmdba
  • Click¬†Next

12c_DBInstall_009.jpg

  • Wait for the verification process to complete.
  • This screen moves on automatically when complete.

12c_DBInstall_010.jpg

  • For demonstration purposes, this installation has some issues.
  • The¬†Fix & Check Again¬†button can be used to fix any issues.
  • Note that not all issues can be fixed and it may be necessary to refer the issues to a Unix Administrator
  • Click¬†Check Again¬†when all issues have been resolved.

12c_DBInstall_011.jpg

  • Review this screen and click¬†Install
  • At this point a¬†Response File¬†can be saved by clicking¬†Save Response File‚Ķ
  • A response file can be used for automated deployments.

12c_DBInstall_012.jpg

  • Wait for the installation process to complete.
  • This screen will move on automatically.

12c_DBInstall_013.jpg

  • Get a UNIX administrator to run the¬†Configuration Scripts¬†as the¬†root¬†user.
  • Click¬†OK¬†when the¬†Configuration Scripts¬†have completed successfully.

12c_DBInstall_014.jpg

  • Click¬†Close

Example Database Creation

12c_Create_001.jpg

  • Select¬†Create Database
  • Click¬†Next.

12c_Create_002.jpg

  • Select¬†Advanced Mode.
  • Click¬†Next.

12c_Create_003.jpg

  • Select¬†General Purpose or Transaction Processing.
  • Click¬†Next.

12c_Create_004.jpg

  • Set¬†Global Database Name¬†to¬†MYDB001.MYDOMAIN.COM
  • Ensure¬†SID¬†has been populated with¬†MYDB001
  • Click¬†Next.

12c_Create_005.jpg

  • For this installation no Grid Agent is going to be configured.
  • Click¬†Next

12c_Create_006.jpg

Set and confirm the passwords for the SYS and SYSTEM user.
Click Next


12c_Create_007.jpg

  • For this database, the¬†GRID¬†listener will be used. This may not be suitable for all environments.
  • Tick the box alongside¬†LISTENER
  • Click¬†Next

12c_Create_008.jpg

  • Ensure¬†Database files Storage Type¬†is set to¬†Automatic Storage Management (ASM)
  • Select¬†Use Common Location for All Database Files
  • Set¬†File Location¬†to¬†+DATA01
  • Tick¬†Use Oracle-Managed Files
  • Ensure¬†Recovery files Storage Type¬†is set to¬†Automatic Storage Management (ASM)
  • Tick¬†Specify Fast Recovery Area
  • Set¬†Fast Recovery Area¬†to¬†+FRA01
  • Set the¬†Fast Recovery Area Size¬†to a suitable value
  • Tick¬†Enable Archiving
  • Click¬†Multiplex Redo Logs and Control Files‚Ķ

12c_Create_009.jpg

  • Set¬†Location 1¬†to¬†+REDO01
  • Set¬†Location 2¬†to¬†+REDO02
  • Click¬†OK

12c_Create_010.jpg

  • Click¬†Next

12c_Create_011.jpg

  • In this installation¬†Sample Schemas¬†and¬†Database Vault & Label Security¬†will be left as default.
  • Click¬†Next.

12c_Create_012.jpg

  • For this installation¬†Automatic Shared Memory Management¬†will be used.
  • Set¬†SGA Size¬†and¬†PGA Size¬†to suitable values.
  • Click the¬†Sizing¬†tab.

12c_Create_013.jpg

  • Set the¬†Processes¬†value to a suitable number for the environment.
  • Click the¬†Character Sets¬†tab.

12c_Create_014a.jpg

  • These settings are dependent on the environment being built.
  • Select¬†Use Unicode (AL32UTF8)¬†- Most systems would use this value.
  • Set¬†National Character Set¬†to¬†UTF8 - Unicode 3.0 UTF-8 Universal character set, CESU-8 compliant¬†- Most systems would use this value.
  • Set a¬†Default Language
  • Set a¬†Default Territory
  • Click the¬†Connection Mode¬†tab.

12c_Create_015.jpg

  • Select¬†Dedicated Server Mode
  • Click¬†All Initialization Parameters...

12c_Create_016.jpg

  • Click¬†Show Advanced Parameters

12c_Create_017.jpg

  • Set the¬†Initialization Parameters¬†appropriately.
  • In this installation the following parameters have been set in the DBCA GUI
  • control_files¬†have been set to use¬†+DATA01¬†and¬†+FRA01
  • db_create_online_log_dest_1¬†has be set to use¬†+REDO01
  • db_create_online_log_dest_2¬†has be set to use¬†+REDO02
  • Click¬†Close

12c_Create_018.jpg

  • Click¬†Next.

12c_Create_019.jpg

  • Click¬†Customize Storage Locations‚Ķ

12c_Create_019b.jpg

  • Add additional¬†REDO¬†logs if required.
  • Click¬†Ok

12c_Create_019c.jpg

  • Tick¬†Create Database
  • If required at this point, a¬†Database Template¬†can be created by ticking¬†Save as Database Template
  • Set a¬†Name¬†for the¬†Database Template¬†if the¬†Save as Database Template¬†box has been ticked.
  • The database creation scripts can be created by ticking¬†Generate Database Creation Scripts
  • Click¬†Next

12c_Create_020.jpg

  • Review the summary page
  • Click¬†Finish

12c_Create_021.jpg

  • This screen will move on automatically.

12c_Create_022.jpg

  • Set-up the passwords by clicking on¬†Password Management¬†if required.
  • Click¬†Close.

Other References

  • None Currently

Known Issues

  • None Currently

Deinstalling Oracle 12g Binaries and Database

With 12.1 the deinstallation tool is located in the Oracle home directory after installation.

Step-by-Step

1. Run this tool from ORACLE_HOME first.

  • cd $ORACLE_HOME/deinstall
  • ./deinstall
  • When prompted for the database name enter the¬†SID¬†you want to remove.
    • NB¬†This will remove the database binaries too.
  • When asked¬†Do you still want to modify the details of SID database(s)? [n]:Answer¬†N
    • NB¬†You would answer¬†Y¬†if you wanted to amend the database configuration.
  • The tool should now complete okay after performing several tasks.

2. Now run the tool from the GRID_HOME.


Category Database

TweetTweet Share on LinkedInShare on LinkedIn Share on Google+Google+ Submit to RedditReddit Publish on WordPress WordPress Send emailSend email