The following are notes on setting up the Oracle 11gR2 server software on the Linux platform for use with LeasePak. Contact your NetSol representative for more information.
Oracle 11gR2 Database Server =========================================================================================================== Contents =========================================================================================================== [A] Terminology [B] Software platforms and system topologies [C] Oracle Server software installation [D] Oracle Client software installation [E] Profile configuration [F] Listener configuration [G] Oracle Database creation [H] Net Service Name configuration [I] Initialization parameters [J] Automated maintenance configuration [K] Instance startup and shutdown [L] Tablespaces [M] Database files [N] Raid architecture [O] Log files [P] Optimizer statistics [Q] Oracle password expiration =========================================================================================================== [A] Terminology =========================================================================================================== 1. Oracle database An Oracle database (ODB) is a physical database. It is the set of physical files -- datafiles, control files, redo log files, etc. -- which together constitute an Oracle database. 2. Oracle schema An Oracle schema is a collection of database objects, such as tables, views, indexes, and stored procedures. A schema is owned by a database user and has the same name as that user. An Oracle database contains multiple schemas, one for each user in the database. 3. LeasePak database A LeasePak database (LLDB) is a logical database. It is a collection of LeasePak tables, views, indexes, stored procedures, and other objects. A LeasePak database is implemented as a schema within an Oracle database. An Oracle database can contain multiple LeasePak databases. An Oracle schema can contain a maximum of one LeasePak database. Not every Oracle schema contains a LeasePak database. When an Oracle schema does contain a LeasePak database, the LeasePak database name is the same as the Oracle schema name. 4. LeasePak database owner Each LeasePak database has a database owner (DBO). The DBO is the Oracle user who owns the Oracle schema that contains the LeasePak database. The DBO name is always the same as both the LeasePak database name and the Oracle schema name. 5. Oracle instance An Oracle instance is the set of operating system processes and shared memory segments that operate on an Oracle database. A new instance is created each time Oracle is started, and the instance is destroyed when Oracle is shutdown. The Oracle database name and instance name are usually the same. 6. Oracle tablespace An Oracle tablespace is a logical storage area within an Oracle database. There are multiple tablespaces in an Oracle database. A tablespace is physically implemented as a set of Oracle datafiles. There are three types of tablespaces: permanent, temporary, and undo. A permanent tablespace stores table and index data. A temporary tablespace stores temporary data (for sorts, intermediate results, etc). An undo tablespace stores undo data. When a table or index is created, it is assigned to a specific permanent tablespace. The data for the table or index is subsequently stored in that tablespace. The data for all of the tables and indexes of a LeasePak database is typically stored in a single tablespace. 7. Oracle software owner The Oracle software owner is the Unix user account which installs, owns, maintains, and upgrades the Oracle software. The Oracle software owner is usually named 'oracle'. 8. Oracle Recovery Manager Oracle Recovery Manager (RMAN) is a software tool for backing up and recovering an Oracle database. RMAN can be accessed through Enterprise Manager or the RMAN command-line client. 9. Fast recovery area The fast recovery area (also called the recovery area) is an optional disk location where Oracle stores files related to backup and recovery, such as archived redo log files and RMAN backups. Oracle Database and RMAN manage the files in the recovery area automatically. =========================================================================================================== [B] Software platforms and system topologies =========================================================================================================== ------------------------------------------------------- 1. Required operating system and DBMS software products ------------------------------------------------------- (a) Operating System software (64-bit): Red Hat Enterprise Linux 5.4 Server (AMD64/Intel EM64T) (b) Oracle server software (64-bit): Oracle Database 11g Release 2 for Linux x86_64 (c) Oracle client software (32-bit): Oracle Database 11g Release 2 Client for Linux x86 -------------------- 2. System topologies -------------------- The LeasePak and DBMS software can be deployed on either of two system topologies: (a) Unified System (b) Split System Terminology: Host : a computer on the network RHEL : Red Hat Enterprise Linux 5 64-bit operating system DBMS : Oracle 11gR2 Database Management System Oracle server : total of the Oracle 64-bit server software, physical database, and running instance Oracle client : the Oracle 32-bit client software LeasePak server : the LeasePak 32-bit server software Unified System : a system configured with the LeasePak server, Oracle server, and Oracle client on a single host Split System : a system configured with the LeasePak server and Oracle client on one host, and the Oracle server on a separate host Application Host : host which contains the LeasePak server and Oracle client DBMS Host : host which contains the Oracle server Combined Host : host which contains the LeasePak server, Oracle client, and Oracle server On a Unified System, the Application Host and DBMS Host are the same computer (the Combined Host). On a Split System, the Application Host and DBMS Host are separate computers. Unified System: +===========================================+ | Combined Host | |===========================================| | | | RHEL operating system (64-bit) | | | | +-------------------------------------+ | | | Oracle Instance | | | +-------------------------------------+ | | | | +-------------------------------------+ | | | Oracle Physical Database | | | +-------------------------------------+ | | | | +-------------------------------------+ | | | Oracle server software (64-bit) | | | +-------------------------------------+ | | | | +-------------------------------------+ | | | Oracle client software (32-bit) | | | +-------------------------------------+ | | | | +-------------------------------------+ | | | LeasePak server software (32-bit) | | | +-------------------------------------+ | | | +===========================================+ Split System: +===========================================+ +=========================================+ | Application Host | | DBMS Host | |===========================================| |=========================================| | | network | | | RHEL operating system (64-bit) |---------| RHEL operating system (64-bit) | | | | | | +-------------------------------------+ | | +-----------------------------------+ | | | Oracle client software (32-bit) | | | | Oracle Instance | | | +-------------------------------------+ | | +-----------------------------------+ | | | | | | +-------------------------------------+ | | +-----------------------------------+ | | | LeasePak server software (32-bit) | | | | Oracle Physical Database | | | +-------------------------------------+ | | +-----------------------------------+ | | | | | +===========================================+ | +-----------------------------------+ | | | Oracle server software (64-bit) | | | +-----------------------------------+ | | | +=========================================+ Documentation note: Within this document, a host is usually referred to as either an Application Host or a DBMS Host. For a Unified System, unqualified references to the Application Host or DBMS Host actually mean mean the Combined Host. Example of an unqualified reference: "Login to the Application Host as the Oracle software owner." If you have a Unified System, interpret the above statement as: "Login to the Combined Host as the Oracle software owner." Example of a qualified reference: "Pre-installation tasks to perform as root on the Application Host of a Split System" The phrase "Application Host of a Split System" refers only to the Application Host of a Split System; it does not also apply to the Combined Host of a Unified System. =========================================================================================================== [C] Oracle Server software installation =========================================================================================================== Oracle provides both 32-bit and 64-bit versions of the Oracle Server 11gR2 software. LeasePak requires the 64-bit version of the Oracle Server 11gR2 software. The actual name of the Oracle Server 11gR2 64-bit software to download and install is: Oracle Database 11g Release 2 for Linux x86_64 Installation of the Oracle Server 11gR2 software on RHEL is documented in these Oracle manuals: - Oracle Database Installation Guide 11g Release 2 (11.2) for Linux - Oracle Database Release Notes 11g Release 2 (11.2) for Linux - Oracle Universal Installer and OPatch User's Guide 11g Release 2 (11.2) for Windows and UNIX Below is a description of the Oracle Server 11gR2 software pre-installation, installation, and post-installation tasks. For further details, see the aforementioned Oracle manuals. -------------------------------------------- 1. Pre-installation tasks to perform as root -------------------------------------------- (a) Login to the DBMS Host as the 'root' user. (b) Verify that the required versions of the operating system, kernel, and packages are installed. During installation, the Oracle Universal Installer will perform checks to verify that the system meets the listed requirements. To ensure that these checks pass, verify the requirements before you start Oracle Universal Installer. 1. Operating System requirements: Red Hat Enterprise Linux 5.4 Server (AMD64/Intel EM64T) 64-bit 2. Kernel requirements: The required version of the Linux kernel is 2.6.18 or later. To display the version of the currently installed Linux kernel, enter at the Unix prompt: # uname -r The following sample output of the "uname -r" command: 2.6.18-164.2.1.el5 shows a kernel version of 2.6.18 and an errata level of 164.2.1.el5. 3. Package requirements: Verify that the required packages listed in the following manual are installed: Oracle Database Installation Guide 11g Release 2 (11.2) for Linux To determine whether a required package is installed and to display the version of the installed package, enter at the Unix prompt: # yum list installed '<package-name-prefix>*' (c) Configure os kernel parameters. Edit the /etc/sysctl.conf file, add definitions for the kernel parameters listed in this section, and reboot the computer. The values of following kernel parameters are the minimums required by Oracle. Do not decrease the values if they are already larger than these minimums. kernel.sem = 250 32000 100 128 kernel.shmall = 2097152 kernel.shmmax = 2147483648 net.core.rmem_default = 4194304 net.core.rmem_max = 16777216 net.core.wmem_default = 524288 net.core.wmem_max = 16777216 net.ipv4.ip_local_port_range = 9000 65500 fs.file-max = 6815744 fs.aio-max-nr = 1048576 Set the following kernel parameters to the exact values listed below: vm.overcommit_memory = 2 net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_sack = 1 (d) Create os groups 'orainv' and 'oradba'. Enter these commands at the Unix prompt to create the groups: # groupadd orainv # groupadd oradba (e) Create a Unix user account for the Oracle software owner. The account name is typically 'oracle'. Give the Oracle software owner a primary group of 'orainv' and a secondary group of 'oradba'. Make 'bash' the login shell of the account. Enter this command at the Unix prompt to create an account named 'oracle' with a home directory of /home/oracle, the requisite groups, and the default login shell: # useradd -c "Oracle software owner" -n -m -b /home -g orainv -G oradba oracle The default login shell is determined by the value of SHELL in the /etc/default/useradd file. If SHELL is set to /bin/bash in /etc/default/useradd, the login shell of the Oracle software owner will automatically be set to bash. If SHELL is not set to /bin/bash in /etc/default/useradd, add the '-s <bash-shell-path>' option to the above useradd command. (f) Set shell limits for the Oracle software owner. 1. Add these lines to the /etc/security/limits.conf file: oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 2. Add this line (if it does not already exist) to the /etc/pam.d/login file: session required pam_limits.so (g) Create directories for the Oracle 11gR2 software, database, and recovery files. The software files will be stored under /opt/oracle/11, the database files under /opt/oracle/oradata, and the recovery files under /opt/oracle/recovery_area. Create the following directories with the listed ownership and permissions. ------------------------- ------------- --------------------- ----------- ----------- ---------- directory description owner group owner permissions mountpoint ------------------------- ------------- --------------------- ----------- ----------- ---------- /opt/oracle oracle top Oracle software owner orainv 0775 optional /opt/oracle/11 ORACLE_BASE Oracle software owner orainv 0775 no /opt/oracle/oradata oradata top Oracle software owner orainv 0775 yes /opt/oracle/recovery_area recovery area Oracle software owner orainv 0775 yes ---------------------------------------------------------------------------------------------------------- (h) Specify the 'noatime' attribute in /etc/fstab for most filesystems, including /opt/oracle/oradata, /opt/oracle/recovery_area, /, /tmp, /usr, /var, /home, /opt, /opt/nst, etc. ----------------------------------------------------------------- 2. Pre-installation tasks to perform as the Oracle software owner ----------------------------------------------------------------- (a) Login to the DBMS Host as the Oracle software owner. (b) Add these commands to the Oracle software owner's .bash_profile file: umask 022 export LANG=C export LC_ALL=C export ORACLE_BASE=/opt/oracle/11 export NLS_LANG=American_America.<client-character-set> ulimit -u 16384 -n 65536 NLS_LANG declares the language, territory, and character set of an Oracle client process. If the Oracle database character set is WE8ISO8859P1, WE8ISO8859P15, or US7ASCII, specify the same character set in the Oracle software owner's NLS_LANG. If the Oracle database character set is AL32UTF8, specify WE8ISO8859P15 as the character set in the Oracle software owner's NLS_LANG. ----------------------------- ---------------------------------------------- Oracle database character set NLS_LANG ----------------------------- ---------------------------------------------- WE8ISO8859P1 export NLS_LANG=American_America.WE8ISO8859P1 WE8ISO8859P15 export NLS_LANG=American_America.WE8ISO8859P15 US7ASCII export NLS_LANG=American_America.US7ASCII AL32UTF8 export NLS_LANG=American_America.WE8ISO8859P15 -------------------------------------------------------------------------------- (c) At this stage of the software installation process, the Oracle software owner's .bash_profile file should NOT be setting the following environment variables: ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH (to add $ORACLE_HOME/lib) PATH (to add $ORACLE_HOME/bin) (d) Logout from the DBMS Host and log back in as the Oracle software owner. ------------------------------------------------------------- 3. Installation tasks to perform as the Oracle software owner ------------------------------------------------------------- (a) Login to the DBMS Host as the Oracle software owner. (b) Run the Oracle Universal Installer (OUI) to install the Oracle Server 11gR2 64-bit software. The OUI displays the installation screens as a series of steps, described below. The actual step numbers may be different from those listed here. 1. Configure Security Updates: Email: <enter your email address to be informed of security issues> I wish to receive security updates via My Oracle Support: <check to receive security updates> 2. Select Installation Option: Select "Install database software only". 3. Node Selection: Select "Single instance database installation". 4. Select Product Languages: Select "English". 5. Select Database Edition: Select "Enterprise Edition". Press the "Select Options..." button. The "Choose Components" window will be displayed. On this window you can choose the extra database components to install. Each of the components requires a separately purchased license from Oracle. LeasePak does not require any of the components. Take one of the following actions: a) Press the "De-Select All" button and then press the OK button. This will install none of the components. b) Select the components for which you have purchased a separate license from Oracle. This will install only the selected components. 6. Specify Installation Location: Oracle Base : /opt/oracle/11 Software Location : take the default, typically /opt/oracle/11/product/11.2.0/dbhome_1 7. Create Inventory: Inventory Directory : take the default, typically /opt/oracle/oraInventory oraInventory Group Name : orainv The Create Inventory screen is displayed only if this is the first installation of Oracle software on the host. 8. Privileged Operating System Groups: Database Administrator (OSDBA) Group : oradba Database Operator (OSOPER) Group : oradba 9. Perform Prerequisite Checks: OUI performs several checks to ensure that your computer fulfills the basic hardware and software requirements for an Oracle Database installation. If your computer does not meet a requirement, an error message is displayed. Review the displayed error messages and manually resolve the issues causing the error messages. 10. Summary: Review the summary of the pending software installation. Press the Finish button to start the installation. 11. Install Product: The progress of the installation is displayed on the screen. When the "Execute Configuration scripts" window opens, follow the on-screen instructions to execute the listed configuration scripts as the 'root' Unix user. 12. Finish: A message is displayed indicating that the installation of Oracle Database 11gR2 was successful. ------------------------------------------------------------------ 4. Post-installation tasks to perform as the Oracle software owner ------------------------------------------------------------------ (a) Login to the DBMS Host as the Oracle software owner. (b) Add these commands to the Oracle software owner's .bash_profile file: export ORACLE_HOME=/opt/oracle/11/product/11.2.0/dbhome_1 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib (c) Logout from the DBMS Host and log back in as the Oracle software owner. (d) Make a backup copy of the root.sh script by entering this command at the Unix prompt: % cp $ORACLE_HOME/root.sh $ORACLE_HOME/root.sh.YYYYMMDD substituting the current date for YYYYMMDD. (e) Download and install required Oracle patches from the My Oracle Support website. =========================================================================================================== [D] Oracle Client software installation =========================================================================================================== Oracle provides both 32-bit and 64-bit versions of the Oracle Client 11gR2 software. LeasePak requires the 32-bit version of the Oracle Client 11gR2 software. The actual name of the Oracle Client 11gR2 32-bit software to download and install is: Oracle Database 11g Release 2 Client for Linux x86 Installation of the Oracle Client 11gR2 software on RHEL is documented in these Oracle manuals: - Oracle Database Client Installation Guide 11g Release 2 (11.2) for Linux - Oracle Database Release Notes 11g Release 2 (11.2) for Linux - Oracle Universal Installer and OPatch User's Guide 11g Release 2 (11.2) for Windows and UNIX Below is a description of the Oracle Client 11gR2 software pre-installation, installation, and post-installation tasks. For further details, see the aforementioned Oracle manuals. -------------------------------------------------------------------------------------- 1. Pre-installation tasks to perform as root on the Application Host of a Split System -------------------------------------------------------------------------------------- The following "pre-installation tasks to perform as root" apply only to Split Systems; they should not be done on a Unified System, as they were already completed earlier during the installation of the Oracle Server software. (a) Login to the Application Host of the Split System as the 'root' user. (b) Verify that the required versions of the operating system, kernel, and packages are installed. During installation, the Oracle Universal Installer will perform checks to verify that the system meets the listed requirements. To ensure that these checks pass, verify the requirements before you start Oracle Universal Installer. 1. Operating System requirements: Red Hat Enterprise Linux 5.4 Server (AMD64/Intel EM64T) 64-bit 2. Kernel requirements: The required version of the Linux kernel is 2.6.18 or later. To display the version of the currently installed Linux kernel, enter at the Unix prompt: # uname -r The following sample output of the "uname -r" command: 2.6.18-164.2.1.el5 shows a kernel version of 2.6.18 and an errata level of 164.2.1.el5. 3. Package requirements: Verify that the required packages listed in the following manual are installed: Oracle Database Client Installation Guide 11g Release 2 (11.2) for Linux To determine whether a required package is installed and to display the version of the installed package, enter at the Unix prompt: # yum list installed '<package-name-prefix>*' (c) Configure os kernel parameters. Edit the /etc/sysctl.conf file, add definitions for the kernel parameters listed in this section, and reboot the computer. The values of following kernel parameters are the minimums required by Oracle. Do not decrease the values if they are already larger than these minimums. kernel.sem = 250 32000 100 128 kernel.shmall = 2097152 kernel.shmmax = 2147483648 net.core.rmem_default = 4194304 net.core.rmem_max = 16777216 net.core.wmem_default = 524288 net.core.wmem_max = 16777216 net.ipv4.ip_local_port_range = 9000 65500 fs.file-max = 6815744 fs.aio-max-nr = 1048576 Set the following kernel parameters to the exact values listed below: vm.overcommit_memory = 2 net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_sack = 1 (d) Create os group 'orainv'. Enter this command at the Unix prompt to create the group: # groupadd orainv (e) Create a Unix user account for the Oracle software owner. The account name is typically 'oracle'. Give the Oracle software owner a primary group of 'orainv'. Make 'bash' the login shell of the account. Enter this command at the Unix prompt to create an account named 'oracle' with a home directory of /home/oracle, the requisite group, and the default login shell: # useradd -c "Oracle software owner" -n -m -b /home -g orainv oracle The default login shell is determined by the value of SHELL in the /etc/default/useradd file. If SHELL is set to /bin/bash in /etc/default/useradd, the login shell of the Oracle software owner will automatically be set to bash. If SHELL is not set to /bin/bash in /etc/default/useradd, add the '-s <bash-shell-path>' option to the above useradd command. (f) Create directories for the Oracle Client 11gR2 software. Create the following directories with the listed ownership and permissions. ------------------------- ------------- --------------------- ----------- ----------- ---------- directory description owner group owner permissions mountpoint ------------------------- ------------- --------------------- ----------- ----------- ---------- /opt/oracle oracle top Oracle software owner orainv 0775 optional /opt/oracle/11 ORACLE_BASE Oracle software owner orainv 0775 no ---------------------------------------------------------------------------------------------------------- (g) Specify the 'noatime' attribute in /etc/fstab for most filesystems, including /opt, /, /tmp, /usr, /var, /home, /opt/nst, etc. ----------------------------------------------------------------- 2. Pre-installation tasks to perform as the Oracle software owner ----------------------------------------------------------------- (a) On a Unified System: 1) Login to the Application Host as the Oracle software owner. 2) Edit the Oracle software owner's .bash_profile file. If any of the following environment variables are currently defined by .bash_profile: ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH then use the '#' character to comment out the definitions. Using ORACLE_HOME as an example, change this line in the .bash_profile file: export ORACLE_HOME=/opt/oracle/11/product/11.2.0/dbhome_1 to: # export ORACLE_HOME=/opt/oracle/11/product/11.2.0/dbhome_1 Do the same for the other environment variables listed above. 3) Logout from the Application Host and log back in as the Oracle software owner. 4) At this stage of the software installation process, the Oracle software owner's .bash_profile file should NOT be setting the following environment variables: ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH (to add $ORACLE_HOME/lib) PATH (to add $ORACLE_HOME/bin) (b) On a Split System: 1) Login to the Application Host as the Oracle software owner. 2) Add these commands to the Oracle software owner's .bash_profile file: umask 022 export LANG=C export LC_ALL=C export ORACLE_BASE=/opt/oracle/11 export NLS_LANG=American_America.<client-character-set> NLS_LANG declares the language, territory, and character set of an Oracle client process. If the Oracle database character set is WE8ISO8859P1, WE8ISO8859P15, or US7ASCII, specify the same character set in the Oracle software owner's NLS_LANG. If the Oracle database character set is AL32UTF8, specify WE8ISO8859P15 as the character set in the Oracle software owner's NLS_LANG. ----------------------------- ---------------------------------------------- Oracle database character set NLS_LANG ----------------------------- ---------------------------------------------- WE8ISO8859P1 export NLS_LANG=American_America.WE8ISO8859P1 WE8ISO8859P15 export NLS_LANG=American_America.WE8ISO8859P15 US7ASCII export NLS_LANG=American_America.US7ASCII AL32UTF8 export NLS_LANG=American_America.WE8ISO8859P15 -------------------------------------------------------------------------------- 3) Logout from the Application Host and log back in as the Oracle software owner. 4) At this stage of the software installation process, the Oracle software owner's .bash_profile file should NOT be setting the following environment variables: ORACLE_HOME LD_LIBRARY_PATH (to add $ORACLE_HOME/lib) PATH (to add $ORACLE_HOME/bin) ------------------------------------------------------------- 3. Installation tasks to perform as the Oracle software owner ------------------------------------------------------------- (a) Login to the Application Host as the Oracle software owner. (b) Run the Oracle Universal Installer (OUI) to install the Oracle Client 11gR2 32-bit software. The OUI prompts and recommended responses are: 1. What type of installation do you want: Select "Administrator". 2. Select the languages in which your product will run: Select "English". 3. Oracle Base: Take the default, typically: /opt/oracle/11 4. Software Location: Take the default, typically: /opt/oracle/11/product/11.2.0/client_1 5. Inventory Directory: Take the default, typically: /opt/oracle/oraInventory The "Inventory Directory" prompt is displayed only if this is the first installation of Oracle software on the host. 6. oraInventory Group Name: Select "orainv". The "oraInventory Group Name" prompt is displayed only if this is the first installation of Oracle software on the host. 7. Press the Finish button to start the installation. 8. The progress of the installation is displayed on the screen. If an "Oracle Net Configuration Assistant failed" error occurs, ignore the error and press the Skip button to continue with the installation. 9. When the "Execute Configuration scripts" window opens, follow the on-screen instructions to execute the listed configuration scripts as the 'root' Unix user. ------------------------------------------------------------------ 4. Post-installation tasks to perform as the Oracle software owner ------------------------------------------------------------------ (a) On a Unified System: 1) Login to the Application Host as the Oracle software owner. 2) Edit the Oracle software owner's .bash_profile file. If the definitions of any of the following environment variables were commented out while performing the pre-installation tasks: ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH then re-enable the definitions by removing the '#' character. Using ORACLE_HOME as an example, change this line in the .bash_profile file: # export ORACLE_HOME=/opt/oracle/11/product/11.2.0/dbhome_1 to: export ORACLE_HOME=/opt/oracle/11/product/11.2.0/dbhome_1 Do the same for the other environment variables listed above. 3) Point ORACLE_HOME to the Oracle Client home by changing this line: export ORACLE_HOME=/opt/oracle/11/product/11.2.0/dbhome_1 to: export ORACLE_HOME=/opt/oracle/11/product/11.2.0/client_1 4) Logout from the Application Host and log back in as the Oracle software owner. 5) Make a backup copy of the root.sh script by entering this command at the Unix prompt: % cp $ORACLE_HOME/root.sh $ORACLE_HOME/root.sh.YYYYMMDD substituting the current date for YYYYMMDD. 6) Download and install required Oracle patches to the Oracle Client software from the My Oracle Support website. 7) Edit the Oracle software owner's .bash_profile file and point ORACLE_HOME to the Oracle server by changing this line: export ORACLE_HOME=/opt/oracle/11/product/11.2.0/client_1 to: export ORACLE_HOME=/opt/oracle/11/product/11.2.0/dbhome_1 8) Logout from the Application Host and log back in as the Oracle software owner. (b) On a Split System: 1) Login to the Application Host as the Oracle software owner. 2) Add these commands to the Oracle software owner's .bash_profile file: export ORACLE_HOME=/opt/oracle/11/product/11.2.0/client_1 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib 3) Logout from the Application Host and log back in as the Oracle software owner. 4) Make a backup copy of the root.sh script by entering this command at the Unix prompt: % cp $ORACLE_HOME/root.sh $ORACLE_HOME/root.sh.YYYYMMDD substituting the current date for YYYYMMDD. 5) Download and install required Oracle patches to the Oracle Client software from the My Oracle Support website. =========================================================================================================== [E] Profile configuration =========================================================================================================== The Oracle Profile network configuration data is stored in the $ORACLE_HOME/network/admin/sqlnet.ora file. Oracle Net Manager is one of several GUIs that can be used to edit and maintain the Profile configuration data in sqlnet.ora. ------------------------ 1. Configure the Profile ------------------------ (a) Login to the DBMS Host as the Oracle software owner. (b) Run the Oracle Net Manager GUI by entering 'netmgr' at the Unix prompt. (c) Navigate to Oracle Net Configuration->Local->Profile. (d) Select "Naming" from the drop-down list and enter these values: Methods tab: Available Methods : EZCONNECT, HOSTNAME, LDAP, NIS Selected Methods : TNSNAMES Default Domain : <blank> (e) Do not select "General" or "Oracle Advanced Security" from the drop-down list. (f) From the File menu, select Save Network Configuration. (g) Exit Oracle Net Manager. (h) On a Split System, login to the Application Host as the Oracle software owner and repeat steps (b) through (g). ----------------------------------- 2. Verify the Profile configuration ----------------------------------- (a) Login to the DBMS Host as the Oracle software owner. (b) Display the contents of the sqlnet.ora file by entering at the Unix prompt: % cat $ORACLE_HOME/network/admin/sqlnet.ora (c) Verify that the output of the above command is similar to: # sqlnet.ora Network Configuration File: /opt/oracle/11/product/11.2.0/dbhome_1/network/admin/sqlnet.ora # Generated by Oracle configuration tools. NAMES.DIRECTORY_PATH= (TNSNAMES) ADR_BASE = /opt/oracle/11 (d) On a Split System, login to the Application Host as the Oracle software owner and repeat steps (b) and (c). =========================================================================================================== [F] Listener configuration =========================================================================================================== The Oracle listener configuration data is stored in the $ORACLE_HOME/network/admin/listener.ora file. Oracle Net Manager is one of several GUIs that can be used to edit and maintain the listener configuration data in listener.ora. ------------------------- 1. Configure the listener ------------------------- (a) Login to the DBMS Host as the Oracle software owner. (b) Run the Oracle Net Manager GUI by entering 'netmgr' at the Unix prompt. (c) Navigate to Oracle Net Configuration->Local->Listeners. (d) From the Edit menu, select Create. (e) Enter LISTENER as the listener name. (f) Navigate to Oracle Net Configuration->Local->Listeners->LISTENER. (g) Select "Listening Locations" from the drop-down list. (h) Press the "Add Address" button. On the Address1 tab: 1) Enter the network address: Protocol : TCP/IP Host : <hostname> Port : 1521 For <hostname>, enter one of: the host name, the host domain name, or the host IP address. Do not specify 'localhost' as the <hostname>. 2) Do not press the "Show Advanced" button. 3) Uncheck "Statically dedicate this address for jServer connections". (i) Do not select "General Parameters", "Database Services", or "Other Services" from the drop-down list. (j) From the File menu, select Save Network Configuration. (k) Exit Oracle Net Manager. (l) Logout from the DBMS Host and log back in as the 'root' user. (m) Modify the /etc/services file with a text editor: 1) Find the position in the file corresponding to port 1521. 2) Comment out or delete any entries for port 1521. 3) Add these new entries for port 1521: oracle_listener 1521/tcp # Oracle Net listener oracle_listener 1521/udp # Oracle Net listener ------------------------------------ 2. Verify the listener configuration ------------------------------------ (a) Login to the DBMS Host as the Oracle software owner. (b) Display the contents of the listener.ora file by entering at the Unix prompt: % cat $ORACLE_HOME/network/admin/listener.ora (c) Verify that the output of the above command is similar to: # listener.ora Network Configuration File: /opt/oracle/11/product/11.2.0/dbhome_1/network/admin/listener.ora # Generated by Oracle configuration tools. LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname>)(PORT = 1521)) ) ADR_BASE_LISTENER = /opt/oracle/11 --------------------- 3. Start the listener --------------------- (a) Login to the DBMS Host as the Oracle software owner. (b) Start the listener by entering at the Unix prompt: % lsnrctl start =========================================================================================================== [G] Oracle Database creation =========================================================================================================== The Oracle Database Configuration Assistant (DBCA) is used to to create an Oracle database and configure database options in an existing database. In general, do not create more than one Oracle database on a single computer, especially for production systems. Multiple Oracle databases on a computer would compete with each other for system resources, decreasing overall performance. Before creating the Oracle database, design your physical database: - filesystems - mount points - raid architecture - tablespace names - database file names - database file sizes - distribution of database files - etc. Sections L [Tablespaces], M [Database files], and N [Raid architecture] of this document provide guidelines for some aspects of physical database design. Those sections and section I [Initialization parameters] should be read before proceeding with the creation of the Oracle database. ----------------------------------------------------- Instructions for creating an Oracle database wih DBCA ----------------------------------------------------- (a) Login to the DBMS Host as the Oracle software owner. (b) Determine if the Oracle listener is running by entering at the Unix prompt: % lsnrctl status If the listener is not running, start the listener by entering at the Unix prompt: % lsnrctl start (c) Run the DBCA GUI by entering at the Unix prompt: % dbca (d) DBCA divides the task of creating an Oracle database into 11 steps: 1. Operations: Select "Create a Database". 2. Database Templates: Select "Custom Database". 3. Database Identification: Global Database Name : <ODB-name.domain-name> SID (Oracle System Identifier) : <ODB-name> 4. Management Options: Enterprise Manager tab: (a) Check "Configure Enterprise Manager". (b) Select "Configure Database Control for local management". (c) Optionally check "Enable Alert Notifications". This can be left unchecked and later enabled after the database has been created. (d) Optionally check "Enable Daily Disk Backup to Recovery Area". This can be left unchecked and later enabled after the database has been created. Automatic Maintenance Tasks tab: (a) Uncheck "Enable automatic maintenance tasks". 5. Database Credentials: Specify passwords for the Oracle administrative accounts. 6. Database File Locations: Storage Type : File System Storage Locations : select "Use Common Location for All Database Files". Database Files Location : /opt/oracle/oradata Press the "File Location Variables..." button to display the "File Location Variables" window. Verify that DB_NAME and SID are set to the value you entered earlier for the SID in Step 3, and that ORACLE_BASE and ORACLE_HOME are set correctly. If ORACLE_BASE or ORACLE_HOME are incorrect: (a) Cancel the DBCA session. (b) Modify the Oracle software owner's .bash_profile file to set ORACLE_BASE and ORACLE_HOME. (c) Logout from the DBMS Host and log back in as the Oracle software owner. (d) Run DBCA to create the Oracle database. 7. Recovery Configuration: Specify Flash Recovery Area : (check) Fast Recovery Area : /opt/oracle/recovery_area Fast Recovery Area Size : <recovery area size> Enable Archiving : (see Archiving Instructions below) For guidelines on setting the size of the recovery area, refer to the Oracle Database 11gR2 Backup and Recovery User's Guide. ---------------------- Archiving Instructions ---------------------- If "Enable Archiving" is checked, the Oracle database runs in ARCHIVELOG mode. If it is not checked, the Oracle database runs in NOARCHIVELOG mode. In NOARCHIVELOG mode: - Archiving of the online redo log files is disabled. - The Oracle database is protected from instance failure but not disk failure. - Online backups cannot be performed. In ARCHIVELOG mode: - Archiving of the online redo log files is enabled. - The Oracle database is protected from both instance failure and disk failure. - Online backups can be performed. - The archived redo log files are written to the recovery area. If the Oracle database is intended for production data, it must be run in ARCHIVELOG mode to prevent data loss in the event of disk failure. If you do not select the "Enable Archiving" option now, you can still enable ARCHIVELOG mode later, after the database has been created. 8. Database Content: Database Components tab: (a) Check "Enterprise Manager Repository" and select SYSAUX as its tablespace. (b) Uncheck the other components (Oracle Text, Spatial, etc). LeasePak does not require any of those components. (c) Press the "Standard Database Components..." button. (d) On the Standard Database Components window: 1) Check "Oracle JVM" and select SYSTEM as its tablespace. 2) Check "Oracle XML DB" and select SYSAUX as its tablespace. 3) Check "Oracle Multimedia" and select SYSAUX as its tablespace. 4) Check "Oracle Application Express" and select SYSAUX as its tablespace. 5) Press the "Customize..." button 6) On the Customize Oracle XML DB window: a) Select "Disable XML DB Protocols". b) Select "Use default values" for "Configure port numbers". c) Click OK. Custom Scripts tab: Select "No scripts to run". 9. Initialization Parameters: Memory tab: Select "Custom". Memory Management : Manual Shared Memory Management Shared Pool : 300 M Bytes Buffer Cache : <size> M Bytes Java Pool : 50 M Bytes Large Pool : 50 M Bytes PGA Size : 400 M Bytes Each of the above Oracle memory components has a corresponding initialization parameter which determines its size. When you enter the size of a component on the Memory tab, Oracle sets the initialization parameter of that component to the entered size. See section I [Initialization parameters] of this document for guidelines on sizing the Oracle memory components. The Shared Pool size is set to 300 megabytes on the Memory tab. This is an initial value only. After the database has been created, the SHARED_POOL_SIZE initialization parameter should be set again according to the formula in section I [Initialization parameters]. The PGA Size (which corresponds to the PGA_AGGREGATE_TARGET initialization parameter) is set to 400 megabytes on the Memory tab. This is a placeholder value only. The default should be taken for the PGA_AGGREGATE_TARGET initialization parameter, but the PGA Size prompt on the Memory tab does not provide an option for taking the default. Instructions later in this section regarding the All Initialization Parameters window describe how to take the default for the PGA_AGGREGATE_TARGET initialization parameter. ************************************************************ * LeasePak requires Manual Shared Memory Management. * * Do not use Automatic Shared Memory Management. * ************************************************************ Sizing tab: Block Size : 8192 bytes Processes : <maximum-number-of-processes> ************************************************************************ * The Oracle block size of 8192 bytes is a LeasePak requirement. * ************************************************************************ When you enter the maximum number of processes on the Sizing tab, Oracle sets the PROCESSES initialization parameter to the entered number. For guidelines on setting the maximum number of processes, refer to section I [Initialization parameters] of this document. Character Sets tab: Database Character Set: Select "Choose from the list of character sets". Uncheck "Show recommended character sets only". Database Character Set: select one of WE8ISO8859P1, WE8ISO8859P15, US7ASCII, AL32UTF8 National Character Set : AL16UTF16 Default Language : American Default Territory : United States ********************************************************************************************************** * Oracle does not recommend the use of WE8ISO8859P1 or US7ASCII as the database character set. * * They may be desupported in a future release of the Oracle software. * ********************************************************************************************************** * For the optimum performance of LeasePak software, do not choose AL32UTF8 as the database character * * set. LeasePak will run slower when AL32UTF8 is the database character set due to the runtime * * conversion of characters. * ********************************************************************************************************** * LeasePak software can process only 7-bit ASCII characters; it cannot process 8-bit characters * * or multi-byte characters. If the Oracle database character set is WE8ISO8859P1, WE8ISO8859P15, * * or AL32UTF8, do not enter single-byte characters that use the 8th bit or multi-byte characters * * into LeasePak tables. * ********************************************************************************************************** Connection Mode tab: Select "Dedicated Server Mode". **************************************************************************** * LeasePak requires Oracle dedicated server connections. * * Oracle shared server connections should not be used with LeasePak. * **************************************************************************** All Initialization Parameters window: Proceed with the All Initialization Parameters window only after you are done entering data into the Memory, Sizing, Character Sets, and Connection Mode tabs. If you enter or change data on those tabs after processing the All Initialization Parameters window, re-process the All Initialization Parameters window. Press the "All Initialization Parameters..." button to display the All Initialization Parameters window. On the All Initialization Parameters window: (a) Press the "Show Advanced Parameters" button. (b) For the initialization parameters that are not explicitly listed in section I [Initialization parameters] of this document, uncheck "Override Default". (c) For the initialization parameters that are listed in section I: 1) Check "Override Default". 2) Set the value of the initialization parameter according to the guidelines in section I. Note that DBCA may have automatically set some of the initialization parameters using values entered on earlier DBCA screens. (d) Ensure that "Override Default" is unchecked for the PGA_AGGREGATE_TARGET initialization parameter. (e) Press the Close button. 10. Database Storage: (a) Controlfile ----------- General tab: Controlfile Mirror Images: File Name File Directory ------------- ------------------------------------------- control01.ctl /opt/oracle/oradata/{DB_UNIQUE_NAME}/ control02.ctl /opt/oracle/recovery_area/{DB_UNIQUE_NAME}/ Options tab: Maximum Datafiles : 100 Maximum Redo Log Files : 16 maximum Log Members : 3 (b) Redo Log Groups --------------- Group # : 1 File Size : 512 M Bytes (In the drop-down list, change "K Bytes" to "M Bytes".) Redo Log Members : ------------- ------------------------------------- File Name File Directory ------------- ------------------------------------- redo01.log /opt/oracle/oradata/{DB_UNIQUE_NAME}/ Group # : 2 File Size : 512 M Bytes (In the drop-down list, change "K Bytes" to "M Bytes".) Redo Log Members : ------------- ------------------------------------- File Name File Directory ------------- ------------------------------------- redo02.log /opt/oracle/oradata/{DB_UNIQUE_NAME}/ Group # : 3 File Size : 512 M Bytes (In the drop-down list, change "K Bytes" to "M Bytes".) Redo Log Members : ------------- ------------------------------------- File Name File Directory ------------- ------------------------------------- redo03.log /opt/oracle/oradata/{DB_UNIQUE_NAME}/ Group # : 4 File Size : 512 M Bytes (In the drop-down list, change "K Bytes" to "M Bytes".) Redo Log Members : ------------- ------------------------------------- File Name File Directory ------------- ------------------------------------- redo04.log /opt/oracle/oradata/{DB_UNIQUE_NAME}/ (c) Datafiles --------- (1) /opt/oracle/oradata/{DB_UNIQUE_NAME}/sysaux01.dbf General tab: Name : /opt/oracle/oradata/{DB_NAME}/sysaux01.dbf Tablespace : SYSAUX Status : Online File Size : 4096 M Bytes Storage tab: Uncheck "Automatically extend datafile when full (AUTOEXTEND)". (2) /opt/oracle/oradata/{DB_UNIQUE_NAME}/system01.dbf General tab: Name : /opt/oracle/oradata/{DB_UNIQUE_NAME}/system01.dbf Tablespace : SYSTEM Status : Online File Size : 4096 M Bytes Storage tab: Uncheck "Automatically extend datafile when full (AUTOEXTEND)". (3) /opt/oracle/oradata/{DB_UNIQUE_NAME}/temp01.dbf General tab: Name : /opt/oracle/oradata/{DB_UNIQUE_NAME}/temp01.dbf Tablespace : TEMP Status : Online File Size : 4096 M Bytes Storage tab: Uncheck "Automatically extend datafile when full (AUTOEXTEND)". (4) /opt/oracle/oradata/{DB_UNIQUE_NAME}/undotbs01.dbf General tab: Name : /opt/oracle/oradata/{DB_UNIQUE_NAME}/undotbs01.dbf Tablespace : UNDOTBS1 (this name will be changed later to UNDOTBS) Status : Online File Size : 4096 M Bytes Storage tab: Uncheck "Automatically extend datafile when full (AUTOEXTEND)". (5) /opt/oracle/oradata/{DB_UNIQUE_NAME}/users01.dbf General tab: Name : /opt/oracle/oradata/{DB_UNIQUE_NAME}/users01.dbf Tablespace : USERS Status : Online File Size : 25 M Bytes Storage tab: Uncheck "Automatically extend datafile when full (AUTOEXTEND)". (d) Tablespaces ----------- (1) SYSAUX General tab: Name : SYSAUX (Uncheck "Use bigfile tablespace") File Name : sysaux01.dbf File Directory : /opt/oracle/oradata/{DB_UNIQUE_NAME}/ File Size : 4096 MB Status : Online (Uncheck "Read only") Type : Permanent Storage tab: Extent Management : Locally managed Allocation : Automatic Allocation Segment Space Management : Automatic Enable logging : Yes Block Size : Default Bytes (2) SYSTEM General tab: Name : SYSTEM (Uncheck "Use bigfile tablespace") File Name : system01.dbf File Directory : /opt/oracle/oradata/{DB_UNIQUE_NAME}/ File Size : 4096 MB Status : Online (Uncheck "Read only") Type : Permanent Storage tab: Extent Management : Locally managed Allocation : Automatic Allocation Segment Space Management : Automatic Enable logging : Yes Block Size : Default Bytes (3) TEMP General tab: Name : TEMP (Uncheck "Use bigfile tablespace") File Name : temp01.dbf File Directory : /opt/oracle/oradata/{DB_UNIQUE_NAME}/ File Size : 4096 MB Type : Temporary (Check "Set as Default Temporary Tablespace") Storage tab: Extent Management : Locally managed Allocation : Automatic Allocation Block Size : Default Bytes (4) UNDOTBS1 (This tablespace name will be changed on the General tab from UNDOTBS1 to UNDOTBS) General tab: Name : UNDOTBS (Change the tablespace name from UNDOTBS1 to UNDOTBS) File Name : undotbs01.dbf File Directory : /opt/oracle/oradata/{DB_UNIQUE_NAME}/ File Size : 4096 MB Status : Online Type : Undo Storage tab: Block Size : Default Bytes (5) USERS General tab: Name : USERS (Uncheck "Use bigfile tablespace") File Name : users01.dbf File Directory : /opt/oracle/oradata/{DB_UNIQUE_NAME}/ File Size : 25 MB Status : Online (Uncheck "Read only") Type : Permanent Storage tab: Extent Management : Locally managed Allocation : Automatic Allocation Segment Space Management : Automatic Enable logging : Yes Block Size : Default Bytes 11. Creation Options: (a) Check "Create Database". (b) Uncheck "Save as a Database Template". (c) Uncheck "Generate Database Creation Scripts". (d) Press the Finish button. (e) Review the Create Database Summary in the Confirmation window. (f) Press the OK button to begin the creation of the database. (g) When the database creation has completed, make note of the information displayed in the final window, such as the URL for the Oracle Enterprise Manager Database Control console. (e) After DBCA is done creating the Oracle database, review these logs for messages and errors: ---------------------- ---------------------------------------------------------------- log description location ---------------------- ---------------------------------------------------------------- database creation logs $ORACLE_BASE/cfgtoollogs/dbca/<ODB-name> alert log $ORACLE_BASE/diag/rdbms/<ODB-name>/<instance-name>/alert/log.xml ----------------------------------------------------------------------------------------- (f) Define the ORACLE_SID environment variable in the Oracle software owner's .bash_profile file: 1. Login to the DBMS Host as the Oracle software owner. 2. Add this command to the Oracle software owner's .bash_profile file: export ORACLE_SID=<ODB-name> 3. Logout from the DBMS Host and log back in as the Oracle software owner. Note: Do not define the TWO_TASK environment variable in the Oracle software owner's .bash_profile file on the DBMS Host. Instead, define ORACLE_SID as described above. Connecting to Oracle with TWO_TASK requires the Oracle listener to be running, whereas connecting with ORACLE_SID can be done even if the listener is not running. The Oracle software owner on the DBMS Host must be able to connect to Oracle whether or not the listener is running. Therefore, TWO_TASK should not be used by the Oracle software owner on the DBMS Host. TWO_TASK may be used by the Oracle software owner on the Application Host of a Split Server. =========================================================================================================== [H] Net Service Name configuration =========================================================================================================== The configuration data for Net Service Names is stored in the $ORACLE_HOME/network/admin/tnsnames.ora file. Oracle Net Manager is one of several GUIs that can be used to edit and maintain the Net Service Name configuration data in tnsnames.ora. Note: During the creation of the Oracle database, DBCA may have automatically added the Oracle database name as a Net Service Name to the tnsnames.ora file on the DBMS Host. --------------------------------- 1. Configure the Net Service Name --------------------------------- (a) Login to the DBMS Host as the Oracle software owner. (b) Run the Oracle Net Manager GUI by entering 'netmgr' at the Unix prompt. (c) Navigate to Oracle Net Configuration->Local->Service Naming. (d) From the menu, select Edit->Create. (e) Enter these values at the Net Service Name Wizard prompts: Net Service Name : <Net Service Name> Protocol : TCP/IP Host Name : <hostname> Port Number : 1521 Service Name : <ODB-name>.<domain-name> Connection Type : Dedicated Server (f) From the menu, select File->Save Network Configuration. (g) Exit Oracle Net Manager. (h) On a Split System, login to the Application Host as the Oracle software owner and repeat steps (b) through (g). -------------------------------------------- 2. Verify the Net Service Name configuration -------------------------------------------- (a) Login to the DBMS Host as the Oracle software owner. (b) Display the contents of the tnsnames.ora file by entering at the Unix prompt: % cat $ORACLE_HOME/network/admin/tnsnames.ora (c) The output of the above command should be similar to: # tnsnames.ora Network Configuration File: /opt/oracle/11/product/11.2.0/dbhome_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. <net-service-name> = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname>)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = <ODB-name>.<domain-name>) ) ) (d) Verify that the PROTOCOL is TCP, the PORT is 1521, the SERVER is DEDICATED, and the HOST and SERVICE_NAME are correct. The (SERVER = DEDICATED) portion of the Net Service Name entry instructs Oracle to use a dedicated server for the client connection. ******************************************************************** * LeasePak requires Oracle dedicated server connections. * * Do not use Oracle shared server connections with LeasePak. * ******************************************************************** (e) On a Split System, login to the Application Host as the Oracle software owner and repeat steps (b) through (d). =========================================================================================================== [I] Initialization parameters =========================================================================================================== There are over 250 Oracle initialization parameters. If an initialization parameter is not listed in this section, generally take the Oracle default value for the parameter. ----------------------------------------------------------------- 1. These initialization parameter values are required by LeasePak ----------------------------------------------------------------- DB_BLOCK_SIZE = 8192 OPEN_CURSORS = 1600 (minimum) SGA_TARGET = 0 MEMORY_TARGET = 0 FILESYSTEMIO_OPTIONS = SETALL Set OPEN_CURSORS to a minimum value of 1600. There is no added overhead if OPEN_CURSORS is set to a value higher than actually needed. *************************************************************************************************** * SGA_TARGET and MEMORY_TARGET must be set to 0, because LeasePak requires Manual Shared * * Memory Management. By setting SGA_TARGET and MEMORY_TARGET to 0, Automatic Shared Memory * * Management is disabled and Manual Shared Memory Management is enabled. * *************************************************************************************************** ------------------------------------------------------------------------- 2. These initialization parameter values are recommended but not required ------------------------------------------------------------------------- AUDIT_TRAIL = NONE DB_CACHE_ADVICE = OFF RECYCLEBIN = OFF OPTIMIZER_INDEX_CACHING = 90 OPTIMIZER_INDEX_COST_ADJ = 25 Setting AUDIT_TRAIL to NONE and DB_CACHE_ADVICE to OFF will improve system performance. Whenever you need to gather cache statistics, temporarily set DB_CACHE_ADVICE to ON, and then set it to OFF after the statistics have been gathered. Setting OPTIMIZER_INDEX_CACHING and OPTIMIZER_INDEX_COST_ADJ is recommended only for LeasePak v62a. For LeasePak v63a and later versions, do not set OPTIMIZER_INDEX_CACHING and OPTIMIZER_INDEX_COST_ADJ. ----------------------------------------------------------------------------- 3. Set these initialization parameters to values customized for your database ----------------------------------------------------------------------------- DB_NAME = <ODB name> DB_DOMAIN = <ODB domain> UNDO_TABLESPACE = <undo tablespace name> CONTROL_FILES = <paths of control files> DIAGNOSTIC_DEST = <path of diagnostic destination> DB_RECOVERY_FILE_DEST = <path of recovery area> DB_RECOVERY_FILE_DEST_SIZE = <maximum size of recovery area> PROCESSES = <maximum number of Oracle operating system processes> DB_CACHE_SIZE = <size of buffer cache> SHARED_POOL_SIZE = <size of shared pool> LARGE_POOL_SIZE = <size of large pool> JAVA_POOL_SIZE = <size of java pool> Guidelines for setting the above initialization parameters: (a) DB_NAME The name of the Oracle database. Up to 8 characters in length. The name should be the same as the Oracle System Identifier (SID) entered during step 3 of DBCA. Example: 'lpak' (b) DB_DOMAIN The domain of the Oracle database. The domain should be the same as the domain portion of the Global Database Name entered during step 3 of DBCA. (c) UNDO_TABLESPACE The name of the undo tablespace as specified in step 10 of DBCA. Typical value: 'UNDOTBS' (d) CONTROL_FILES Paths of multiplexed control files. Typical value: '/opt/oracle/oradata/<ODB-name>/control01.ctl','/opt/oracle/recovery_area/<ODB-name>/control02.ctl' (e) DIAGNOSTIC_DEST The path of the diagnostic destination directory. It should generally be the same as the path of ORACLE_BASE. Typical value: '/opt/oracle/11' (f) DB_RECOVERY_FILE_DEST The path of the recovery area directory. Typical value: '/opt/oracle/recovery_area' (g) DB_RECOVERY_FILE_DEST_SIZE The maximum size of the recovery area. For guidelines on setting the maximum size of the recovery area, refer to the Oracle Database 11gR2 Backup and Recovery User's Guide. (h) PROCESSES The maximum number of Oracle operating system processes. Set PROCESSES to the larger of: (1) 200 (2) The maximum number of concurrent Oracle connections plus the approximate number of Oracle background processes. A rough estimate of the number of Oracle background processes is 25. If you are unsure of the maximum number of concurrent Oracle connections, set PROCESSES to an initial value of 200 and adjust it later. Do not oversize the PROCESSES initialization parameter. (i) DB_CACHE_SIZE The size of the buffer cache. Proper sizing of the buffer cache greatly improves database performance. The buffer cache size should be large enough to keep the amount of physical I/O (disk access) to a minimum. There is a point of diminishing returns with the DB_CACHE_SIZE parameter regarding its effect on performance and physical I/O, so don't oversize it. (j) SHARED_POOL_SIZE The size of the shared pool. 1) While creating the Oracle database with DBCA, set the shared pool size to a temporary initial value of 300 megabytes. 2) Finish creating the database with DBCA. Start the instance. 3) Determine the 'startup overhead size'. The startup overhead size varies based on the values of several other initialization parameters. Therefore, wait until the other initialization parameters (PROCESSES, DB_CACHE_SIZE, etc) have been set to their appropriate values before determining the startup overhead size. To display the startup overhead size in megabytes: a) Login to the DBMS Host as the Oracle software owner. b) Enter 'sqlplus / as sysdba' at the Unix prompt. c) Enter this query at the sqlplus prompt: SQL> select round(bytes/1024/1024) as "startup overhead size in MB" from v$sgainfo where name = 'Startup overhead in Shared Pool'; d) The number displayed by the query is the startup overhead size in megabytes. 4) Calculate the shared pool size with the following formula: shared pool size in megabytes = 200 megabytes + (startup overhead size in megabytes) 5) Set the SHARED_POOL_SIZE initialization parameter to the calculated value: a) Login to the DBMS Host as the Oracle software owner. b) Enter 'sqlplus / as sysdba' at the Unix prompt. c) Enter this command at the sqlplus prompt: SQL> alter system set SHARED_POOL_SIZE = <shared-pool-size-in-megabytes>M scope = spfile; d) Bounce (shutdown and startup) the Oracle instance. 6) Setting the SHARED_POOL_SIZE in step 5 has probably changed the startup overhead size. Therefore, repeat steps 3 through 5 and set the SHARED_POOL_SIZE again. Continue repeating steps 3 through 5 until the startup overhead size stabilizes. 7) Throughout the lifetime of the Oracle database, the SHARED_POOL_SIZE initialization parameter may require readjustment when other initialization parameters are changed, because modifying initialization parameters could increase or decrease the startup overhead size. So after changing the values of initialization parameters, re-check the startup overhead size. If the startup overhead has changed, recalculate the shared pool size with the formula and set the SHARED_POOL_SIZE initialization parameter to the new value. (k) LARGE_POOL_SIZE The size of the large pool. Recommended value: 50M (l) JAVA_POOL_SIZE The size of the java pool. Recommended value: 50M ------------------------------------------------- 3. How to set and reset initialization parameters ------------------------------------------------- Initialization parameters with explicitly-set values are stored in the server parameter file (SPFILE). The default path of the SPFILE is $ORACLE_HOME/dbs/spfile<ODB-name>.ora. Although the SPFILE appears to be a text file, it is actually a binary file and should not be modified with a text editor. Modifying the SPFILE with a text editor will corrupt it. During database creation, DBCA automatically creates an SPFILE in the default location. After database creation, you can use the 'alter system set' command to change the value of an initialization parameter, and the 'alter system reset' command to reset a parameter back to its default value. For instructions on running the 'alter system set' and 'alter system reset' commands, refer to these Oracle manuals: - Oracle Database Administrator's Guide 11g Release 2 (11.2) - Oracle Database SQL Language Reference 11g Release 2 (11.2) The 'alter system set' command has a scope clause which lets you specify when the change takes effect. The scope can be one of the following: (a) SPFILE - The change is made to the SPFILE but not to the running instance. The new setting takes effect when the database is next shut down and started up again. (b) MEMORY - The change is made to the running instance but not to the SPFILE. The new setting takes effect immediately and persists only until the database is shut down. (c) BOTH - The change is made to the SPFILE and to the running instance. The new setting takes effect immediately and persists after the database is shut down and started up again. Some initialization parameters allow only SPFILE as the scope. The 'alter system reset' command immediately removes a parameter from the SPFILE, effectively resetting the parameter to its default value. However, the runtime value of the parameter won't be reset until the next restart of the Oracle database. ----------------------------------------------- 4. Verify the initialization parameter settings ----------------------------------------------- After the Oracle database has been created, verify the initialization parameter settings: (a) Login to the DBMS Host as the Oracle software owner. (b) Display the contents of the SPFILE by entering at the Unix prompt: % strings $ORACLE_HOME/dbs/spfile<ODB-name>.ora (c) Verify that all of the initialization parameters listed in this section [section I] are present in the SPFILE and have the correct values. If any of the initialization parameters listed in this section are not present in the SPFILE, run the 'alter system set' command to add the initialization parameter to the SPFILE. If any of the initialization parameters listed in this section have an incorrect value in the SPFILE, run the 'alter system set' command to set the initialization parameter to the correct value. (d) Verify that the SPFILE contains only the initialization parameters listed in this section. If the SPFILE contains any initialization parameters that are not listed in this section, remove them from the SPFILE by running the 'alter system reset' command. =========================================================================================================== [J] Automated maintenance configuration =========================================================================================================== ---------------------------------------------- 1. Introduction to automated maintenance tasks ---------------------------------------------- Automated maintenance tasks are tasks that are started by Oracle automatically at regular intervals to perform maintenance operations on the database. Automated maintenance tasks run in maintenance windows, which are predefined time intervals scheduled by the user to occur during a period of low system load. Initially there is a separate maintenance window for each day of the week. By default, all automated maintenance tasks are scheduled to run in all maintenance windows. You can customize the start time and duration of maintenance windows, disable certain windows or tasks from running, and create new maintenance windows. There are three automated maintenance tasks in Oracle 11gR2: - Automatic Optimizer Statistics Collection - Automatic SQL Tuning Advisor - Automatic Segment Advisor ------------------------------------------ 2. Disable the automated maintenance tasks ------------------------------------------ After the Oracle physical database has been created, Netsol recommends that the user disable the three automated maintenance tasks listed above. Later, the Automatic Segment Advisor automated maintenance task can optionally be re-enabled. To disable the automated maintenance tasks: (a) Login to the DBMS Host as the Oracle software owner. (b) Enter 'sqlplus / as sysdba' at the Unix prompt. (c) Enter this PL/SQL block at the sqlplus prompt: SQL> BEGIN dbms_auto_task_admin.disable; dbms_auto_task_admin.disable (client_name => 'auto optimizer stats collection', operation => NULL, window_name => NULL); dbms_auto_task_admin.disable (client_name => 'sql tuning advisor', operation => NULL, window_name => NULL); dbms_auto_task_admin.disable (client_name => 'auto space advisor', operation => NULL, window_name => NULL); END; / ---------------------------------------- 3. Automated maintenance task guidelines ---------------------------------------- (a) Automatic Optimizer Statistics Collection: Keep the Automatic Optimizer Statistics Collection automated maintenance task disabled. Use the Netsol-provided 'db_update_statistics' Unix script to gather optimizer statistics. (b) Automatic SQL Tuning Advisor: Keep the Automatic SQL Tuning Advisor automated maintenance task disabled. (c) Automatic Segment Advisor: The Automatic Segment Advisor identifies segments that have space available for reclamation, and makes recommendations on how to defragment those segments. You can also run the Segment Advisor manually to obtain more up-to-the-minute recommendations or to obtain recommendations on segments that the Automatic Segment Advisor did not examine for possible space reclamation. The Segment Advisor should be run periodically. It can be run either manually or as an automated maintenance task. If you choose to the run the Segment Advisor as an automated maintenance task, the Automatic Segment Advisor automated maintenance task can be enabled by: (1) Login to the DBMS Host as the Oracle software owner. (2) Enter 'sqlplus / as sysdba' at the Unix prompt. (3) Enter this PL/SQL block at the sqlplus prompt: SQL> BEGIN dbms_auto_task_admin.enable; dbms_auto_task_admin.enable (client_name => 'auto space advisor', operation => NULL, window_name => NULL); END; / Note: Before enabling the Automatic Segment Advisor automated maintenance task, the maintenance windows should be customized to prevent conflicts with critical LeasePak processing, such as End of Period. Customization of the maintenance windows is outside the scope of this manual. =========================================================================================================== [K] Instance startup and shutdown =========================================================================================================== The startup and shutdown instructions in this section apply only to Unified Systems. ----------------------------------------------------------------- 1. Automated startup/shutdown of the Oracle instance and listener ----------------------------------------------------------------- To automatically shutdown and startup the Oracle instance and listener on the DBMS Host whenever the operating system is booted: (a) While installing the LeasePak software, install the 'nst_dbora' Oracle init service. (b) Edit the /etc/netsol_dbms_instances file and add the Oracle instance name to the ORA_INSTANCES variable. A log of the Oracle startups and shutdowns is written to /var/tmp/ora_startup_shutdown.log. ------------------------------------------------------ 2. Manual shutdown of the Oracle instance and listener ------------------------------------------------------ If the 'nst_dbora' Oracle init service has been installed: (a) Login to the DBMS Host as the 'root' user. (b) Enter 'service nst_dbora stop' at the Unix prompt. ----------------------------------------------------- 3. Manual startup of the Oracle instance and listener ----------------------------------------------------- If the 'nst_dbora' Oracle init service has been installed: (a) Login to the DBMS Host as the 'root' user. (b) Enter 'service nst_dbora start' at the Unix prompt. =========================================================================================================== [L] Tablespaces =========================================================================================================== ----------------------------------------------- 1. How to create a tablespace for LeasePak data ----------------------------------------------- To create a tablespace for LeasePak data, run the 'db_create_tablespace' Unix script. The script creates a tablespace with one datafile and the tablespace attributes required by LeasePak. Additional datafiles can later be appended to the tablespace by running the 'db_add_datafile' Unix script. The datafiles created by the db_create_tablespace and db_add_datafile scripts do not have the autoextend attribute enabled. Autoextend is not recommended, because a runaway process could mistakenly increase the size of the datafiles. Autoextend also makes it more difficult to measure the actual amount of free space in a filesystem. To run the db_create_tablespace script: (a) Login to the Application Host as the LeasePak Database Administrator ($NSTDBA). (b) Run the db_create_tablespace script using this syntax: % db_create_tablespace <tablespace-name> <datafile-directory> <datafile-size> ------------------- ---------------------------------------------------------- Parameter Description ------------------- ---------------------------------------------------------- tablespace-name name of the tablespace to create datafile-directory directory on the DBMS Host in which to create the datafile datafile-size size of the datafile in gigabytes (G suffix) or megabytes (M suffix). Example: for a 4 gigabyte datafile, specify specify either 4G or 4096M --------------------------------------------------------------------------------- The path of the datafile created by db_create_tablespace is: <datafile-directory>/<tablespace-name>01.dbf -------------------------------------------------- 2. How to add a datafile to an existing tablespace -------------------------------------------------- To add a datafile to an existing tablespace, run the 'db_add_datafile' Unix script. The db_add_datafile script creates a new datafile and adds it to the specified tablespace. To run the db_add_datafile script: (a) Login to the Application Host as the LeasePak Database Administrator ($NSTDBA). (b) Run the db_add_datafile script using this syntax: % db_add_datafile <tablespace-name> <datafile-directory> <datafile-size> <datafile-sequence-number> ------------------------ ---------------------------------------------------------- Parameter Description ------------------------ ---------------------------------------------------------- tablespace-name tablespace to which the datafile will be added datafile-directory directory on the DBMS Host in which to create the datafile datafile-size size of the datafile in gigabytes (G suffix) or megabytes (M suffix). Example: for a 4 gigabyte datafile, specify either 4G or 4096M datafile-sequence-number two or three digit number (02 to 99 or 100 to 999) to include in the datafile name to make it unique -------------------------------------------------------------------------------------- The path of the datafile created by db_add_datafile is: <datafile-directory>/<tablespace-name><datafile-sequence-number>.dbf -------------------------------- 3. Tablespace naming conventions -------------------------------- (a) Recommended naming conventions for end user tablespaces: ---------------------- ------------------------ LeasePak database type tablespace name ---------------------- ------------------------ production lpt<suffix-of-LLDB-name> large test lpt<suffix-of-LLDB-name> small test lpcommon ---------------------------------------------------- <suffix-of-LLDB-name> refers to the characters after the 'lpr' prefix in the LeasePak database name. Each lpt* tablespace should be dedicated to a single LeasePak database. The lpcommon tablespace can be shared by multiple small test LeasePak databases. (b) Recommended naming conventions for Oracle system tablespaces: ---------------------- --------------- Oracle tablespace type tablespace name ---------------------- --------------- undo undotbs temporary temp ------------------------------------------- =========================================================================================================== [M] Database files =========================================================================================================== ---------------------------------------------- 1. Oracle directory heirarchy on the DBMS Host ---------------------------------------------- -------------------------------------- ------------------------ ---------- ---------- directory description created by mountpoint -------------------------------------- ------------------------ ---------- ---------- /opt/oracle oracle top user optional /opt/oracle/11 ORACLE_BASE user no /opt/oracle/11/product/11.2.0/dbhome_1 ORACLE_HOME Oracle no /opt/oracle/oraInventory Oracle inventory Oracle no /opt/oracle/recovery_area recovery area top user yes /opt/oracle/recovery_area/<ODB-name> recovery area for an ODB Oracle no /opt/oracle/oradata oradata top user yes /opt/oracle/oradata/<ODB-name> oradata for an ODB Oracle no ------------------------------------------------------------------------------------------- Note that ORACLE_BASE is /opt/oracle/11, not /opt/oracle. -------------------------------------------- 2. Database file types, names, and locations -------------------------------------------- An Oracle database contains several types of database files. The following table lists the types of database files along with their recommended file names and directories: ----------------------- ----------------------------------- ------------------------------------ database file type recommended file name recommended directory on DBMS Host ----------------------- ----------------------------------- ------------------------------------ control file #1 control01.ctl /opt/oracle/oradata/<ODB-name> control file #2 control02.ctl /opt/oracle/recovery_area/<ODB-name> datafiles <tablespace-name><nn>.dbf /opt/oracle/oradata/<ODB-name> tempfiles <temporary-tablespace-name><nn>.dbf /opt/oracle/oradata/<ODB-name> online redo log files redo<nn>.log /opt/oracle/oradata/<ODB-name> archived redo log files (automatically named by Oracle) /opt/oracle/recovery_area server parameter file spfile<ODB-name>.ora $ORACLE_HOME/dbs ---------------------------------------------------------------------------------------------------- where <nn> is a two-digit counter starting at 01 for each file type. Server parameter file: The server parameter file name and directory are defaulted by Oracle during database creation. Whenever the database is started, Oracle automatically looks in the default directory ($ORACLE_HOME/dbs) for an SPFILE with the default name (spfile<ODB-name>.ora). Archived redo log files: Oracle recommends that the recovery area be selected as the only archive destination for the archived redo log files. When the only archive destination for the archived redo log files is the recovery area, Oracle will automatically name the archived redo log files. ---------------------------- 3. Online redo log file size ---------------------------- The DBCA instructions in section G [Oracle Database creation] create an Oracle database with four online redo log files; each of the online redo log files has a size of 512 MB. If online redo log file switches occur more than once every 20 to 30 minutes during periods of heavy activity (such as End of Period), increase the size of the online redo log files. ------------------------------ 4. Datafile and tempfile sizes ------------------------------ (a) System datafiles and tempfiles The Oracle system datafiles and tempfiles are created when DBCA is run. The DBCA instructions in section G [Oracle Database creation] create an Oracle database with: - a 4 GB datafile in the SYSTEM tablespace - a 4 GB datafile in the SYSAUX tablespace - a 4 GB datafile in the UNDOTBS tablespace - a 4 GB tempfile in the TEMP tablespace A file size of 4 GB for the system datafiles and tempfiles was selected as a generic file size suitable for most databases. The 4 GB file size is recommended but not required. (b) End user datafiles The size of an end user datafile is specified as a parameter to Unix scripts db_create_tablespace and db_add_datafile. Those scripts are described in section L [Tablespaces]. The optimal size for end user datafiles depends on the projected size of the database. The datafile size should be large enough to limit the total number of datafiles to a manageable number. For a database of average size, a 4 GB size for end user datafiles is sufficient. For large databases, a datafile size larger than 4 GB may be warranted. ------------------- 5. Sparse tempfiles ------------------- Oracle creates tempfiles as sparse files. Sparse files are not fully allocated when they are created, and the Unix df (disk free) command does not show their full size. This can lead to overcommitting the resources of a filesystem, unless the full size of sparse files is manually accounted for when measuring the amount of free space in a filesystem. =========================================================================================================== [N] Raid architecture =========================================================================================================== ------------------- 1. Raid definitions ------------------- Raid 0 = striped disks Raid 1 = mirrored disks Raid 5 = striped disks with distributed parity Raid 01 = disks are striped first, then the stripes are mirrored Raid 10 = disks are mirrored first, then the mirrors are striped ------------------- 2. Raid comparisons ------------------- Raid 0 has no fault tolerance. Raid 10 provides a balanced mix of fault tolerance and performance. Raid 10 is faster and more fault tolerant than Raid 5. Raid 10 is more fault tolerant than Raid 01. ----------------------- 3. Raid recommendations ----------------------- (a) Use Raid 10. Do not use Raid 5 or Raid 01. (b) If Raid 10 is unavailable, it can be simulated by combining Raid 1 (mirroring) with LVM striping. (c) The stripe width is the number of disks in the disk array. Choose the stripe width appropriately to maximize performance. Make sure there are enough disk devices in the disk array to support the total IO's per second required, not just the number of GB to be stored. (d) The stripe size (also referred to as stripe granularity or chunk size) is the number of bytes in the stripes written to each disk. Generally set the stripe size to 64K. (e) When Raid is implemented on internal hard drives, use Software Raid instead of Hardware Raid. =========================================================================================================== [O] Log files =========================================================================================================== ------------ 1. Alert log ------------ The Oracle alert log is an XML file on the DBMS Host containing a chronological log of database messages and critical errors. For backwards compatibility, Oracle also maintains the alert log information in text (non-XML) format. Where to find the alert log: ------ ----------------------------------------------------------------------------- format path of the alert log on the DBMS Host ------ ----------------------------------------------------------------------------- XML $ORACLE_BASE/diag/rdbms/<ODB-name>/<instance-name>/alert/log.xml text $ORACLE_BASE/diag/rdbms/<ODB-name>/<instance-name>/trace/alert_<ODB-name>.log The alert log will grow in size over time. When the size of the alert log exceeds approximately 10 MB, Oracle copies the log.xml alert log file to a file named log_#.xml, where # is a sequential counter. Oracle then resets the size of log.xml to 0 bytes. The log.xml file is the active alert log to which Oracle writes new messages. The log_#.xml files are inactive copies of old log.xml files. To reclaim disk space, the log_#.xml files can be safely deleted with the Unix 'rm' command while the instance is running. Optionally make a copy of the log_#.xml files before deleting them. Do not delete the log.xml file. --------------- 2. Listener log --------------- The Oracle listener log is an XML file on the DBMS Host containing an audit trail of Oracle listener activity. For backwards compatibility, Oracle also maintains the listener log information in text (non-XML) format. Where to find the listener log: ------ ---------------------------------------------------------------- format path of the listener log on the DBMS Host ------ ---------------------------------------------------------------- XML $ORACLE_BASE/diag/tnslsnr/<hostname>/listener/alert/log.xml text $ORACLE_BASE/diag/tnslsnr/<hostname>/listener/trace/listener.log Since every Oracle connection request is written to the listener log, the listener log can grow quickly in size. When the size of the listener log exceeds approximately 10 MB, Oracle copies the log.xml listener log file to a file named log_#.xml, where # is a sequential counter. Oracle then resets the size of log.xml to 0 bytes. The log.xml file is the active listener log to which Oracle writes new data. The log_#.xml files are inactive copies of old log.xml files. To reclaim disk space, the log_#.xml files can be safely deleted with the Unix 'rm' command while the instance is running. Optionally make a copy of the log_#.xml files before deleting them. Do not delete the log.xml file. =========================================================================================================== [P] Optimizer statistics =========================================================================================================== Periodically run the 'db_update_statistics' Unix script to gather fresh optimizer statistics for LeasePak databases and the Oracle data dictionary. The db_update_statistics script gathers statistics that were selected and tuned for LeasePak databases. Do not use Oracle's Automatic Optimizer Statistics Collection automated maintenance task, as it gathers an undocumented set of statistics. -------------------------------------------- 1. Gather statistics for a LeasePak database -------------------------------------------- (a) Login to the Application Host as the LeasePak Database Administrator ($NSTDBA). (b) Run the db_update_statistics script with the -d option: % db_update_statistics -d <environment> --------------------------------------------------- 2. Gather statistics for the Oracle data dictionary --------------------------------------------------- (a) Login to the Application Host as the LeasePak Database Administrator ($NSTDBA). (b) Run the db_update_statistics script with the -o option: % db_update_statistics -o =========================================================================================================== [Q] Oracle password expiration =========================================================================================================== Oracle passwords expire in 180 days by default. You can optionally disable the expiration of Oracle passwords, either globally or for LeasePak users only. To disable Oracle password expiration globally (i.e., for all Oracle users that have the DEFAULT profile): 1. Login to the DBMS Host as the Oracle software owner. 2. Enter 'sqlplus / as sysdba' at the Unix prompt. 3. Modify the DEFAULT profile by entering at the sqlplus prompt: SQL> alter profile DEFAULT limit PASSWORD_LIFE_TIME unlimited; To disable Oracle password expiration only for LeasePak users: 1. Login to the DBMS Host as the Oracle software owner. 2. Enter 'sqlplus / as sysdba' at the Unix prompt. 3. Create an Oracle profile for LeasePak users by entering at the sqlplus prompt: SQL> create profile LEASEPAK limit PASSWORD_LIFE_TIME unlimited; 4. Assign the profile to each LeasePak user by entering at the sqlplus prompt: SQL> alter user <username> profile LEASEPAK;