• AutoConfig 20.11.2008 Comments Off

    The environment variable CONTEXT_FILE will contain the correct path to the context file respectively for the apps and db tiers (when logged in as the db ower and apps owner respectively).

    APPS

    The command adconfig.sh should also exist on the respective user’s path. Run the adconfig.sh command. It will ask for the context file path and the password for the db APPS user.

    DB

    adconfig.sh is located at $ORACLE_HOME/appsutil/bin/adconfig.sh

    It will also need the context file path and the APPS password

    BACKOUT APPS CHANGES

    restore script is located at $INST_TOP/admin/out/restore.sh

  • Patching 20.11.2008 Comments Off

    unzip the patch then run:

    adpatch defaultsfile=$APPL_TOP/admin/<INST_NAME>/adalldefaults.txt  patchtop=<path_to_top_patch_dir>

  • SQL & PL/SQL, SQLPLUS 17.11.2008 Comments Off
    SELECT a, b, c
    FROM
    ( SELECT a, b, c, ROWNUM rn
      FROM
      ( SELECT a, b, c FROM RECORD
        WHERE AVAIL='Y"
        ORDER BY DATE DESC
      )
      WHERE ROWNUM <= 25
    )
    WHERE rn >= 21;
    
    This clunky code is the equivalent of mysql's elegant:
    select a,b,c from record limit 5 offset 4;
  • HEADS UP, Linux, SQLPLUS 11.11.2008 Comments Off

    install rlwrap (available from http://utopia.knoware.nl/~hlub/rlwrap/)

    then add this to the bash_profile:

    alias sqlplus=’rlwrap sqlplus’

  • Cloning 06.11.2008 Comments Off

    run export KSH_VERSION=’@(#)PD KSH v5.2.14 99/07/13.2′

    before running adcfgclone.pl on both dbTier and appsTier

    metalink docid 406982.1

  • Problems 06.11.2008 Comments Off

    iptables -A OUTPUT -p tcp -s 0/0 -d  141.146.57.56 –dport 25 -j REJECT –reject-with tcp-reset

  • DB Environment Vars 27.10.2008 Comments Off

    cat /d01/oracle/VIS1/db/tech_st/10.2.0/VIS1_oraapps.env
    #!/bin/sh
    # $Header: ad8idbux.env 120.6.12000000.2 2007/07/02 13:18:28 dhakumar ship $
    # =============================================================================
    # NAME
    # VIS1.env
    #
    # DESCRIPTION
    # Setup environment for Oracle
    #
    # NOTES
    #
    # HISTORY
    # Created by AutoConfig
    # =============================================================================
    #
    # ###############################################################
    #
    # This file is automatically generated by AutoConfig. It will be read and
    # overwritten. If you were instructed to edit this file, or if you are not
    # able to use the settings created by AutoConfig, refer to Metalink Note
    # 387859.1 for assistance.
    #
    # ###############################################################

    #

    ######################################
    # Unset all the variables NOT required
    ######################################

    unset TWO_TASK

    unset ORA_NLS33

    unset USERPATH

    #####################################
    # Source the custom file if it exists
    #####################################

    customfile=/d01/oracle/VIS1/db/tech_st/10.2.0/customVIS1_oraapps.env
    if [ -f $customfile ]; then
    . /d01/oracle/VIS1/db/tech_st/10.2.0/customVIS1_oraapps.env
    fi

    ############################
    # Set the variables required
    ############################

    ORACLE_HOME=”/d01/oracle/VIS1/db/tech_st/10.2.0″
    export ORACLE_HOME

    ORACLE_SID=”VIS1″
    export ORACLE_SID

    ORA_NLS10=”/d01/oracle/VIS1/db/tech_st/10.2.0/nls/data/9idata”
    export ORA_NLS10

    PATH=”/d01/oracle/VIS1/db/tech_st/10.2.0/bin:/usr/bin:/usr/sbin:/d01/oracle/VIS1/db/tech_st/10.2.0/appsutil/jre/bin:/bin:/usr/bin/X11:/usr/local/bin:$PATH”
    export PATH

    LINK_CNTRL=”"
    export LINK_CNTRL

    TNS_ADMIN=”/d01/oracle/VIS1/db/tech_st/10.2.0/network/admin/VIS1_oraapps”
    export TNS_ADMIN

    if test “LINUX_X86-64″ = “IBM AIX”; then
    export AIXTHREAD_SCOPE=S
    fi

    ####################################################################
    # The CONTEXT_FILE variable stores the location of the context file.
    ####################################################################

    CONTEXT_FILE=”/d01/oracle/VIS1/db/tech_st/10.2.0/appsutil/VIS1_oraapps.xml”
    export CONTEXT_FILE

    ####################################################################
    # The CONTEXT_NAME variable stores the value for the current context
    ####################################################################

    CONTEXT_NAME=”VIS1_oraapps”
    export CONTEXT_NAME

    ##################
    # Set Library Path
    ##################

    LD_LIBRARY_PATH=”/d01/oracle/VIS1/db/tech_st/10.2.0/lib:/usr/X11R6/lib:/usr/openwin/lib:/d01/oracle/VIS1/db/tech_st/10.2.0/lib:/usr/dt/lib:/d01/oracle/VIS1/db/tech_st/10.2.0/ctx/lib”
    export LD_LIBRARY_PATH

    SHLIB_PATH=”/d01/oracle/VIS1/db/tech_st/10.2.0/lib:/usr/lib:/d01/oracle/VIS1/db/tech_st/10.2.0/ctx/lib”
    export SHLIB_PATH

    LIBPATH=”/d01/oracle/VIS1/db/tech_st/10.2.0/lib:/usr/X11R6/lib:/usr/openwin/lib:/d01/oracle/VIS1/db/tech_st/10.2.0/lib:/usr/dt/lib:/d01/oracle/VIS1/db/tech_st/10.2.0/ctx/lib”
    export LIBPATH

    #######################################
    # Add perl to the PATH and set PERL5LIB
    #######################################

    PERLBIN=`dirname /d01/oracle/VIS1/db/tech_st/10.2.0/perl/bin/perl`

    PATH=${PERLBIN}:${PATH}
    export PATH

    PERL5LIB=/d01/oracle/VIS1/db/tech_st/10.2.0/perl/lib/5.8.3:/d01/oracle/VIS1/db/tech_st/10.2.0/perl/lib/site_perl/5.8.3:/d01/oracle/VIS1/db/tech_st/10.2.0/appsutil/perl
    export PERL5LIB

    ADPERLPRG=/d01/oracle/VIS1/db/tech_st/10.2.0/perl/bin/perl
    export ADPERLPRG

    #################################################
    # National Language Support environment variables
    #################################################

    NLS_LANG=”American_America.UTF8″
    export NLS_LANG

    NLS_DATE_FORMAT=”DD-MON-RR”
    export NLS_DATE_FORMAT

    NLS_NUMERIC_CHARACTERS=”.,”
    export NLS_NUMERIC_CHARACTERS

    NLS_SORT=”binary”
    export NLS_SORT

    #############################
    # Set java program used by AD
    #############################

    ADJVAPRG=”/d01/oracle/VIS1/db/tech_st/10.2.0/appsutil/jre/bin/java”
    export ADJVAPRG

    ADJREOPTS=”-Xms128M -Xmx512M”
    export ADJREOPTS

    #############################
    # Timezone Specification file
    #############################

    ORA_TZFILE=”$ORACLE_HOME/oracore/zoneinfo/timezlrg.dat”
    export ORA_TZFILE

    [root@oraapps ~]#