Archive

Archive for the ‘Oracle’ Category

Install Oracle Database 10.2.0 on Red Hat Enterprise Linux 5.7

## Memory Configuration

RAM Swap Space
Up to 512 MB 2 times the size of RAM
Between 1024 MB and 2048 MB 1.5 times the size of RAM
Between 2049 MB and 8192 MB Equal to the size of RAM
More than 8192 MB 0.75 times the size of RAM

## RAM and Swap
———————————————————–
RAM | Swap Space
———————————————————–
Up to 512 MB | 2 times the size of RAM
Between 1024 MB and 2048 MB | 1.5 times the size of RAM
Between 2049 MB and 8192 MB | Equal to the size of RAM
More than 8192 MB | 0.75 times the size of RAM

## Package Groups
Development -> Development Libraries
Development -> Development Tools -> gcc*, 1:java*
Development -> GNOME Software Development
Development -> Java Development
Development -> KDE Software Development
Development -> Legacy Software Development
Development -> X Software Development -> openmotif*
Base System -> Legacy Software Support -> openmotif*
Base System -> System Tools -> sysstat

## Add an entry to /etc/hosts file as root user

172.16.139.102 diamond diamond

## Create required group and user as root user

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper
/usr/sbin/useradd -g oinstall -G dba,oper oracle

## Change password for oracle user

passwd oracle

## Edit /etc/sysctl.conf as root user

# Oracle specific settings
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

## Setting Shell Limits for the oracle User

## Add the following lines to the /etc/security/limits.conf file:

# Oracle specific settings
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

## Add or edit the following line in the /etc/pam.d/login file

# Oracle specific settings
session required pam_limits.so

## Add the following lines to the /etc/profile file

# Oracle specific settings
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

## Create required directories

[root@diamond ~]# mkdir /u01
[root@diamond ~]# chown oracle:oinstall /u01
[root@diamond ~]# chmod 775 /u01

## Edit .bash_profile as oracle user

# Oracle specific settings
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
Categories: Oracle Tags:

Oracle Database 11g Release 2 Operating System Requirements for Windows

February 12th, 2013 No comments
According to latest Oracle documentation, the following operating system or later versions are required to successful installation of Oracle Database 11g Release 2 on Windows. We have consider both 32-bit and 64-bit database.
Oracle Database 11g Release 2 for Windows x86(32-bit) is supported on the following operating systems:
Windows Server 2003:
  • Windows Server 2003 Standard Edition x86(32-bit)
  • Windows Server 2003 Enterprise Edition x86(32-bit)
  • Windows Server 2003 Datacenter Edition x86(32-bit)
  • Windows Server 2003 Web Edition x86(32-bit)

Read more…

Categories: Oracle Tags: ,

How to Count Records of All Tables in Oracle Schema

September 8th, 2012 No comments
SELECT  TABLE_NAME,
        TO_NUMBER(
            EXTRACTVALUE(
                XMLTYPE(
                    DBMS_XMLGEN.GETXML(
                        'SELECT COUNT(1) C FROM '||TABLE_NAME
                    )
                ), '/ROWSET/ROW/C'
            )
        ) RECORDS_COUNT
FROM    USER_TABLES;
Categories: Oracle Tags:

Oracle SUBSTR Function

March 28th, 2012 No comments

Oracle SUBSTR (SubString | Sub String) function lets you extract a portion of string from a given string.

Syntax of Oracle SUBSTR function:

SUBSTR(string, position [, length ])


Parameter Description of Oracle SUBSTR Function:

Required parameter string can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB or NCLOB.

Required parameter position must be of datatype NUMBER or any datatype that can be implicitly converted to NUMBER.

Read more…

Categories: Oracle Tags: