473

First ensure that you installed the Oracle Software according the tutorial in http://www.ecuoug.org/?p=264. In this post I show you how to create an Oracle Database.

Listener Creation

When an instance starts, a listener process establishes a communication pathway to Oracle Database. When a user process makes a connection request, the listener determines whether it should use a shared server dispatcher process or a dedicated server process and establishes an appropriate connection.

In order to create a listener open a terminal in your linux box, logged in like oracle user, and call the Net Configuration Assistant with command netca.

I the next screens I will show you step by step the process to create a listener with the next information:

Listener Name: LISTENER

Protocol: TCP

Port: 1521

Continue with the wizard until the Finish button appears, then Click Finish.

Database Creation

After the listener creation I will continue with database creation. Open a terminal in your linux box, logged in like oracle user, and call the Database Configuration Assistant with command dbca.

In the next screen named Welcome click Next.

In the screen 1 of 14 named Operations select Create Database and click Next.

In the screen 2 of 14 named Database Templates select General Purpose and Transaction Processing template and click Next. This template contains a pre-created database, so the database could be created in minutes, as opposed to an hour or more. In case that you require to change some database characteristics like block size you should create a Custom Database because this attribute can’t be changed with templates.

In the screen 3 of 14 named Database Identification fill the text boxes with the Global Database Name and SID and click Next. In this example I will use the next information:

Global Database Name: eva.refundation.ec

SID eva

In the screen 4 of 14 named Management Options check the options:

Configure Enterprise Manager

Configure Database Control for local management

Then click Next. I won’t select the other options because these can be configured later.

In the screen 5 of 14 named Database Credentials select the option Use the Same Administrative Password for All Accounts and click Next. In this example I will use this option for easily remember the password but in productions environments we recommend choose a different password for each account:

In the screen 6 of 14 named Storage Options select the option File System and click Next. In this example I will use this option because I don’t the other options configured in my linux box, we recommend evaluate the use of Automatic Storage Management in production environments:

In the screen 7 of 14 named Database File Locations select the option Use Common Location for All Database Files, fill the text box with the desired location, in this case I will use the location $ORACLE_BASE/oradata for this example, and click Next. Don’t remember to evaluate if the other options are valid for your production environment.

In the screen 8 of 14 named Recovery Configuration check the option Specify Flash Recovery Area and click Next. I will use the next information:

Flash Recovery Area: {ORACLE_BASE}/flash_recovery_area

Flash Recovery Area Size: 2048 (MB)

I won’t check Enable Archiving option because I will configure this option later.

In the screen 9 of 14 named Database Content check the option Sample Schemas and click Next. I recommend not install the sample schemas in production environments:

In the screen 10 of 14 named Initialization Parameters you can configure: Memory, Sizing, Character Sets and Connection Model. In the next screens I will show you the options that I chose for this screen, in all cases I am using the default configuration that can be changed after the database is created. When you finished click Next.

In the screen 11 of 14 named Security Settings I will keep the settings by default and click Next.

In the screen 12 of 14 named Automatic Maintenance Tasks I will keep the settings by default and click Next.

In the screen 13 of 14 named Database Storage you can review the configuration of controlfiles, datafiles, and redo log files. When you finished click Next.

In the screen 14 of 14 named Creation Options check the option Create Database and click Finish.

A confirmation screen will be displayed and you can save this information like an HTML file. When you finished click OK.

If the database is created successfully a new screen will appear showing you the configuration information. When you finished click Exit.

How to Monitor Database from Enterprise Manager Dbconsole

In the next screen I will show you how to review the Enterprise Manager Console service.

While I was developing this post I noticed that the wizard has a bug in the graphical interfaces. There are only 14 screens in the wizard but the firsts screens show you like there are 15 screens .

Oracle says that the system must have at least 1GB of RAM and for the swap space you should use the next sizes:

If you physical memory is between 1 GB and 2 GB, swap should be 1.5 times the size of RAM.

If you physical memory is between 2 GB and 16 GB, swap should be equal to the size of RAM.

If you physical memory is more than 16 GB, swap should be 16 GB.

To check the size of physical memory, execute:

grep MemTotal /proc/meminfo

To check the size of swap space, execute:

grep SwapTotal /proc/meminfo

Software Requirements

The next screen show you the list of packages needed to install Oracle Database 11g Release 1. You can find this information in the official installation guide:

Please note that some packages are missing in the previous list. In the next images I show you the configuration of my Red Hat Linux box for your reference. To determine whether the required packages are installed I use a command similar to the following:

