kamagra uk pay with paypal

Cleaning up a failed installation or reinstalling Oracle 10g or 11g

August 20th, 2009 No comments

su – root

# For 10g
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

# For 11g
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

. $ORACLE_HOME/bin/localconfig delete
# stops the Oracle CSS daemon and deletes configuration
rm -rf /u01/app/oracle/*

rm -rf /u01/app/oraInventory
rm -f /etc/oraInst.loc /etc/oratab
rm -rf /etc/oracle
rm -f /etc/inittab.cssd
rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv

ASMCMD-08103: failed to connect to ASM; ASMCMD running in non-connected mode

August 15th, 2009 No comments

The warning is provided in 2 cases. If the ORACLE_SID is not set properly or when the ASM instance is not running.

Before Oracle 11g the user received an error which was indicated that the environment was wrong. In Oracle 11g a must beter message is provide, and there are situations where you can use ASMCMD even when the ASM instance is not started or the ORACLE_SID is not set properly.

So depending on the situation the message can be correct. If this is not wanted, validate if the ASM instance is running and/or ORACLE_SID is set correctly.

When using ASMCMD, if ASM instance is running, v$ views are used to retrieve the information requested. If the ASM instance is down, the diskheader is read to provide the requested information when using ASMCMD.

Oracle ASM Errors

August 13th, 2009 No comments

 

# /etc/init.d/oracleasm createdisk VOL1 /dev/xvdb1
Marking disk "/dev/xvdb1" as an ASM disk: asmtool: Device "/dev/xvdb1" is not
a partition
                                                           [FAILED]

Workaround: Run the asmtool command with the -a force=yes parameter to ignore the partition check, for example

# asmtool -C -l /dev/oracleasm -n VOL1 -s /dev/xvdb1 -a force=yes
/etc/init.d/oracleasm scandisks

The oracleasm scandisks command fixes permissions once the disk is created.

Oracle Universal Installer

July 26th, 2009 No comments

 

One of the beauties of the Oracle database is that nearly everything associated with it can be automated. Oracle installation is one of the easiest tasks to handle with little or no human intervention. Sadly, Oracle Corporation has historically provided little documentation on exactly how to accomplish this.

This chapter will discuss the main steps in automating an Oracle installation. Some platforms may require specific preparation before the installer can run. This preparation is usually straightforward and simple, but consult the installation guide for your specific platform before proceeding.

Automated Installation

When performing an automated install, you must provide the installer with a text file containing all the necessary instructions. Oracle calls these Oracle Universal Installer (OUI) response files. A response file is a plain text file, which must follow Oracle’s syntax exactly.

To use a response file during an installation on Windows or UNIX, use the following commands (where "custom.rsp" is the name you’ve given your response file):

Windows

setup.exe [-silent] -responseFile C:\OraInst\custom.rsp

UNIX

./runInstaller [-silent] -responseFile /u01/OraInst/custom.rsp

The -silent qualifier is optional. When a silent install is indicated, the installer will not open any graphical user interface (GUI) windows under any circumstances. All needed information must be provided in the response file for a silent install. If any information is missing, the installer will exit, returning an error and the name of the log file to examine for details.

If the -silent qualifier is omitted, the installer will open normally and wait for the user to move through the install steps manually. Each page will be filled in with answers from the response file, but the installation will not proceed automatically. This is very useful if you want an installation "template" rather than a fully automated install.

In addition to the Oracle-provided sample response files, the installer can record a session to create a response file for use in later installations. To record a session, use the -record and -destinationFile qualifiers. For Windows and UNIX, for example:

Windows

setup.exe -record -destinationFile C:\OraInst\rec.rsp

UNIX

./runInstaller -record -destinationFile /u01/OraInst/rec.rsp

The installer will start and run normally. Choices made during the installation session will be recorded to the designated response file. After all selections have been made, a summary page will be presented. At this point, you can continue with the install or click the Cancel button to end it. Even if the installation is cancelled, the recorded response file is created.

OS Prep for Oracle 11g installation – Redhat EL 5 or Centos 5.2 – 64bit Installation

July 24th, 2009 No comments

OS Installation

  1. At least 1 GB to /tmp  Current Server has 4 GB for /tmp
  2. Package Installation
    • Follow the Oracle recommended practice of using a "default RPMs" installation. Accept the default software selection.
    • Additional RPMs are required to run Oracle Database 11g Release 1. These will be installed later.
  3. Disable Firewall
  4. Select Disabled SELinux.

Verify & Configure OS Installation  -  64-bit (x86_64) Installations

Required kernel version: 2.6.18 This kernel, or any of the kernels supplied in updates, works with Oracle Database 11g Release 1 .

Check your kernel version by running the following command:

uname -rm
Ex:
# uname -rm
2.6.18-8.el5 x86_64

Required package versions (or later):

  • binutils-2.17.50.0.6
  • compat-libstdc++-33-3.2.3
  • compat-libstdc++-33-3.2.3 (32 bit)
  • elfutils-libelf-0.125
  • elfutils-libelf-devel-0.125
  • gcc-4.1.1
  • gcc-c++-4.1.1
  • glibc-2.5-12
  • glibc-2.5-12 (32 bit)
  • glibc-common-2.5
  • glibc-devel-2.5
  • glibc-devel-2.5-12 (32 bit)
  • libaio-0.3.106
  • libaio-0.3.106 (32 bit)
  • libaio-devel-0.3.106
  • libgcc-4.1.1
  • libgcc-4.1.1 (32 bit)
  • libstdc++-4.1.1
  • libstdc++-4.1.1 (32 bit)
  • libstdc++-devel 4.1.1
  • make-3.81
  • sysstat-7.0.0

Note that there are a number of packages where both the 64-bit and 32-bit RPMs must be installed. Fortunately, both should be provided on the 64-bit Linux installation media.

If you’ve performed a "default RPMs" install as suggested by Oracle, there are still some required packages that must be installed:

  • compat-libstdc++-33-3.2.3
  • compat-libstdc++-33-3.2.3 (32 bit)
  • elfutils-libelf-devel-0.125
  • gcc-4.1.1
  • gcc-c++-4.1.1
  • glibc-devel-2.5
  • glibc-devel-2.5-12 (32 bit)
  • libaio-devel-0.3.106
  • libstdc++-devel 4.1.1
  • sysstat-7.0.0

To install the remaining packages, mount the RedHat Enterprise Linux media and move to the directory containing the RPMs.

Some required packages are dependent upon other packages, so the dependant packages must be installed as well. Login as root and run the following commands to install the remaining required packages and their dependent packages:

Using Yum

yum install elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm compat-libstdc++-33* libaio-devel*.x86_64.rpm sysstat*

Using installation CDs

Mount CD 2

    mount -t iso9660 -r /dev/cdrom /media
    cd /media/Server

    rpm -ivh elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm

    Ex:
        # rpm -ivh elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm
warning: elfutils-libelf-devel-0.125-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
        Preparing… ########################################### [100%]
        1:glibc-headers ########################################### [ 11%]
        2:glibc-devel ########################################### [ 22%]
        3:libgomp ########################################### [ 33%]
        4:gcc ########################################### [ 44%]
        5:libstdc++-devel ########################################### [ 56%]
        6:gcc-c++ ########################################### [ 67%]
        7:glibc-devel ########################################### [ 78%]
        8:elfutils-libelf-devel-s########################################### [ 89%]
        9:elfutils-libelf-devel ########################################### [100%]
    cd /
    eject
Mount CD 3

    mount -t iso9660 -r /dev/cdrom /media
    cd /media/Server

    rpm -ivh compat-libstdc++-33* libaio-devel*.x86_64.rpm

        Ex:
        # rpm -ivh compat-libstdc++-33* libaio-devel*.x86_64.rpm
        warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
        Preparing… ########################################### [100%]
        1:libaio-devel ########################################### [ 33%]
        2:compat-libstdc++-33 ########################################### [ 67%]
        3:compat-libstdc++-33 ########################################### [100%]

    cd /
    eject

Mount CD 4

    mount -t iso9660 -r /dev/cdrom /media
    cd /media/Server

    rpm -ivh sysstat*

        Ex:
        # rpm -ivh sysstat*
        warning: sysstat-7.0.0-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
        Preparing… ########################################### [100%]
        1:sysstat ########################################### [100%]

    cd /
    eject

To verify that the required packages have been installed on your system, run the following command:

rpm -q –queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" binutils \
compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc \
glibc-common glibc-devel-2.5 libaio libaio-devel libgcc libstdc++ libstdc++-devel \
make sysstat

    Ex:
    # rpm -q –queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" binutils \

    > compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc \

    > glibc-common glibc-devel-2.5 libaio libaio-devel libgcc libstdc++ libstdc++-devel \

    > make sysstat

    binutils-2.17.50.0.6-2.el5 (x86_64)

    compat-libstdc++-33-3.2.3-61 (i386)

    compat-libstdc++-33-3.2.3-61 (x86_64)

    elfutils-libelf-0.125-3.el5 (x86_64)

    elfutils-libelf-devel-0.125-3.el5 (x86_64)

    gcc-4.1.1-52.el5 (x86_64)

    gcc-c++-4.1.1-52.el5 (x86_64)

    glibc-2.5-12 (i686)

    glibc-2.5-12 (x86_64)

    glibc-common-2.5-12 (x86_64)

    glibc-devel-2.5-12 (x86_64)

    glibc-devel-2.5-12 (i386)

    libaio-0.3.106-3.2 (x86_64)

    libaio-0.3.106-3.2 (i386)

    libaio-devel-0.3.106-3.2 (x86_64)

    libgcc-4.1.1-52.el5 (x86_64)

    libgcc-4.1.1-52.el5 (i386)

    libstdc++-4.1.1-52.el5 (x86_64)

    libstdc++-4.1.1-52.el5 (i386)

    libstdc++-devel-4.1.1-52.el5 (x86_64)

    make-3.81-1.1 (x86_64)

    sysstat-7.0.0-3.el5 (x86_64)

To install support for ODBC the required packages have to be installed on your system.

unixODBC-2.2.11 (32 bit) or later

unixODBC-devel-2.2.11 (64 bit) or later

unixODBC-2.2.11 (64 bit) or later

Use yum to install if Needed

# yum install unixODBC*

Create Oracle Account

Create Oracle groups and user account:
In the same terminal window as root do the following:

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle

Expected output:
uid=501(Oracle) gid=501(oinstall) groups=501(oinstall),502(dba)

Set the password for Oracle:

$ passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Set Kernel Parameters

Cut and paste the following commands while logged in as root into a script and run it or directly at a terminal prompt:

cat >> /etc/sysctl.conf <<EOF
kernel.shmall = 2097152
kernel.shmmax = 2147483648

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304

net.core.wmem_max = 1048576
EOF
/sbin/sysctl -p

The output should be:
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304

net.core.wmem_max = 1048576

Next run the following commands as root to verify your settings:

/sbin/sysctl -a | egrep “shm|sem|file-max|ip_local_port_range| rmem_default|rmem_max|wmem_default|wmem_max”

The output should be:

net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
vm..hugetlb_shm_group = 0
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 2147483648
fs.file-max = 65536

Create Directories

Now create directories to store the Oracle software and the database files (again as root in the same window):

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app

Set Shell Limits for Oracle User

An easy way to set these values is to create a quick script in /tmp. Cut and paste the following commands while logged in as root into a script and run it:

cat >> /etc/security/limits.conf <<EOF1
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF1
cat >> /etc/pam.d/login <<EOF2
session required /lib/security/pam_limits.so
EOF2
cat >> /etc/profile <<EOF3
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF3
cat >> /etc/csh.login <<EOF4
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF4

Now the OS is ready for the Oracle Software installation.

Creating A CentOS 5.2 64 bit Virtual machine using VMware 2.0 – Part 2

July 21st, 2009 No comments

Now that you have created you new virtual machine we need to get it ready to install CentOS and eventually Oracle on to it.

Lets add some more disks:

  • One for the Oracle installation (8 gig)
  • 4 for 2 mirrored ASM Disk Groups (10 gig)

Hopefully you remember how to log in a get to look at your virtual machine you created in Part 1

image

Adding Hard disks to your Virtual Machine

Under the Commands section click the Add Hardware Link.

image

Click Add Hard Disk

Click Next – Choose the size of the disk you want to create

For the Oracle 11g installation with ASM I am creating an 8 gig disk for the Oracle installation and four 10 gig disks to be used as ASM Disk Groups

Repeat this step until all necessary disks are created

image 

Now your Hard disks are created and you are ready to move on

 

Starting up your Virtual Machine

image   Select your Virtual Machine and either click the Green arrow or under commands – select Power On

Once your Virtual machine is powered up Click on the Console tab

image

Then click on the Screen to luanch the virtual machine Screen

image

Installing CentOS 5.2 64 bit on your Virtual Machine

At this point you should either insert your CentOS Installation CD/DVD in your Drive or click the CD icon in the lower right corner and select your CentOS ISO.

image Press Enter to start your Installation

image  I skip the media check

image Click Next

image I speak English so… Click Next

image …  English Keyboard … NEXT

image Select Yes – This is the Drive we are installing CentOS on… gotta format it.. Don’t worry there isn’t any data on it.  Remember we just created it at the top of this post

Repeat the YES selection for all the drives you Created.

image Deselect all the Drives other then the one your planning on using for your installation.

image Check the box for Review and Modify Partition Layout / Click Next

image  Select yes to deleting all data

image Create the /u01 Partition on sdb filling it to maximum size

Create a partition on sda for /tmp size it at a minimum of 1024mb

Click Next

image

Leave the Grub Boot Loader (Defualt setting) – Click Next

I am Using NAT so I have left the defualt network setting of DHCP

image

Click Next

Select your appropriate time zone

image

Click Next

Set your Root password

image

Click Next

Select your Installation type:

  • Desktop Gnome
  • Server
  • Customize Now

image

Click Next

Select the Development tools

image

Click Next

image

image

Click Next

image

 

 

 

Creating A CentOS 5.2 64 bit Virtual machine using VMware 2.0 – Part 1

July 21st, 2009 No comments

 

Start the VMware Server Homepage

 

image

Log In

image

Click The Virtual Machines Tab

Creating A New Virtual Machine

Then Click Create Virtual Machine

image

Change the name of the virtual machine

image

Click Next

Select Linux Operating System

Then Select – Other 2.6x Linux (64 bit)

image

Click Next

If Planning to install Oracle later you need to up the amount of RAM dedicated to the virtual machine.  I suggest 1024MB or Higher.

image

Click Next

image

Select create a new virtual disk.  Select the size you would like for your new Virtual disk.

image

Click Next

Click Add a Network Adapter

image

You can then select the type of networking you need: Bridged, NAT, or Host Only

image

Click Next

CD/DVD Drive – I recommend using the Physical device

Click Next

Floppy Drive – Don’t install a floppy – Unless you have a physical device or floppy images you plan on using

Click next

USB Controller – I used default setting for the USB Controller

Click next

image 

Click Finish

You have now created the virtual Machine to install CentOS on.

How to see the files stored in ASM – Oracle Automatic Storage Management

July 7th, 2009 No comments

#asmcmd -p

Asmcmd lets you view directory structuture and files stored inside Oracle ASM usitlizing a CLI and unix like commands.

Command Description
cd Changes the current directory to the specified directory.
du Displays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively.
exit Exits ASMCMD.
find Lists the paths of all occurrences of the specified name (with wildcards) under the specified directory.
help Displays the syntax and description of ASMCMD commands.
ls Lists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups.
lsct Lists information about current ASM clients.
lsdg Lists all disk groups and their attributes.
mkalias Creates an alias for a system-generated filename.
mkdir Creates ASM directories.
pwd Displays the path of the current ASM directory.
rm Deletes the specified ASM files or directories.
rmalias Deletes the specified alias, retaining the file that the alias points to.

Wildcard

The wildcard characters “*” and “%” match zero or more characters anywhere within an absolute or relative path. The two characters behave identically. The ASMCMD commands that accept wildcards are ls, du, rm, and find. The following examples illustrate the use of wildcards.

Setting Shell Limits for Oracle User on CentOS 5.2

July 4th, 2009 No comments

Set Shell Limits for Oracle User

An easy way to set these values is to create a quick script in /tmp. Cut and paste the following commands while logged in as root into a script and run it:

 

cat >> /etc/security/limits.conf <<EOF1
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF1

cat >> /etc/pam.d/login <<EOF2
session required /lib/security/pam_limits.so
EOF2

cat >> /etc/profile <<EOF3
if [ \$USER = “oracle” ]; then
if [ \$SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF3

cat >> /etc/csh.login <<EOF4
if ( \$USER == “oracle” ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF4

Setting Kernel Parameters for Oracle 11g on Redhat EL & CentOS 5.2

July 4th, 2009 No comments

Set Kernel Parameters

Cut and paste the following commands while logged in as root into a script and run it or directly at a terminal prompt:

 

cat >> /etc/sysctl.conf <<EOF
kernel.shmall = 2097152
kernel.shmmax = 2147483648

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304

net.core.wmem_max = 1048576
EOF
/sbin/sysctl -p

 

The output should be:

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304

net.core.wmem_max = 1048576