ORDERED hint in Oracle 11gR2

Do we have any difference in 11g with the way /*+ ORDERED */ hint works, compared to 10g? Will this hint cause a plan change in 11g, compared to its plan when used in 10g (assuming no other items contribute to a change of plan)?

Welcome to the forum.
Do you mean 10.1 or 10.2 and 11.1 or 11.2?
Are you aware of the existence of http://tahiti.oracle.com?
Just test it, follow these instructions:
http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
SQL and PL/SQL FAQ

Similar Messages

  • Ordered hints in Oracle:

    There's a fairly popular Ordered Hint example on the web as follows:
    <CODE>
    select /*+ ordered use_nl(bonus) parallel(e, 4) */
    e.ename,
    hiredate,
    b.comm
    from
    emp e,
    bonus b
    where
    e.ename = b.ename
    </CODE>
    I would like to know what the "parallel(e, 4)" clause does. Where does the "4" come from? What is "parallel" here?
    I also have another question: If I have 5 tables--T_OREGON, T_UTAH, T_VIRGINIA, T_TEXAS, and T_OKLAHOMA--lined up in a join right behind a FROM, coming in at row counts of
    T_OREGON: [a lot of rows; a lot more than T_UTAH]
    T_UTAH: [smaller than T_OREGON] 40550 rows
    T_VIRGINIA: 14 rows
    T_TEXAS: 66 rows
    T_OKLAHOMA: 8 rows
    like so:
    ...from T_OREGON or, T_UTAH ut, T_VIRGINIA va, T_TEXAS tx, T_OKLAHOMA ok...
    my question is, if an Ordered hint can be used here, is it that the smallest table (in this case T_OKLAHOMA) gets placed first in the join and the rest of the table ascension in the join doesn't matter? Or is it that T_OKLAHOMA gets placed first in the join, followed by T_VIRGINIA [at 14 rows], followed by T_TEXAS, T_UTAH, and finally T_OREGON?
    Thank you for any help that you can provide.

    It is why my other question involved the table order
    behind a FROM keyword, (when employing an Ordered
    hint).
    Can anybody help with that question? Thanks again.With rule based optimizer order was important.
    With cost based optimizer (optimizer mode one of the all_rows, first_rows, forst_rows_n) order is not important Oracle itself chooses the order how to join tables.
    If you have gathered statistics leave CBO do his work. See more about optimizer here http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/optimops.htm
    And if you have taken this citation out of http://articles.techrepublic.com.com/5100-22_11-1050199.html then there are at least following problems:
    1) article is 4 years old
    2) article doesn't say anything about downsides using this hint e.g. what if your data changes and order is not relevant anymore, quite high possibility that query is changed but hint forgotten to change, maintaining additional level of complexity where Oracle has invested many many resources to assist users enhancing CBO
    3) and there is at least 1 fallacy in this article these sentences are wrong:
    "When Oracle evaluates table join orders, it must consider every possible combination of tables. For example, a six-way table join has 720 (permutations of 6, or 6 * 5 * 4 * 3 * 2 * 1 = 720) possible ways that the tables can be joined together. This permutation issue becomes even more pronounced when you have more than 10 joined tables in a query: For a 15-way table join, there are over one trillion (1,307,674,368,000 to be exact) possible query permutations that must be evaluated."
    (emphasis is mine - Gints)
    CBO abandons each permutation as soon as the cost is higher than the smallest from previous steps. So in reality CBO is much smarter than article tries to explain.
    If you really want to know how CBO works then I can only suggest to get book Cost based oracle fundamentals by Jonathan Lewis.
    Gints Plivna
    http://www.gplivna.eu

  • Install Oracle 11gR2 Express Edition on Ubuntu Linux 11.04 (64-bit) Howto

    h2. Install Oracle 11gR2 Express Edition on Ubuntu Linux 11.04 (64-bit) Howto
    Version: B
    Author: Dude, 24. May 2011
    The following are step by step instructions how to install Oracle 11gR2 Express Edition (Beta) under Linux Ubuntu 11.04, 64-bit.
    Access to the Internet is required.
    The instructions cover the following additional topics:
    - Converting Red Hat based Oracle XE installer to Ubuntu.
    - Work-around for missing /sbin/chkconfig tool.
    - Install Oracle XE into a different directory or disk volume.
    - Relocate and configure the Oracle user and default login directory.
    - Uninstall, reconfigure and perform first database backup.
    - Notes and web links.
    - Troubleshooting
    h3. A) System Setup and Prerequisites
    h4. A.1. System Access
    You will need terminal command line, root and system console access to perform the setup tasks.
    To open a Terminal at the system console:
    Menu Applications > Accessories > TerminalThe following commands will enable remote ssh login with root access:
    sudo apt-get install openssh-server
    sudo passwd root
    Verify:
    ssh root@xe_server_host_nameh4. A.2. Software Prerequisites
    The following is required in order to install Oracle 11gR2 XE:
    sudo apt-get install alien libaio1 unixodbcThe following is not required, but it will fix backspace and arrow keys in case you prefer using the vi-editor:
    sudo apt-get install vimh4. A.3. System Swap space
    Minimum swap space required is 2 GB. You can increase swap space if necessary using a swap file:
    To analyze current swap space and memory configuration:
    sudo cat /proc/meminfo
    To install a 1 GB swapfile named swapfile in /, for example:
    sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
    (this may take a while)
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo cp /etc/fstab /etc/fstab.orig
    sudo echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
    Verify:
    sudo swapon -a
    sudo swapon -sh4. A.4. Kernel Parameters
    Oracle 11g XE requires the following additional kernel parameters:
    sudo nano /etc/sysctl.d/60-oracle.conf
    (Enter the following)
    # Oracle 11g XE kernel parameters
    fs.file-max=6815744
    net.ipv4.ip_local_port_range=9000 65000
    kernel.sem=250 32000 100 128
    kernel.shmmax=536870912
    (Save the file)
    Note: kernel.shmmax = max possible value, e.g. size of physical RAM.
    Verify: sudo cat /etc/sysctl.d/60-oracle.conf
    Load new kernel parameters:
    sudo service procps start
    Verify:
    sudo sysctl -q fs.file-max
    -> fs.file-max = 6815744h4. A.5. Oracle Installation Directory
    The current Oracle Installation Guide uses the same directory like in previous versions: /usr/lib/oracle/xe/app/oracle/product/11.2.0/server. However, the current Beta installation uses Oracle Flexible Architecture (OFA) and installs into /u01/app/oracle/product/11.2.0/xe. Due to size limitations of Oracle XE it may not be necessary to store the installation to a specific directory or separate volume, but it is possible:
    Install Oracle XE to separate disk volume:
    From the system console menu: System > Administration > Disk Utility
    Select "ext3" filesystem for Oracle compatibility and specify a Volume label, e.g. Oracle.
    Notice the device name e.g. /dev/sdb
    Get the drive UUID:
    sudo blkid
    e.g. /dev/sdb: UUID="d19a2d8f-da43-4802-8bdb-0703c855e23a"
    Modify /etc/fstab to automatically mount the volume at system startup:
    sudo cp /etc/fstab /etc/fstab.original
    sudo nano /etc/fstab
    (Add the following, using determined UUID, for exmple)
    UUID=d19a2d8f-da43-4802-8bdb-0703c855e23a /u01 ext3 defaults,errors=remount-ro 0 1
    (Save the file)
    Create the mount-point, mount the new volume and set ownership and privileges:
    sudo mkdir /u01
    sudo mount -a
    sudo chown root:root /u01
    sudo chmod 755 /u01
    Verify:
    df -h
    or restart the systemYou can also install Oracle XE into a specific directory:
    Create a symbolic link to store the installation into an existing directory, for instance:
    sudo mkdir /home/oracle-xe
    sudo ln -s /home/oracle-xe /u01h3. C) Oracle 11g XE Download and Installation
    h4. C.1. Download and convert the Installer from Red Hat to Ubuntu
    Please see section E.3. to download the Oracle 11gR2 XE installer.
    Select the version listed for Linux x64.
    sudo unzip linux.x64_11gR2_OracleXE.zip
    sudo alien --to-deb --scripts oracle-xe-11.2.0-0.5.x86_64.rpm
    (This may take a while)h4. C.2. Create a special chkconfig script
    The Red Hat based installer of Oracle XE 11gR2 beta relies on +/sbin/chkconfig+, which is not used in Ubuntu. The chkconfig package available for the current version of Ubuntu produces errors and my not be safe to use. Below is a simple trick to get around the problem and install Oracle XE successfully:
    Create /sbin/chconfig:
    sudo nano /sbin/chkconfig
    (Cut and paste the following)
    #!/bin/bash
    # Oracle 11gR2 XE installer chkconfig hack for Debian by Dude
    file=/etc/init.d/oracle-xe
    if [[ ! `tail -n1 $file | grep INIT` ]]; then
       echo >> $file
       echo '### BEGIN INIT INFO' >> $file
       echo '# Provides:             OracleXE' >> $file
       echo '# Required-Start:       $remote_fs $syslog' >> $file
       echo '# Required-Stop:        $remote_fs $syslog' >> $file
       echo '# Default-Start:        2 3 4 5' >> $file
       echo '# Default-Stop:         0 1 6' >> $file
       echo '# Short-Description:    Oracle 11g Express Edition' >> $file
       echo '### END INIT INFO' >> $file
    fi
    update-rc.d oracle-xe defaults 80 01
    (Save the file)
    Set appropriate execute privileges:
    chmod 755 /sbin/chkconfig
    Note: You should remove the /sbin/chkconfig file after successful installation of Oracle XE.
    h4. C.3. Install and configure Oracle XE
    sudo dpkg --install ./oracle-xe_11.2.0-1.5_amd64.deb
    /etc/init.d/oracle-xe configure
    (This will take a while)
    Remove the /sbin/chkconfig script, which is no longer needed.
    sudo rm /sbin/chkconfigh4. C.4. Relocate and Configure the Oracle user login
    The Oracle XE installer specifies /u01/app/oracle as the login directory for the Oracle user. Although not really necessary, the following will relocate the Oracle user $HOME to a standard location and create standard /etc/skel login files:
    Exit all Oracle user sessions:
    sudo /etc/init.d/oracle-xe stop
    sudo kill -9 `ps -ef | grep oracle | grep -v grep | awk '{print $2}'`
    sudo userdel oracle
    sudo useradd -s /bin/bash -G dba -g dba -m oracle
    sudo passwd oracle
    Verify:
    sudo id oracle
    -> uid=1001(oracle) gid=1001(dba) groups=1001(dba)h4. C.5. Setup Oracle environment variables
    In order to use sqlplus and other tools, the Oracle account requires certain environment variables. The following will set these variables automatically at every interactive Oracle login:
    sudo echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >> /home/oracle/.bashrch4. C.6. Oracle sudo root access
    It is not essential to allow the Oracle user to use sudo, but it is convenient:
    usermod -G admin oracle
    Verify:
    id oracle
    -> uid=1001(oracle) gid=1001(dba) groups=1001(dba),120(admin)
    sudo su -
    -> Enter Oracle account passwordh4. C.7. Oracle 11g XE Post-installation
    After you install Oracle Database XE, its graphical user interface is only available from the local server, but not remotely.
    The following will correct the problem if necessary:
    Login as user Oracle or use:
    su - oracle
    sqlplus / as sysdba
    At the SQL prompt, enter the following command:
    EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
    exith3. D) Unintstall, Reconfigure and Troubleshooting
    h4. D.1. Uninstall Oracle 11g XE
    The following will completely uninstall and remove Oracle 11g XE:
    Login as user root:
    sudo su -
    /etc/init.d/oracle-xe stop
    dpkg --purge oracle-xe
    rm -r /u01/app
    rm /etc/default/oracle-xe
    update-rc.d -f oracle-xe removeh4. D.2. Reconfigure Oracle 11g XE
    Type the following in a terminal window:
    /etc/init.d/oracle-xe stop
    sudo rm /etc/default/oracle-xe
    /etc/init.d/oracle-xe configureh4. D.3. Enable Archivelog mode and perform a database backup
    Login as user Oracle:
    su - oracle
    sqlplus / as sysdba
    At the SQL prompt, enter the following commands:
    shutdown immediate
    startup mount
    alter database archivelog;
    alter database open;
    exit
    Login to system console of the Oracle user account:
    Select Applications > Oracle Database 11g Express Edition > Backup Databaseh3. E) Notes
    h4. E.1. Oracle 11g XE limitiations overview
    - It will consume, at most, processing resources equivalent to one CPU.
    - Only one installation of Oracle Database XE can be performed on a single computer.
    - The maximum amount of user data in an Oracle Database XE database cannot exceed 11 GB.
    - The maximum amount of RAM that Oracle XE uses cannot exceed 1 GB, even if more is available.
    - HTTPS is not supported natively with the HTTP listener built into Oracle Database XE.
    h4. E.2. Documentation and Links
    Official documentation for Oracle 11gR2 XE can be found at:
    http://www.oracle.com/pls/xe112/homepage
    h4. E.3. Oracle 11g XE downloads
    The Installer is available from the Oracle Technology Network at:
    http://www.oracle.com/technology/products/database/xe
    http://www.oracle.com/technetwork/database/express-edition/downloads/index.html
    h4. E.4 APEX links and archives
    The APEX archives can be found at:
    http://www.oracle.com/technetwork/developer-tools/apex/application-express/all-archives-099381.html
    The APEX download site is:
    http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
    h3. F) Troubleshooting
    ... in progress
    Regards and best of luck!
    Edited by: Dude on May 25, Version B: various corrections. chkconfig package (A.2.) not required.

    even though I am admin user.Admin user is a MS Windows term, that does not apply to Linux or Unix in the same fashion.
    The configuration script tells you "You must be root user to run the configure script. Login as root user and
    then run the configure script."
    This is most likely correct because your account is not root and does not have UID 0. What you can do is to login as root e.g. sudo su -, as the message suggest, or use "sudo /etc/init.d/oracle-xe configure", provided your account is defined in the /etc/sudoers file to perform root/admin actions.
    Btw, do not modify /etc/passwd and /etc/group to give you admin privileges or try to create a another root account under a different name. That's not the way it works and usually leads to nasty problems.

  • Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto

    h1. Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
    Author: Dude
    Version: D
    Last modified: 14-Jan-2012
    You are welcome to add comments, but please do not discuss your installation issues in this thread.  If you have a question about the instructions, please add a simple note to the link of your own thread. The instructions are the result of my own research and development. If you would like to use any of the information for your own blog or website, please include a link to this reference to include future changes.
    Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
    h2. Purpose
    This document outlines instructions how to install Oracle XE under Ubuntu 11.10.
    Ubuntu or Debian based Linux is not on the list of supported operation systems according to the Oracle documentation at http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm. You may want to consider virtualization software like Oracle Virtualbox and install Oracle Enterprise Linux as a free and professional alternative to installing XE under Ubuntu. You can also download pre-build virtual machines that include Oracle XE. You can browse http://otn.oracle.com/community/developer-vm for more information.
    h2. Topics
    h4. 1) Install Linux Ubuntu
    h4. 2) Remote Terminal
    h4. 3) Install Additional Software
    h4. 4) Managing Swap Space
    h4. 5) Modify Kernel Parameters
    h4. 6) Oracle Home Directory
    ...a) Resize the Root Partition
    ...b) Setup External Storage
    h4. 7) ORA-00845: MEMORY_TARGET
    h4. 8) Installing Oracle 11gR2 Express Edition
    h4. 9) Post-Installation
    h4. 10) Tips and Troubleshooting
    ...a) Port 1521 appears to be in use by another application
    ...b) cannot touch `/var/lock/subsys/listener': No such file or directory
    ...c) ORA-00845: MEMORY_TARGET
    ...d) Apex ADMIN password
    ...e) SYS and SYSTEM password
    ...f) Uninstall Oracle 11g XE
    ...g) Reconfigure Oracle 11g XE
    ...h) Gnome Classic desktop
    ...i) Unix vi cursor keys
    ...j) Backup Database
    h4. 11) History
    h4. 12) References
    h2. 1) Install Linux Ubuntu
    The following assumes you have installed Ubuntu 11.10 Desktop Edition for AMD 64-bit, or upgraded from a previous version. Keep in mind that Oracle 11gR2 Express Edition is only available for 64-bit architecture. It is not necessarily a requirement, but I would not bother to install Oracle 11gR2 XE on a system with less than 2 GB of RAM installed. You can download Ubuntu for free at: http://www.ubuntu.com/download/ubuntu and install it using the default settings provided.
    You can apply the latest OS patch-sets by clicking the power button icon in the upper right hand corner of the screen and selecting "Updates available..."
    h2. 2) Remote Terminal
    You will need command line access to perform the installation tasks. Select the top "Dash Home" button of the Unity toolbar and enter the word "terminal", or use CTRL-ALT-t. If you prefer to open a remote terminal session use SSH. Ubuntu does not come with a secure shell login by default. To install it, use the following command:
    sudo apt-get install openssh-serverYou cannot login as root unless you set a root password using the "sudo passwd root" command. However, you can get root user access using the "sudo" command, which requires only to re-enter the password of your personal account. Access to "sudo" is controlled by the /etc/sudoers file.
    The best way to establish a remote command line session as root is to login with your personal account, e.g.: ssh [email protected], and then type "sudo su -" to become root, or use "sudo <command>" to execute individual commands. If your account does not have "sudo" access you can login as root using "su - root", but will need to know the root password.
    h2. 3) Install Additional Software
    Oracle 11g Express Edition requires additional software that is not installed by default:
    sudo apt-get install alien libaio1 unixodbch2. 4) Managing Swap Space
    Oracle demands that the minimum swap space for Oracle Database XE is 2 GB (2095100 KB) or twice the size of RAM, whichever is lesser. Enter the following shell command to verify your swap space:
    cat /proc/meminfo | grep -i swap
    SwapCached:            0 kB
    SwapTotal:       2095100 kB
    SwapFree:        2095100 kBYou can increase available swap space by using a swap file as long as disk space permits. The advantage of a swap file versus a swap partition is flexible space management because you can add or delete swap space on demand as necessary. The following will create and enable an additional 1 GB swap file at system startup, located in the /home directory:
    Login as root:
    sudo su -Enter the following commands:
    dd if=/dev/zero of=/home/swapfile bs=1024 count=1048576
    mkswap /home/swapfile
    swapon /home/swapfile
    swapon -aCreate a backup of the original "fstab" file and add the new swap file:
    cp /etc/fstab /etc/fstab.backup_`date +%N`
    echo '/home/swapfile swap swap defaults 0 0' >> /etc/fstabExit from root and verify the new swap space:
    exit
    swapon -s
    Filename                    Type          Size     Used     Priority
    /dev/sda5                               partition     2095100     0     -1
    /home/swapfile                          file          1048572     0     -2Swap space is not a substitute for installed RAM. Swap space is a safeguard that allows the system to move idle processes to disk before the OOM killer will begin to terminate processes in order to free up enough real memory to keep the system operational. The general rule for sizing the swap space depends on the size of installed RAM. If your system has less then 4 GB of RAM the swap space should usually be at least twice this size. If you have more than 8 GB of RAM installed you may consider to use an equal size as swap space. The more RAM you have installed, the less likely you are going to run into memory starvation, and the less likely you are going to need swap space, unless you have a bad process.
    h2. 5) Modify Kernel Parameters
    Oracle 11gR2 Express Edition requires the following Kernel parameters. Enter the commands exactly as shown:
    Login as root:
    sudo su -Cut & paste the following directly into a command shell (not a text editor):
    cat > /etc/sysctl.d/60-oracle.conf <<-EOF
    # Oracle 11g XE kernel parameters
    fs.file-max=6815744
    net.ipv4.ip_local_port_range=9000 65500
    kernel.sem=250 32000 100 128
    # kernel.shmmax=429496729
    kernel.shmmax=107374183
    EOFLoad and verify the new kernel parameters:
    service procps start
    sudo sysctl -q fs.file-max
    sudo sysctl -q kernel.shmmax
    sudo sysctl -q net.ipv4.ip_local_port_range
    sudo sysctl -q kernel.sem The SHMMAX kernel parameter defines the upper memory limit of a process. It is a safeguard to stop a bad process from using all memory and causing RAM starvation. The Linux default is 32 MB. The official Oracle XE installation documentation suggests a value of 4 GB -1 bytes (429496729). Since Oracle 11g XE has a 1 GB memory limit, a smaller footprint will be a better safeguard for the complete system. Setting the SHMMAX parameter to 107374183 will be sufficient.
    h2. 6) Oracle Home Directory
    At the time of this writing, Enterprise Linux 6 is not supported for Oracle database yet. It is therefore not possible to confirm Oracle ext4 filesystem compatibility, which is default in Ubuntu 11. According to various information, ext4 may cause a performance problem for Oracle 11g database. The following will show you how to add a ext3 partition to your existing setup.
    h3. 6.a) Resize the Root Partition
    Provided you have sufficient free disk space, you should be able to resize the root partition to create an extra ext3 filesystem. Considering the 11 GB user datafile limit of the Express Edition, 18 GB should be more than enough.
    You can use the free Gparted Live CD to shrink your startup volume. Gparted downloads are available at http://sourceforge.net/projects/gparted/files/gparted-live-stable. When burning the CD, pay attention to burn the raw .iso image and not the possibly "mounted" image. If you are using a virtual machine like Oracle Virtualbox, you can mount the .iso image directly. There are going to be a few prompts when the system starts from the CD, but you can press Return to accept the defaults.
    When the Gparted window appears:
    - Select your ext4 root partition, usually /dev/sda1
    - Select the "Resize/Move" button from the toolbar.
    - Enter 18000 into the "Free space following" field and press the Return key.
      Be careful not not change the start of the partition!
    - Click the "Resize/Move" of the dialog and then then the "Apply" toolbar button.
      The process may take several minutes - do not abandon it!
    - Select the new unallocated free space of ~ 18 GB and push the "New" button.
    - Set the file system to "ext3" and label it "oraclexe" and click the "Add" button.
      Be sure to label it oraclexe, otherwise the follow-up instructions will fail.
    - Finally select "Apply from the toolbar to apply the changes.
    - Quit "Gparted", select "Exit" from the desktop and choose "Reboot" to restart the system.
    {code}
    After the system has restarted, open a terminal command shell.
    Login as root:
    {code}
    sudo su -
    {code}
    Backup "fstab" and add the UUID of the partition. The "tr" command remove the quotes:
    {code}
    cp /etc/fstab /etc/fstab_`date +%N`
    uuid=`blkid | grep oraclexe | awk '{print $3}'`
    uuid=`echo $uuid | tr -d '\042'`
    echo $uuid
    echo "$uuid  /u01  ext3  errors=remount-ro 0 1" >> /etc/fstab
    {code}
    The UUID is a unique number and should look similar to:
    {code}
    UUID=d1db753e-b5dd-4a4c-a61e-259c69867b58
    {code}
    Restart the system:
    {code}
    reboot
    {code}
    Verify the success:
    {code}
    df -h /u01
    {code}
    h3. 6.b) Setup External Storage
    If you prefer to setup an external drive to install Oracle XE, beware that it can be a fatal mistake to make an entry in /etc/fstab to automount your external storage device.  An unavailable device in /etc/fstab will prevent a system startup and prompt for appropriate actions at the console.
    The following is an example of how to prepare an external storage device to be used for Oracle 11g, including a script to automatically mount an external drive at system startup without the disadvantages of /etc/fstab. The script will also take into consideration that a device name might shift if you attach additional devices.
    To find out which USB devices are connected:
    {code}
    sudo parted -l
    {code}
    Look for the device that matches your USB storage. For example: /dev/sdb1
    {code}
    Model: USB 2.0 Flash Disk (scsi)
    Disk /dev/sdb: 2064MB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Number  Start   End     Size    File system  Name     Flags
    1      20.5kB  1929MB  1929MB  hfs+         mystick
    {code}
    Initialize the device using ext3 filesystem - this will erase all data. The "-c" option will check for bad blocks (read-only), "-L" is the volume label:
    {code}
    sudo umount /dev/sdb1
    sudo mkfs.ext3 -c -L oraclexe /dev/sdb1
    {code}
    Install the pmount distribution package:
    {code}
    sudo apt-get install pmount
    {code}
    Login as root:
    {code}
    sudo su -
    {code}
    Cut & paste the following into the command prompt (not a text editor):
    {code}
    cat > /etc/init.d/oracle-mount <<-EOF
    #! /bin/sh
    # /etc/init.d/oracle-mount
    VOL_UUID=alphanumeric
    VOL_LABEL=oraclexe
    VOL_SYMLINK=/u01
    mount=/usr/bin/pmount
    uuid2dev() {
       VOL_DEVICE="\`blkid | grep \$VOL_UUID | awk '{print \$1}'\`"
       VOL_DEVICE="\`echo \$VOL_DEVICE | tr -d ':'\`"
       echo \$VOL_DEVICE
    case "\$1" in
      start)
        echo "Starting script /etc/init.d/oracle-mount"
        uuid2dev
        \$mount \$VOL_DEVICE \$VOL_LABEL
        if [ -d /media/\$VOL_LABEL ]; then
           echo "Mount \$VOL_DEVICE success"
           ln -sf /media/\$VOL_LABEL \$VOL_SYMLINK
        else
           echo "Error mouting \$VOL_DEVICE"
        fi
      stop)
        echo "Stopping script /etc/init.d/oracle-mount"
        uuid2dev
        /bin/umount \$VOL_DEVICE 2>/dev/null
        if [ "\`/usr/bin/pmount | /bin/grep \$VOL_DEVICE\`" ]; then
           echo "Error unmounting \$VOL_DEVICE"
        else
           rm -f \$VOL_SYMLINK
        fi
        echo "Usage: /etc/init.d/oracle-u01 {start|stop}"
        exit 1
    esac
    ### BEGIN INIT INFO
    # Provides:          oracle-mount
    # Required-Start:    \$remote_fs \$syslog
    # Required-Stop:     \$remote_fs \$syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Start daemon at boot time
    # Description:       Mount hotplug-usb drive and create symlink
    ### END INIT INFO
    EOF
    {code}
    Install the oracle-mount init script:
    {code}
    chmod 755 /etc/init.d/oracle-mount
    update-rc.d oracle-mount defaults 01 99
    {code}
    Get the UUID of the volume "oraclexe" and update the VOL_UUID in the init script accordingly:
    {code}
    uuid=`blkid | grep oraclexe | awk '{print $3}'`
    echo $uuid
    sed -i "s/^VOL_UUID=.*/VOL_$uuid/g" /etc/init.d/oracle-mount
    {code}
    The UUID of your device will be a unique number, but should be similar to:
    {code}
    UUID="3f5e9963-b328-49f3-b3e8-a3561ae34106"
    {code}
    Logout of root and test the init script:
    {code}
    exit
    sudo /etc/init.d/oracle-mount stop
    ls /u01
    sudo /etc/init.d/oracle-mount start
    ls /u01
    {code}
    Your output should look like:
    {code}
    Stopping script /etc/init.d/oracle-mount
    /dev/sdb1
    ls: cannot access /u01: No such file or directory
    Starting script /etc/init.d/oracle-mount
    /dev/sdb1
    Mount /dev/sdb1 success
    lost+found
    {code}
    h2. 7) ORA-00845: MEMORY_TARGET
    Oracle 11gR2 XE under Ubuntu 11.10 will result in "ORA-00845: MEMORY_TARGET not support on this system" either at Oracle database startup or during the initial installation. Ubuntu 11.10 uses a new version of the "systemd" system and session manager and has migrated away from /dev/shm and other common directories in favor of /run.
    There are several ways how to address the problem. You can either enable /dev/shm shared memory, or change the default memory management of Oracle 11g from AMM (Automatic Memory Management) to ASMM (Automatic Shared Memory Management) as it was in used the previous 10g version. Since AMM is one of the new features of 11g, the following will show you how to make to make AMM work.
    Login as root:
    {code}
    sudo su -
    {code}
    Cut & paste the following into the command prompt (not a text editor):
    {code}
    cat > /etc/init.d/oracle-shm <<-EOF
    #! /bin/sh
    # /etc/init.d/oracle-shm
    case "\$1" in
      start)
        echo "Starting script /etc/init.d/oracle-shm"
        # Run only once at system startup
        if [ -e /dev/shm/.oracle-shm ]; then
          echo "/dev/shm is already mounted, nothing to do"
        else
          rm -f /dev/shm
          mkdir /dev/shm
          mount -B /run/shm /dev/shm
          touch /dev/shm/.oracle-shm
        fi
      stop)
        echo "Stopping script /etc/init.d/oracle-shm"
        echo "Nothing to do"
        echo "Usage: /etc/init.d/oracle-shm {start|stop}"
        exit 1
    esac
    ### BEGIN INIT INFO
    # Provides:          oracle-shm
    # Required-Start:    $remote_fs $syslog
    # Required-Stop:     $remote_fs $syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Bind /run/shm to /dev/shm at system startup.
    # Description:       Fix to allow Oracle 11g use AMM.
    ### END INIT INFO
    EOF
    {code}
    Install the oracle-shm init script:
    {code}
    chmod 755 /etc/init.d/oracle-shm
    update-rc.d oracle-shm defaults 01 99
    {code}
    Restart the system:
    {code}
    reboot
    {code}
    Verify the success:
    {code}
    sudo cat /etc/mtab | grep shm
    {code}
    {code}
    none /run/shm tmpfs rw,nosuid,nodev 0 0
    /run/shm /dev/shm none rw,bind 0 0
    {code}
    The upper limit of shared memory under Linux is set to 50 % of the installed RAM by default. If your system has less than 2 GB of RAM installed, there is still a chance to run into ORA-00845 error if your shared memory is used by other software.
    The verify available shared memory, type the following commands:
    {code}
    sudo df -h /run/shm
    {code}
    h2. 8) Installing Oracle 11gR2 Express Edition
    The final release version of Oracle 11gR2 Express Edition can be downloaded for free at http://otn.oracle.com/database/express-edition/downloads. The software should automatically downloaded into the "Downloads" folder of your home directory.
    Enter the following commands to unpack the installer:
    {code}
    cd ~/Downloads
    unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
    rm oracle-xe-11.2.0-1.0.x86_64.rpm.zip
    {code}
    The Debian Linux based package management of Ubuntu is not compatible with the Red Hat package manager. The Oracle installer needs to be converted using the following commands:
    {code}
    cd ~/Downloads/Disk1
    sudo alien --to-deb --scripts oracle-xe-11.2.0-1.0.x86_64.rpm
    (This may take a few minutes)
    rm oracle-xe-11.2.0-1.0.x86_64.rpm
    {code}
    The following needs to be set for compatibility:
    {code}
    sudo ln -s /usr/bin/awk /bin/awk
    sudo mkdir /var/lock/subsys
    {code}
    Ubuntu uses different tools to manage services and system startup scripts. The "chkconfig" tool required by the Oracle installer is not available in Ubuntu. The following will create a file to simulate the "chkconfig" tool.
    Login as root:
    {code}
    sudo su -
    {code}
    Copy & paste the following *directly* into the command prompt to create a file:
    {code}
    cat > /sbin/chkconfig <<-EOF
    #!/bin/bash
    # Oracle 11gR2 XE installer chkconfig hack for Debian based Linux (by dude)
    # Only run once.
    echo "Simulating /sbin/chkconfig..."
    if [[ ! \`tail -n1 /etc/init.d/oracle-xe | grep INIT\` ]]; then
    cat >> /etc/init.d/oracle-xe <<-EOM
    ### BEGIN INIT INFO
    # Provides:                  OracleXE
    # Required-Start:        \\\$remote_fs \\\$syslog
    # Required-Stop:        \\\$remote_fs \\\$syslog
    # Default-Start:            2 3 4 5
    # Default-Stop:            0 1 6
    # Short-Description:   Oracle 11g Express Edition
    ### END INIT INFO
    EOM
    fi
    update-rc.d oracle-xe defaults 80 01
    EOF
    {code}
    Exit root:
    {code}
    exit
    {code}
    Set execute privileges:
    {code}
    sudo chmod 755 /sbin/chkconfig
    {code}
    Install Oracle 11gR2 Express Edition entering the following commands:
    {code}
    cd ~/Downloads/Disk1
    sudo dpkg --install ./oracle-xe_11.2.0-2_amd64.deb
    (This may take a couple of minutes)
    {code}
    Run the configuration script to create (clone) the database and follow the screen. Accept the default answers, including "y" to startup the database automatically, or modify as required.
    {code}
    sudo /etc/init.d/oracle-xe configure
    (This can take a few minutes - the installation completed successfully.)
    {code}
    To verify success, the procedure should end showing:
    {code}
    Starting Oracle Net Listener...Done
    Configuring database...Done
    Starting Oracle Database 11g Express Edition instance...Done
    Installation completed successfully.
    {code}
    Set a password for the Oracle account:
    {code}
    sudo passwd oracle
    {code}
    h2. 9) Post-Installation
    In order to use sqlplus and other tools, the Oracle account requires specific environment variables. The following will set these variables automatically at every Oracle login:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Copy the default account skeleton files and add the Oracle env script to .profile:
    {code}
    cp /etc/skel/.bash_logout ./
    cp /etc/skel/.bashrc ./
    cp /etc/skel/.profile ./
    echo "" >>./.profile
    echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >>./.profile
    {code}
    By default, the Oracle Database XE graphical user interface is only available at the local server, but not remotely. The following will enable remote logins:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and execute the following:
    {code}
    sqlplus / as sysdba
    SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
    exit
    {code}
    See http://download.oracle.com/docs/cd/E17781_01/admin.112/e18585/toc.htm for more information.
    h3. a) Unity desktop configurations
    The Oracle XE menu under the previous Gnome Classic desktop shows several useful scripts to backup the database, start and stop the database, etc. Under the Unity based desktop this menu is not available. You can either switch to the Gnome Classic desktop as outlined in chapter 2, or perform the following steps to modify and copy the scripts as outlined below. The start and stop database scripts will also be modified to perform a progress feedback.
    Login as user root:
    {code}
    sudo su -
    {code}
    Convert desktop files:
    {code}
    cd /usr/share/applications
    sed -i 's/Categories.*/Categories=Database;Office;Development;/g' oraclexe*
    sed -i 's/MultipleArgs/X-MultipleArgs/g' oraclexe*
    sed -i 's/MimeType.*/MimeType=application\/x-database/g' oraclexe*
    sed -i 's/.png//g' oraclexe*
    sed -i 's/Terminal=false/Terminal=true/g' oraclexe-startdb.desktop
    sed -i 's/Terminal=false/Terminal=true/g' oraclexe-stopdb.desktop
    {code}
    Exit root:
    {code}
    exit
    {code}
    Login as user Oracle:
    {code}
    su - oracle
    {code}
    Modify database start and stop scripts:
    {code}
    cd /u01/app/oracle/product/11.2.0/xe/config/scripts
    cp startdb.sh start.sh_orig
    cp stopdb.sh stopdb.sh_orig
    sed -i 's/>.*//g' startdb.sh
    sed -i 's/>.*//g' stopdb.sh
    {code}
    You will need SYSDBA privileges and set Oracle environment variables in order to use your regular user account.
    Login to your regular user account:
    {code}
    su - dude
    {code}
    Enter the folowing command:
    {code}
    sudo usermod -a -G dba dude
    {code}
    Then update your profile to automatically set the necessary Oracle environment variables:
    {code}
    echo "" >>./.profile
    echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >>./.profile
    {code}
    Update your Desktop folder to contain useful Oracle XE scripts:
    {code}
    cp /usr/share/applications/oraclexe* ~/Desktop
    chmod 750 ~/Desktop/oraclexe*
    {code}
    To verify success re-login and try "sqlplus":
    {code}
    su - oracle
    sqlplus / as sysdba
    {code}
    h2. 10) Tips and Troubleshooting
    h3. 10. a) Port 1521 appears to be in use by another application
    Error: Port 1521 appears to be in use by another application. Specify a different port.This error happens after a previously unsuccessful configuration attempt using /etc/init.d/oracle-xe configure script. The script was able to start the Listener process, but most likely failed to continue  to clone the database, e.g. ORA-00845. The following should correct the problem:
    Determine the oracle listener process that is already running:
    {code}
    $ ps -ef | grep oracle
    {code}
    Your output should be similar to:
    {code}
    oracle   19789     1  0 19:46 ?        00:00:00 /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr
    {code}
    Then kill the process, using the appropriate process id, for instance:
    {code}
    $ sudo kill -9 19789
    {code}
    h3. 10.b) cannot touch `/var/lock/subsys/listener': No such file or directory
    Starting Oracle Net Listener...touch: cannot touch `/var/lock/subsys/listener': No such file or directoryThis error occurs when you run /etc/init.d/oracle-xe configure, but failed the preinstallation step to create the /var//lock/subsys directory as outlined in chapter 8.
    h3. 10.c) ORA-00845: MEMORY_TARGET
    ORA-00845: MEMORY_TARGET not supported on this system See chapter 7 to enable /dev/shm and verify free space available in /run/shm
    h3. 10.d) Apex ADMIN password
    According to the Oracle documentation, the password for the INTERNAL and ADMIN Oracle Application Express user accounts is initially the same as the SYS and SYSTEM administrative user accounts. Well, I tried several times without success. To reset the Apex Admin password:
    Login as user oracle:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and type the following:
    {code}
    sqlplus / as sysdba
    {code}
    At the SQL prompt, type the following to be prompted to change the password:
    {code}
    SQL> @?/apex/apxxepwd.sql
    exit
    {code}
    When done, open your browser and go to http://127.0.0.1:8080/apex
    Workspace: Internal
    Username: ADMIN
    Password: password you set with apxxepwd.sql
    I will prompt you to reset the password:
    old password: password you set with apxxepwd.sql
    new password: final_password
    You can also login as the Apex Admin using http://127.0.0.1:8080/apex/apex_admin
    h3. 10.e) SYS and SYSTEM password
    Use the following commands to reset the SYS and SYSTEM passwords if necessary:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and type the following at the SQL prompt:
    {code}
    sqlplus / as sysdba
    SQL> alter user sys identified by "password" account unlock;
    SQL> alter user system identified by "password" account unlock;
    SQL> exit
    {code}
    h3. 10.f) Uninstall Oracle 11g XE
    The following will completely uninstall and remove Oracle 11g XE:
    Open a terminal seesion and login as user root:
    {code}
    sudo su -
    {code}
    Enter the following:
    {code}
    /etc/init.d/oracle-xe stop
    dpkg --purge oracle-xe
    rm -r /u01/app
    rm /etc/default/oracle-xe
    update-rc.d -f oracle-xe remove
    update-rc.d -f oracle-mount remove
    update-rc.d -f oracle-shm remove
    {code}
    h3. 10.g) Reconfigure Oracle 11g XE
    Type the following commands in a terminal window:
    {code}
    sudo /etc/init.d/oracle-xe stop
    sudo rm /etc/default/oracle-xe
    sudo /etc/init.d/oracle-xe configure
    {code}
    h3. 10.h) Gnome Classic desktop
    Ubuntu 11 moved from the Gnome Classic desktop to Unity and removed the "Ubuntu Classic" login option. Unity was designed to make more efficient use of space given a limited screen size and touch screens. If you prefer to use the Gnome Classic desktop, enter the following into a terminal window:
    {code}
    sudo apt-get install gnome-panel
    {code}
    To log into the Gnome Classic desktop, select the "Gearwheel" at the login screen and select "Gnome Classic".
    h3. 10.i) Unix vi cursor keys
    The instructions in this tutorial do not require the use of any text editor. However, if you would like use the backspace and cursor keys in the "vi-editor", the following needs to be installed:
    {code}
    sudo apt-get install vim
    {code}
    h3. 10.j) Backup Database
    In order to perform an online database backup using the supplied "Backup Database" script, the database needs to run in Archive-Log mode. This can be setup using the following commands:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and type the following:
    {code}
    sqlplus / as sysdba
    SQL> shutdown immediate
    SQL> startup mount
    SQL> alter database archivelog;
    SQL> alter database open;
    SQL> exit
    {code}
    h2. 11) History
    Version: A, 24-Oct-2011
    - first release
    Version: B, 25-Oct-2011
    - reduced instructions.
    - corrected errors in 6a and 8.
    - new strategy addressing ORA-00845 error.
    - rework of chapter 10.
    Version: C, 30-Nov-2011
    - corrected typo in 6a
    - new procedures in 9a.
    - added progress feedback to database scripts.
    Version D, 14-Jan-2012
    - corrected presentation errors.
    - reorganized instructions.
    h3. 12) References
    http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm
    http://askubuntu.com/questions/57297/why-has-var-run-been-migrated-to-run
    http://lwn.net/Articles/436012/
    https://forums.oracle.com/forums/thread.jspa?threadID=2300750&tstart=0
    Kind regards and best of luck!
    Dude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Excellent Blog. Thank You
    Small clarification on Step **6) Oracle Home Directory, ...a) Resize the Root Partition**
    Ubuntu 11.10 has Gparted available as a Ubuntu software download, DONT use that while trying the above step, instead download the ISO file from http://sourceforge.net/projects/gparted/files/gparted-live-stable/ gparted-live-0.12.0-5.iso (124.6 MB)
    Burn that ISO file on a Blank DVD, reboot the Ubuntu , during startup select Boot from DVD Option if not already selected. this will take to Boot Menu Options of Gparted Live then select the first menu option, and this allows to do further action such as Re-sizing .
    and once you have chosen and executed step a) . do NOT run step b) also that is "Setup External Storage"
    I hope this minor clarification can avoid some confusion
    Regards
    Madhusudhan Rao
    Edited by: MadhusudhanRao on Mar 24, 2012 11:30 PM

  • Oracle 11gR2 RAC and DR setup

    Environment:
    Oracle 11gR2 RAC (2 node) with ASM
    HP-UX B.11.31 U ia64
    We have configured two ASM disk group for Data & FRA, and we configured RMAN backup into FRA location. Now our Database, Log file, Archive logs and RMAN backup files all are in ASM on primary site.
    Our network team is using Recover Point to mirror all the disks into DR site; we have no setup from Oracle side. What is the possible configuration that we need to have in DR site from Oracle side in order to bring-up the database in-case of primary site failure (disaster).
    I am new to Oracle RAC can some one give me a suggestion.
    - Mano

    What is the possible configuration that we need to have in DR site from Oracle side in order to bring-up the database in-case of primary site failure ORACLE DATAGUARD is what you need; not RAC

  • New features present in oracle 11gr2.

    Hi all,
    I would like to know the new features present in oracle 11gR2. Any pointers would be helpful.
    Example: list aggregate features is not there in 11gR1... etc.
    Thanks and Regards
    Nagaraja Akkivalli.

    SQL New Features:
    Performance improvements
    1.Alter table to add columns with default value.
    2.Invisible Indexes
    3.Redefinition improvements
    4.SQL Result cache
    New Language features
    1.New data types: SIMPLE_INTEGER, SIMPLE_FLOAT, SIMPLE_DOUBLE
    2.Regular Expressions:regexp_count
    3.Read Only Table
    4.Virtual Columns
    5.Partitioning:Interval Partitioning,System Partitioning,Reference Partitioning,Virtual Column-Based Partitioning
    6.IGNORE_ROW_ON_DUPKEY_INDEX hint
    7.Analytic functions – NTH_VALUE ,LISTAGG
    8.SecureFiles
    9.Pivot query
    PL/SQL New Features:
    1.Real Native Compilation
    2.DML triggers are faster
    3.Compound triggers
    4.Fine grained dependency Intra unit inlining
    5.PL/SQL result cache
    6.OCI Result Set Caching
    New Language features:
    1.Disabled Trigger
    2.FOLLOWS keyword in Trigger
    3.PLW-006009 warning
    4.Continue statement
    5.Enhancements in Dynamic SQL

  • Nofile limit in Oracle 11gR2 and 12cR1 preinstall packages

    After installing 12c Release 3 (12.1.0.3) EM Cloud Control under Oracle Linux 6.4 x64 I noticed the following during system startup (/var/log/boot.log):
    Oracle Enterprise Manager Cloud Control 12c Release 3
    Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
    Starting Oracle Management Server...
    Starting WebTier...
    WebTier Successfully Started
    Oracle Management Server Successfully Started
    Oracle Management Server is Up
    WARNING: Limit of open file descriptors is found to be 1024.
    The OMS has been started but it may run out of descriptors under heavy usage.
    For proper functioning of OMS, please set "ulimit -n" to be at least 4096.
    The system has oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall installed in that order. Since Oracle Database 12c Release 1 is not yet certified to house EM 12.1.0.3 Repository, I installed a Oracle 11gR2 (11.2.0.1) database before installing 12c Release 3 EM cloud control.
    According to http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#BHCCADGD the minimum requirement is 1024, however, 12c EM cloud control suggests 4096.
    I corrected the issue by editing /etc/security/limits.conf
    # oracle-rdbms-server-11gR2-preinstall setting for nofile soft limit is 1024
    oracle   soft   nofile    4096
    I also had to modify /etc/security/limits.d/oracle-rdbms-server-12cR1-preinstall.conf to set the soft nofile limit to 4096.
    # oracle-rdbms-server-12cR1-preinstall setting for nofile soft limit is 1024
    oracle   soft   nofile    4096

    Thanks for your quick reply... I don't have a problem creating the basic ACL with the privileges granted for a user.  The problem appears when I try to create an ACL with privileges for a ROLE.  You can see here http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_networkacl_adm.htm#BABIGEGG than the official Oracle documentation states that you can assign the ACL principal to be a user or role:
    Parameter
    Description
    acl
    Name of the ACL. Relative path will be relative to "/sys/acls".
    description
    Description attribute in the ACL
    principal
    Principal (database user or role) to whom the privilege is granted or denied. Case sensitive.
    My issue is that when I try to create the ACL for a role it doesn't work.
    Have you ever created an ACL for a role? if so please send me an example or let me know which step I might be missing.  Cheers.

  • Oracle 11gR2 - RAC to RAC replication via SAN

    Hi,
    Anyone there experience before on Oracle 11gr2 RAC to RAC via EMC SRDF setup? Please share some information and also provide links if there is any white paper/technical paper.
    Thanks
    Edited by: 858013 on May 11, 2011 12:10 AM

    In SAN replication, the database instance at the remote site cannot be started up and running as the SAN cannot allow read-write access to the filesystems.
    When the primary site goes down, you simply issue a STARTUP at the remote site --- provided that the SAN replication has guaranteed write ordering, else you will have a corrupted database. That is why it is very important to talk to your SAN storage vendors to get the replication setup correctly.
    (If the replication is correctly done, the STARTUP will "see" that the database files are fuzzy and that the onlin redo log files are available and attempt an Instance Recovery -- as if the instance / server had crashed or suffered a shutdown abort).
    Hemant K Chitale

  • ORACLE 11gR2 RAC on Fedora 14 unsing qemu

    Is it possible to install ORACLE 11gR2 RAC on FEDORA 14 using Virtual machine based on qemu which is by default available with FEDORA 14.
    Can someone have any hint. I know this is not supported by ORACLE Corporation, But for learning purpose this would be great help.

    Hi,
    Not sure about gemu but you can easily setup a system using virtualbox since this is for learning shouldn't make much difference how you set it up.
    http://www.asanga-pradeep.blogspot.com/2010/10/10gr2-rac-on-rhel-4-using-virtualbox.html
    http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnOEL5UsingVirtualBox.php
    http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnOEL5UsingVMwareServer2.php

  • Question on Ordered Hint

    oracle 10g
    hi all i attended an interview yesterday and i interviewer asked me a couple of questions
    For which i dont have an exact answer. i even tried to search on web but i couldn't find the answer.
    1. The ordered  hint is used in conjunction with what?  and why?.
       i explained what ordered hint is but he is not happy.
    2. performance of analytical function vs query with sub-query .
    i voted for analytical function, interviewer said that analytical functions are slow.please help me to find answers.
    thanks
    Edited by: new learner on Jul 30, 2010 7:17 AM

    new learner wrote:
    thanks for the response.
    why do we need to use other hints in conjunction with ordered hint for ordered hint to work.
    why cant i say
    Select /*+ordered*/
    from table_a a , table_b b
    where a.id = b.id ;
    To expand on Dom's comment, you can say it, but if you're going to try to dictate details like this to the optimizer you should also tell it what join method you expect it to use, and what access methods you expect it to use, e.g.
    /*+ ordered full(a) use_nl(b) index(b (id)) */Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    There is a +"Preview"+ tab at the top of the text entry panel. Use this to check what your message will look like before you post the message. If it looks a complete mess you're unlikely to get a response. (Click on the +"Plain text"+ tab if you want to edit the text to tidy it up.)
    +"Science is more than a body of knowledge; it is a way of thinking"+
    +Carl Sagan+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Ordered hint question

    Hi all, I have query, in ap_payselect app engine, which is taking a lot of time to execute. so i used ordered hint (/*+ ORDERED */).
    My question is, will that ordered hint change the result? will we get same result with ordered hint as it was with out ordered hint.
    Please help me.
    Thank you.

    The ORDERED hint won't change the result, that will remain the same. Only the explain plan (it is how Oracle will process the query behind the scene) and maybe the execution time could change (faster or slower).
    Find out more:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements006.htm#sthref659
    Nicolas.

  • Performace problem - and ORDERED hint

    Hello,
    The following query is from oracle application EBS 11i , running on 10203 instance.
    Its take about 28 hour before its finished.
    Its exection plan is very long about 150 lines.
    In order to keep it simple i pasted only the first 35 rows from the ORIGINAL plan.
    Id number 34 bellow shows that the unique index :"HZ_PARTIES_U1" fetched each and every row from the table (1,751,000 rows).
    |  34 | ===============>       INDEX UNIQUE SCAN           | HZ_PARTIES_U1                |  1751K
    SELECT * FROM TABLE(dbms_xplan.display_awr('9r0jrz9ygpt9f'));
    PLAN_TABLE_OUTPUT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
    SQL_ID 9r0jrz9ygpt9f                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    SELECT /*+ index(ap_bank_accounts)   */ TRX_ID, ROW_ID, TRX_NUMBER, AMOUNT
    FROM CE_222_TRANSACTIONS_V
    WHERE BANK_ACCOUNT_ID = :B8 AND CURRENCY_CODE = :B7 AND (:B6 IN ('CREDIT','NSF','REJECTED') OR TRX_TYPE = 'MISC')
    AND DECODE(:B6 , 'MISC_DEBIT', -1, 1) * AMOUNT BETWEEN :B2 * (1 - :B5 )
    AND :B2 * (1 + :B5 )
    AND TRX_DATE BETWEEN (:B1 - :B4 )
    AND (:B1 + :B3 )
    AND NOT EXISTS ( SELECT 'already matched trx' FROM IL_CE_REC WHERE TRX_ROWID = ROW_ID)
    ORDER BY ABS(:B2 -  AMOUNT), ABS(:B1 - TRX_DATE)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    Plan hash value: 1193373660                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    | Id  | Operation                                          | Name                         | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   0 | SELECT STATEMENT                                   |                              |       |       | 23321 (100)|          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   1 |  SORT ORDER BY                                     |                              |     3 |   228 | 23321  (16)| 00:01:02 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   2 |   NESTED LOOPS ANTI                                |                              |     3 |   228 | 23320  (16)| 00:01:02 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   3 |    VIEW                                            | CE_222_TRANSACTIONS_V        |     3 |   192 | 23320  (16)| 00:01:02 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   4 |     UNION-ALL                                      |                              |       |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   5 |      FILTER                                        |                              |       |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   6 |       FILTER                                       |                              |       |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   7 |        NESTED LOOPS                                |                              |     1 |   395 | 11668  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   8 |         NESTED LOOPS OUTER                         |                              |     1 |   359 | 11667  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |   9 |          NESTED LOOPS OUTER                        |                              |     1 |   323 | 11666  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  10 |           FILTER                                   |                              |       |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  21 |                      HASH JOIN                     |                              |     1 |   150 | 11648  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  22 |                       NESTED LOOPS                 |                              |     1 |    54 |     4   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  23 |                        NESTED LOOPS                |                              |     1 |    18 |     2   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  24 |                         TABLE ACCESS BY INDEX ROWID| AP_BANK_ACCOUNTS_ALL         |     1 |    13 |     2   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  25 |                          INDEX UNIQUE SCAN         | AP_BANK_ACCOUNTS_U1          |     1 |       |     1   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  26 |                         INDEX UNIQUE SCAN          | AP_BANK_BRANCHES_U1          |  2022 | 10110 |     0   (0)|          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  27 |                        INDEX RANGE SCAN            | FND_LOOKUP_VALUES_U1         |     1 |    36 |     2   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  28 |                       TABLE ACCESS BY INDEX ROWID  | AR_CASH_RECEIPTS_ALL         |     1 |    96 | 11643  (16)| 00:00:31 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  29 |                        INDEX RANGE SCAN            | AR_CASH_RECEIPTS_N8          |   211K|       |   882  (18)| 00:00:03 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  30 |                      VIEW PUSHED PREDICATE         | RA_HCUSTOMERS                |     1 |    15 |     4   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  31 |                       NESTED LOOPS                 |                              |     1 |    24 |     4   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  32 |                        TABLE ACCESS BY INDEX ROWID | HZ_CUST_ACCOUNTS             |     1 |    18 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  33 |                         INDEX UNIQUE SCAN          | HZ_CUST_ACCOUNTS_U1          |     1 |       |     2   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  34 | ===============>       INDEX UNIQUE SCAN           | HZ_PARTIES_U1                |  1751K|    10M|     1   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    |  35 |                     TABLE ACCESS BY INDEX ROWID    | AR_RECEIPT_METHODS           |     1 |     8 |     1   (0)| 00:00:01 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     When i added an ORDERED hint inside the view the plan changed as followed:
    |  30 |                      VIEW PUSHED PREDICATE         | RA_HCUSTOMERS                |     1 |    15 |     4   (0)| 00:00:01 |
    |  31 |                       NESTED LOOPS                 |                              |     1 |    24 |     4   (0)| 00:00:01 |
    |  32 |                        TABLE ACCESS BY INDEX ROWID | HZ_CUST_ACCOUNTS             |     1 |    18 |     3   (0)| 00:00:01 |
    |* 33 |                         INDEX UNIQUE SCAN          | HZ_CUST_ACCOUNTS_U1          |     1 |       |     2   (0)| 00:00:01 |
    |* 34 |  ==============>       INDEX UNIQUE SCAN           | HZ_PARTIES_U1                |     1 |     6 |     1   (0)| 00:00:01 |
    |* 35 |                     INDEX UNIQUE SCAN              | FND_LOOKUP_VALUES_U1         |     1 |    36 |     1   (0)| 00:00:01 |
    You can see that line 34 is now return just 1 row and not 1751K rows.Oracle documentaion : http://download.oracle.com/docs/cd/A97630_01/server.920/a96533/hintsref.htm said:
    You might want to use the ORDERED hint to specify a join order if you know something about the number of rows selected
    from each table that the optimizer does not.
    Since , i dont want to use the ORDERED hint , i would like to know what statistics information are missing to the optimizer ? What should i look for ?
    I have an uptodate statiscts , and bellow are the resoults .
    SQL> select table_name,last_analyzed,num_rows,blocks
      2  from dba_tables
      3  where table_name='HZ_PARTIES';
    TABLE_NAME                     LAST_ANAL   NUM_ROWS     BLOCKS
    HZ_PARTIES                     06-JUN-10    1760190      65325
    SQL>
    SQL>
    SQL> select count(*) from apps.HZ_PARTIES;
      COUNT(*)
       1771794
    SQL> select index_name,last_analyzed,num_rows,clustering_factor,blevel,distinct_keys
      2  from dba_indexes
      3  where table_name='HZ_PARTIES'
      4  and index_name like '%U1';
    INDEX_NAME                     LAST_ANAL   NUM_ROWS CLUSTERING_FACTOR     BLEVEL DISTINCT_KEYS
    HZ_PARTIES_U1                  06-JUN-10    1758162            158739          2       1758162Thanks for your help

    Nothing I can see in your in your post relates to the optimizer and you, yourself, wrote:
    Oracle documentaion : http://download.oracle.com/docs/cd/A97630_01/server.920/a96533/hintsref.htm  said:
    You might want to use the ORDERED hint
    {code}
    so clearly the Oracle documentation does say that.
    Either post in the correct forum, and explain your reasoning, or I can not help you further.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Oracle 11gR2 Performance Issue

    We have Oracle 11gR2 (11.2.0.2) database on HP-UX for GIS application.
    We recently upgraded this database from 10g to 11gR2, Everything is working good, no issue expect one month end process. This process hung because of Library Cache Wait (Concurrency). Whenever we start this process the Library Cache Wait is increasing and the process is not completing.
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Buffer Nowait %:  100.00       Redo NoWait %:  100.00
                Buffer  Hit   %:   99.49    In-memory Sort %:  100.00
                Library Hit   %:   22.90        Soft Parse %:   84.22
             Execute to Parse %:   41.06         Latch Hit %:   98.80
    Parse CPU to Parse Elapsd %:   26.78     % Non-Parse CPU:   79.40
    Shared Pool Statistics        Begin    End
                 Memory Usage %:   76.07   67.50
        % SQL with executions>1:   97.69   89.31
      % Memory for SQL w/exec>1:   97.20   98.96
    Top 5 Timed Foreground Events
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                               Avg
                                                              wait   % DB
    Event                                 Waits     Time(s)   (ms)   time Wait Class
    library cache lock                3,459,453      12,400      4   55.2 Concurrenc
    DB CPU                                            7,840          34.9
    cursor: mutex S                     811,819         933      1    4.2 Concurrenc
    cursor: pin S wait on X              21,339         813     38    3.6 Concurrenc
    db file sequential read              42,997         158      4     .7 User I/O
    ^LHost CPU (CPUs:    4 Cores:    4 Sockets:    1)
    ~~~~~~~~         Load Average
                   Begin       End     %User   %System      %WIO     %Idle
                    0.06      1.76      53.0       1.3       1.0      45.8
    Instance CPU
    ~~~~~~~~~~~~
                  % of total CPU for Instance:      54.3
                  % of busy  CPU for Instance:     100.1
      %DB time waiting for CPU - Resource Mgr:       0.0
    Memory Statistics
    ~~~~~~~~~~~~~~~~~                       Begin          End
                      Host Mem (MB):     32,666.4     32,666.4
                       SGA use (MB):      3,504.0      3,504.0
                       PGA use (MB):        278.2        324.2
        % Host Mem used for SGA+PGA:        11.58        11.72

    I used catupgrd.sql script to upgrade the database, installed 11g on same server in different home and used catupgrd.
    Parameter Value_
    SQL> show parameter opt
    NAME_COL_PLUS_SHOW_PARAM                           TYPE                             VALUE_COL_PLUS_SHOW_PARAM
    filesystemio_options                               string                           DIRECTIO
    object_cache_optimal_size                          integer                          102400
    optimizer_capture_sql_plan_baselines               boolean                          FALSE
    optimizer_dynamic_sampling                         integer                          2
    optimizer_features_enable                          string                           11.2.0.2
    optimizer_index_caching                            integer                          0
    optimizer_index_cost_adj                           integer                          100
    optimizer_mode                                     string                           ALL_ROWS
    optimizer_secure_view_merging                      boolean                          TRUE
    optimizer_use_invisible_indexes                    boolean                          FALSE
    optimizer_use_pending_statistics                   boolean                          FALSE
    optimizer_use_sql_plan_baselines                   boolean                          TRUE
    plsql_optimize_level                               integer                          2
    SQL>
    SQL>
    SQL> show parameter cursor
    NAME_COL_PLUS_SHOW_PARAM                           TYPE                             VALUE_COL_PLUS_SHOW_PARAM
    cursor_bind_capture_destination                    string                           memory+disk
    cursor_sharing                                     string                           SIMILAR
    cursor_space_for_time                              boolean                          FALSE
    open_cursors                                       integer                          2000
    session_cached_cursors                             integer                          200
    SQL>
    SQL> select * from ( select SQL_ID,VERSION_COUNT,EXECUTIONS from v$sqlarea order by VERSION_COUNT desc) where rownum<=20;
    SQL_ID        VERSION_COUNT EXECUTIONS
    0ynhd4qz3avdh          6453       9198
    b1kg0nth4ax9f          6410      15348
    7qscuaqtt32zb          4449      17243
    duntdcykba52p          2815       1325
    g06n424cwup4m          2457       2492
    2zgfq8kqqzcm7          1911       1205
    b67j985tf4gsw          1868       1740
    bmn1m6x3hq8cm          1467        155
    fdcvny2d9d6kw           783        405
    fphtsy5rd9gkq           401      21702
    771v4ntn6mqhg           293      12174
    g3dqmahsk5t8f           195       8200
    fhrh7858qhrm3           135       2454
    8xx3nxsndzyar           112        222
    f280fzy0a1bsb            70        263
    5rn144gqjkv53            64        125
    0v3dvmc22qnam            59         53
    f37373tqsbqhz            55         38
    f1gu4r0wbhfn3            44         81
    dcc7g533zymtm            41         83
    SQL ordered by Version Count - From AWR Report_
    SQL ordered by Version Count     DB/Inst: GISPROD/gisprod  Snaps: 23062-23063
    -> Only Statements with Version Count greater than 20 are displayed
    Version
      Count   Executions     SQL Id
       4,449        8,543 7qscuaqtt32zb
    Module: gsrvr.exe
    SELECT V__276.*, SHAPE.fid,SHAPE.numofpts,SHAPE.entity,SHAPE.points,SHAPE.row
    id FROM (SELECT b.OBJECTID,b.ENABLED,b.SHAPE FROM ARCFM.Electric_Network_Juncti
    ons b WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM ARC
    FM.D276 WHERE DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE
       2,940          N/A 0ynhd4qz3avdh
    SELECT OBJECTID, ENABLED, CREATIONUSER, DATECREATED, DATEMODIFIED, LASTUSE
    R, SUBTYPECODE, PHASINGCODE, FEEDERID, FEEDERID2, OPERVOLT, NEUTTYPE, NEU
    TSIZE, LOCATIONID, ASSEMBLYCODE, LENGTH, LENGTHSRC, COMMENTS, FDRMGRNONTRA
    CEABLE, LABELTEXT, ELECTRICTRACEWEIGHT, FEEDERINFO, RATEDVOLT, CONDUITFLG,
       2,006          N/A b1kg0nth4ax9f
    SELECT V__159.*, SHAPE.fid,SHAPE.numofpts,SHAPE.entity,SHAPE.points,SHAPE.row
    id FROM (SELECT b.OBJECTID,b.ANCILLARYROLE,b.ENABLED,b.CREATIONUSER,b.DATECREATE
    D,b.DATEMODIFIED,b.LASTUSER,b.SUBTYPECODE,b.FACILITYID,b.LOCATIONID,b.PHASINGCOD
    E,b.OPERATINGVOLTAGE,b.FEEDERID,b.FEEDERID2,b.ASSEMBLYCODE,b.COMMENTS,b.SYMBOLRO
       1,765           65 duntdcykba52p
    Module: gsrvr.exe
    SELECT SWITCHTYPE FROM (SELECT b.OBJECTID,b.CREATIONUSER,b.DATECREATED,b.DATEM
    ODIFIED,b.LASTUSER,b.FACILITYID,b.PHASINGCODE,b.MANUFACTURER,b.SUBTYPECODE,b.SWI
    TCHID,b.SWITCHTYPE,b.SWITCHRATING,b.LEGACYSWITCHID,b.WORKREQUESTID,b.DESIGNID,b.
    WORKLOCATIONID,b.WORKFLOWSTATUS,b.WORKFUNCTION FROM ARCFM.SwitchUnit b WHERE b.
       1,467           19 bmn1m6x3hq8cm
    Module: gsrvr.exe
    select privilege from user_sys_privs where privilege in (:"SYS_B_0",:"SYS_B_1",:
    "SYS_B_2",:"SYS_B_3") UNION select privilege from role_sys_privs where privilege
    in (:"SYS_B_4",:"SYS_B_5",:"SYS_B_6",:"SYS_B_7")
       1,467           19 bmn1m6x3hq8cm
    Module: gsrvr.exe
    select privilege from user_sys_privs where privilege in (:"SYS_B_0",:"SYS_B_1",:
    "SYS_B_2",:"SYS_B_3") UNION select privilege from role_sys_privs where privilege
    in (:"SYS_B_4",:"SYS_B_5",:"SYS_B_6",:"SYS_B_7")
         991          N/A 2zgfq8kqqzcm7
    SELECT OBJECTID, ENABLED, CREATIONUSER, DATECREATED, DATEMODIFIED, LASTUSE
    R, SUBTYPECODE, PHASINGCODE, FEEDERID, FEEDERID2, OPERVOLT, NEUTTYPE, NEU
    TSIZE, LOCATIONID, ASSEMBLYCODE, LENGTH, LENGTHSRC, COMMENTS, FDRMGRNONTRA
    CEABLE, LABELTEXT, ELECTRICTRACEWEIGHT, FEEDERINFO, RATEDVOLT, CONSTR, PHA
    Active Session History
    ASH Report For GISPROD/gisprod
    DB Name         DB Id    Instance     Inst Num Release     RAC Host
    GISPROD       1774954232 gisprod             1 11.2.0.2.0  NO  hublhp9
    CPUs           SGA Size       Buffer Cache        Shared Pool    ASH Buffer Size
       4      4,078M (100%)     1,168M (28.6%)     1,933M (47.4%)              M (%)
              Analysis Begin Time:   06-Feb-12 08:00:00
                Analysis End Time:   06-Feb-12 08:01:00
                     Elapsed Time:         1.0 (mins)
                Begin Data Source:   DBA_HIST_ACTIVE_SESS_HISTORY
                                     in AWR snapshot 23062
                  End Data Source:   DBA_HIST_ACTIVE_SESS_HISTORY
                                     in AWR snapshot 23063
                     Sample Count:           2
          Average Active Sessions:        0.33
      Avg. Active Session per CPU:        0.08
                    Report Target:   None specified
    Top User Events              DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                                                                   Avg Active
    Event                               Event Class        % Event   Sessions
    CPU + Wait for CPU                  CPU                  50.00       0.17
    Top Background Events        DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                                                                   Avg Active
    Event                               Event Class     % Activity   Sessions
    CPU + Wait for CPU                  CPU                  50.00       0.17
    Top Event P1/P2/P3 Values    DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top Service/Module           DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
    Service        Module                   % Activity Action               % Action
    SYS$BACKGROUND MMON_SLAVE                    50.00 Auto-Flush Slave A      50.00
    SYS$USERS      ArcMap.exe                    50.00 UNNAMED                 50.00
    Top Client IDs               DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top SQL Command Types        DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
    -> 'Distinct SQLIDs' is the count of the distinct number of SQLIDs
          with the given SQL Command Type found over all the ASH samples
          in the analysis period
                                               Distinct            Avg Active
    SQL Command Type                             SQLIDs % Activity   Sessions
    INSERT                                            1      50.00       0.17
    SELECT                                            1      50.00       0.17
    Top Phases of Execution      DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                                              Avg Active
    Phase of Execution             % Activity   Sessions
    SQL Execution                       50.00       0.17
    Top SQL with Top Events     DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                                                            Sampled #
                     SQL ID             Planhash        of Executions     % Activity
    Event                          % Event Top Row Source                    % RwSrc
              2prbzh4qfms7u           2500066303                    1          50.00
    CPU + Wait for CPU               50.00 FIXED TABLE - FULL                  50.00
    insert into wrh$_latch_children (snap_id, dbid, instance_number, latch_hash, c
    hild#, gets, misses, sleeps, immediate_gets, immediate_misses, spin_gets, sle
    ep1, sleep2, sleep3, sleep4, wait_time) select :snap_id, :dbid, :instance
    _number, hash, child#, gets, misses, sleeps, immediate_gets, immediate_misses
              a4w3b09vg8705             52468664                    1          50.00
    CPU + Wait for CPU               50.00 SELECT STATEMENT                    50.00
    SELECT PROCESS.MM_PX_CURRENT_STATE.*, PROCESS.MM_PX_CURRENT_STATE."ROWID" FROM
    PROCESS.MM_PX_CURRENT_STATE
    Top SQL with Top Row Sources DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                                                            Sampled #
                     SQL ID             PlanHash        of Executions     % Activity
    Row Source                               % RwSrc Top Event               % Event
              2prbzh4qfms7u           2500066303                    1          50.00
    FIXED TABLE - FULL                         50.00 CPU + Wait for CPU        50.00
    insert into wrh$_latch_children (snap_id, dbid, instance_number, latch_hash, c
    hild#, gets, misses, sleeps, immediate_gets, immediate_misses, spin_gets, sle
    ep1, sleep2, sleep3, sleep4, wait_time) select :snap_id, :dbid, :instance
    _number, hash, child#, gets, misses, sleeps, immediate_gets, immediate_misses
              a4w3b09vg8705             52468664                    1          50.00
    SELECT STATEMENT                           50.00 CPU + Wait for CPU        50.00
    SELECT PROCESS.MM_PX_CURRENT_STATE.*, PROCESS.MM_PX_CURRENT_STATE."ROWID" FROM
    PROCESS.MM_PX_CURRENT_STATE
    Top SQL using literals       DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top Parsing Module/Action    DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top PL/SQL Procedures        DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top Java Workload            DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top Call Types               DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
    Call Type                                     Count % Activity Avg Active
    FETCH                                             1      50.00       0.17
    Top Sessions                DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
    -> '# Samples Active' shows the number of ASH samples in which the session
          was found waiting for that particular event. The percentage shown
          in this column is calculated with respect to wall clock time
          and not total database activity.
    -> 'XIDs' shows the number of distinct transaction IDs sampled in ASH
          when the session was waiting for that particular event
    -> For sessions running Parallel Queries, this section will NOT aggregate
          the PQ slave activity into the session issuing the PQ. Refer to
          the 'Top Sessions running PQs' section for such statistics.
       Sid, Serial# % Activity Event                             % Event
    User                 Program                          # Samples Active     XIDs
           23, 8635      50.00 CPU + Wait for CPU                  50.00
    JOHNSONV             ArcMap.exe                             1/6 [ 17%]        0
          150,  963      50.00 CPU + Wait for CPU                  50.00
    SYS                  oracle@hublhp9 (M000)                  1/6 [ 17%]        0
    Top Blocking Sessions        DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top Sessions running PQs    DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top DB Objects               DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top DB Files                 DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Top Latches                  DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
                      No data exists for this section of the report.
    Activity Over Time          DB/Inst: GISPROD/gisprod  (Feb 06 08:00 to 08:01)
    -> Analysis period is divided into smaller time slots
    -> Top 3 events are reported in each of those slots
    -> 'Slot Count' shows the number of ASH samples in that slot
    -> 'Event Count' shows the number of ASH samples waiting for
       that event in that slot
    -> '% Event' is 'Event Count' over all ASH samples in the analysis period
                             Slot                                   Event
    Slot Time (Duration)    Count Event                             Count % Event
    08:00:00   (60 secs)        2 CPU + Wait for CPU                    2  100.00
    End of Report

  • Install Oracle 11gR2 RAC : Cannot remove directory bootstrap under /tmp

    Folks,
    Hello. I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer and according to the tutorial
    http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
    I am installing Grid infrastructure. I am on step 7 of 10 (verify Grid installation enviroment) and get this error:
    "Free Space: Rac2: /tmp
    Cause: Could not determine mount point for location specified.
    Action: Ensure location specified is available.
    Expected value: n/a
    Actual value: n/a "
    In order to fix the above error, I run "cluster verification utility" according to
    http://docs.oracle.com/cd/E14072_01/rac.112/e10717/cvu.htm I run the following command:
    [ora11g@rac1 \]$ /home_grid/runcluvfy.sh stage -pre crsinst -n rac1,rac2 -verbose
    Output:
    /bin/rm: cannot remove directory '/tmp/bootstrap': Operation not permitted
    ./runcluvfy.sh:line 99:/tmp/bootstrap/ouibootstrap.log: permission denied
    From the above output, we can see the directory bootstrap under /tmp causes the problem. The solution is to remove the directory bootstrap. I run the 2 commands:
    [ora11g@rac1 tmp]$ rmdir bootstrap
    Output: Operation not permitted
    [ora11g@rac1 tmp]$ rm -rf bootstrap
    Output: cannot remove bootstrap: Operation not permitted.
    [ora11g@rac2 tmp]$ ls
    Output: there is no 'bootstrap' directory.
    My questions are:
    First, does "cannot remove boostrap in rac1" cause that /tmp in rac2 could not be determine mount point ?
    Second, can any folk help to remove the directory bootstrap under /tmp ?
    Thanks.

    Folks,
    Hello. Thanks a lot for replying. I have just run the 2 commands:
    [root@rac2 \]# chown -R ora11g:dba /u01
    [root@rac2 \]# chmod -R 775 /u01
    ora11g is the user who installs the Grid and /u01 is the directory where Grid is installed and dba is the group.
    I go back to Grid Installer Step 7 of 10 in rac1 and check again and see as below:
    Free Space: Rac2 : /tmp
    Cause: Could not determine mount point for location specified.
    Action: Ensure location specified is available
    Expected Value: n/a
    Actual Value: n/a
    The problem is not solved after run the above 2 commands in rac2.
    In addition, I have run Cluster Verification Utility using the command:
    [ora11g@rac1 grid]./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -r 11gR2 -orainv ora11g -verbose
    Output: All of items for rac2 are passed. There is only one item for rac1 is failed as below:
    Check default user file creation mask:
    NodeName: rac1
    Available: 0002
    Required: 0022
    Comment: failed
    As we see above, the result of CVU command is not the same with Grid Installer step 7 of 10 (Installation Environment Verification):
    CVU command doesn't find /tmp mount point problem for rac2 that Grid Installer does.
    Grid Installer step 7 of 10 doesn't find user file creation mask problem for rac1 that CVU command does.
    I have tried to find out whether creation mask failed for rac1 causes /tmp problem for rac2. I have changed the line "umask 002" to "umask 0022" for rac1 in each of the 3 files below and run CVU command each time for each file:
    rac1:
    /etc/bashrc
    /etc/profile
    /etc/csh.cshrc
    But chang the line "umask 002" to "umask 0022" for rac1 in each of the above 3 files does not solve the problem.
    My questions are:
    First, why is the result of CVU command not the same with that of Grid Installer step 7 of 10 ?
    Second, why change the line "umask 002" to "umask 0022" in 3 files can't solve creation mask problem for rac1 ?
    Third, how to solve /tmp problem for rac2 and creation mask problem for rac1 ?
    Thanks.

  • Reinstalling Oracle 11gR2 RAC Grid Problem - ASM Disks Group

    Folks,
    Hello.
    I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer.
    I have been installing Grid Infrastructure using runInstaller in the first VM rac1 from step 1 to step 9 of 10.
    On the step 9 of 10 in the Wizard, accidentally, I touch the Mouse, and the Wizard is gone.
    The directory for installing Grid in the 2 VMs is the same: /u01
    In order to make sure everything is correct, I delete entire directory /u01 in the 2 VMs and install Grid in rac1 again.
    I have understood it's not the right way to delete /u01. The right way is to follow the tutorial
    http://docs.oracle.com/cd/E11882_01/install.112/e22489/rem_orcl.htm#CBHEFHAC
    But I have deleted /u01 and need to fix one by one. I install Grid again and get the error message on step 5 of 9 as follows:
    [INS - 30516] Please specify unique disk groups.
    [INS-3050] Empty ASM disk group.
    Cause - Installer has detected the disk group name provided already exists on the system.
    Action - Specify different disk group.
    In Wizard, the previous Disk Group name is "DATA" and its Candidate disks (5 ASMDISKs) are gone. I try to use a different name "DATA2", but no ASMDISKs come up under "Candidate disks". For "ALL Disks", all ASMDISKs cannot be selected.
    I want to use the same ASM disk group "DATA" and don't want to create a new disk group.
    My question is:
    How to have the previous ASM disks and its group "DATA" come up under "Candidate Disks" so that can use it again ?
    Thanks.

    Hi, in case this helps anyone else. I got this INS-30516 error too was stumped for little while. I have 2 x 2-node RAC which are hitting same SAN. The first-built RAC has a DATA diskgroup. When went to build second RAC on new ASM disk new DIskgroup (but same diskgroup name DATA) got INS-30516 about diskgroup name already in use etc. Finally figured out all that was required was to restrict diskstring using button in installer to only retrieve the LUNS for this RAC (this was quick and dirty - all LUNS for both RAC being presented to both RAC). Once diskstring only searched for the LUNS required for this RAC only, e.g.
    ORCL:DATA_P* (for DATA_PD and FRA_PD)
    the error went away.
    I also have DATA_DR and FRA_DR presenting to both RAC. Apparently it scans the header and if it finds a diskgroup name that is already in use based on the diskstring scan it will not allow reuse of the diskgroup name since it has no way of knowing that the other ASM disks are for a different RAC.
    HTH

Maybe you are looking for

  • Problem with Double Buffering and Swing

    Hi I made a game and basically it works pretty well, my only problem is it flickers really badly right now. I read up on a whole lot of forums about double buffering and none of those methods seemed to work. Then I noticed that Swing has double buffe

  • Bad experience with HP

    A STORY OF YOUR TROUBLED CUSTOMER I write this story regretting two things. First the reputation that HP laptops had, is diminishing and second that I bought an HP laptop. (HP notebook G6-2201ax) The story begins in an emotional and a typical Indian

  • Error - opening a web query from my favorite or roles

    I am trying to open a query saved as web query from my favorite folder or user menu. I got error when processing the request. Below is the detailed error. Error when processing your request What has happened? The URL http://p2pr3.ittind.com:8000/sap/

  • Colour Calibration for 24" iMac and setting up an ICC profile

    Hi, Can anyone recommend a way for calibrating the display of a 24" iMac (not too expensive)? I will mainly be using Photoshop, Aperture and web browsing (I do not need for business, but like to have the best set up possible). Also, on a similar note

  • Raid unmounts on G5 maybe 10.4.3 update problem

    So here is the background : my g5 runs off a striped raid which has run flawlessly for 2 Months A week after installing 10.4.3 I had a lock up on the computer Restart, no joy Start using OSx disk: raid offline, disks are irrepairable in disk utitlity