If a package is not installed, then install it from the Red Hat Linux cd’s or dvd’s, or if you purchased a Red Hat Suscription download the required package version from Red Hat Network in https://rhn.redhat.com.

If you noticed that some packages are not installed in your linux box use rpm -Uvh package_name command to install the packages.

Configure Name Resolution

Verify that the hosts file contains the fully qualified host name. You should have almost two lines in this file, one line with ip and localhost information and another line with your server ip and hostname information.

Creating Required Operating System Groups and Users

The following operating system groups and user are required if you are installing Oracle Database:

The OSDBA group (dba): You must create this group the first time you install Oracle Database software on the system. It identifies operating system user accounts that have database administrative privileges (the SYSDBA privilege).

The OSOPER group (oper): Create this group if you want a separate group of operating system users to have a limited set of database administrative privileges (the SYSOPER privilege). By default, members of the OSDBA group also have the SYSOPER privilege.

The OSASM group (asmadmin): This feature introduces a new SYSASM privilege that is specifically intended for performing Automatic Storage Management administration tasks. Using the SYSASM privilege instead of the SYSDBA privilege provides a clearer division of responsibility between Automatic Storage Management administration and database administration. Members of the OSASM group can connect as SYSASM using operating system authentication and have full access to Automatic Storage Management.

The Oracle Inventory group (oinstall): You must have a group whose members are given access to write to the Oracle Central Inventory (oraInventory).

The oracle user (oracle): The first time you install Oracle software on the system you must create the oracle user. This user owns all of the software installed during the installation. This user must have the Oracle Inventory group as its primary group. It must also have the OSDBA and OSOPER groups as secondary groups.

In the next images I show you how to create the Oracle user, the oinstall group and the dba group. Additionally I assigned the both groups to oracle user:

Identifying Required Software Directories

Create the Oracle base directory for Oracle software installations. In the next images I show you how to create a base directory and how to assign permissions in this directory to the Oracle user:

Verify that the kernel parameters are set to values greater than or equal to the minimum value needed by Oracle Software. If the current value for any parameter is higher than the value required, then do not change the value of that parameter. If you want that changes in kernel parameters persist when you restart your server, you should update the sysctl.conf file located in /etc folder:

In order to proceed with the installation you should authenticate in the server like oracle user, and then from the directory where the software was downloaded, open a terminal window and enter the following command:

$ /directory_path/runInstaller

Choose between the Basic and Advanced Installation Method. The first one is the default installation method and permits that you quickly install Oracle Database because this requires minimal user input. The second option lets you complete advanced tasks, for example: select a database character set or different product languages, create a database on a different file system from the software, configure Automatic Storage Management for database storage, specify different passwords for administrative schemas, configure automated backups or Oracle Enterprise Manager notification, etc. Click Next.

This screen is displayed only during the first installation of Oracle products on a system. Specify the full path of the Oracle Inventory directory. Click Next.

Choose between the different installation types: Oracle Standard Edition, Oracle Enterprise Edition, or Custom. The first one, installs an integrated set of management tools, full distribution, replication, Web features, and facilities for building business-critical applications. The second one, installs licensable Oracle Database options and database configuration and management tools in addition to all of the products that are installed during a Standard Edition installation. It also installs products most commonly used for data warehousing and transaction processing. The other one, enables you to select the individual components that you want to install from the list of all available components. Click Next.

Enter the Oracle home name and directory path in which you want to install Oracle components. The directory path should not contain spaces. Click Next.

The screen checks that the system meets the minimum requirements for the installation. Correct any errors that Oracle Universal Installer may have found, and then click Next.

Select one of the following options: Create a database, Configure Automatic Storage Management or Install database software only. The first one lets you create a database. The second one lets you create an Automatic Storage Management instance only. The other one lets you install the database software only. This option does not create a database or configure Automatic Storage Management. Click Next.

In this screen you should specify the operating system groups that you created previously to the installation. Click Next.

Review the information displayed in the screen. Click Next.

This screen displays status information while the product is being installed.

Before to accept this screen, you should read the instructions and run the scripts orainstRoot.sh and root.sh like root user in a separate terminal.

Review the information displayed in the screen. Click Exit.

Configure the environment variables in order to use the Oracle Software, in order to do that you should edit the .bash_profile file located in the $HOME of oracle user.

1

/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib/libstdc++.so.6)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib/libstdc++.so.6)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib/libstdc++.so.6)