Sunday, October 25, 2009

How to export users from OID and import in EBS?

Export Users from OID

You can export users from OID based on time range.

  1. Login to OID server
  2. Execute given below script to export users from OID which can be imported in EBS.

    SCRIPT

    $ cat expoidusr.sh

    . $ORACLE_HOME/iasenv.sh # OID Oracle Home

    echo "This program will list oid users created during some time period, who can be imported in EBS "

    echo "Enter Connect String name :\c"

    read CONNECT

    echo "Enter time stamp From (YYYYMMDDHHMISS) :\c"

    read TIMEFROM

    echo "Enter time stamp To (YYYYMMDDHHMISS) :\c"

    read TIMETO

    echo "Export OID users in given duration. Output file name is output.ldif"

    $ORACLE_HOME/ldap/bin/ldifwrite connect="$CONNECT" basedn="cn=users,dc=orbit, dc=org" –f output.ldif filter="(&(objectclass=person)(createtimestamp >= "$TIMEFROM")(createtimestamp <= "$TIMETO"))"

     

    EXECUTION

    $expoidusr.sh

    This program will list oid users created during some time period, who can be imported in EBS

    Enter Connect String name : JAISSOD

    Enter time stamp From (YYYYMMDDHHMISS) :20090814051502

    Enter time stamp To (YYYYMMDDHHMISS) :20090824083000

    Export OID users in given duration. Output file name is output.ldif

    This tool can only be executed if you know database user password for OID

    Enter OID Password ::<***********>

    ------------------------------------------------------------

    Reading entries under BaseDN "cn=users,dc=orbit, dc=org"...

    -------------------------------------------------------------

    Noteà You need to enter orcladmin password.

     

Import OID users in FND_USER in EBS 11i

  1. Login oracle applications 11i

     

  2. Import users by executing given below script

     

    SCRIPT

    $ cat impoidtoesb11i.sh

    if [ -f "$FILE" ]

    then

    echo "File $FILE is available ..."

    else

    echo "Unable to locate $FILE ..."

    exit

    fi

     

    . $APPL_TOP/APPSORA.env

    export CLASSPATH=$COMMON_TOP/java:$CLASSPATH

    JAVA_HOME=`set | grep AF_JRE | awk -F "=" ' { print $2 }'`

    DBCFILE="$FND_TOP"/secure/`grep s_dbc_file_name $CONTEXT_FILE | sed 's/^.*s_dbc_file_name[^>.]*>[ ]*\([^<]*\)<.*/\1/g; s/ *$//g'`.dbc

     

    if [ -f $DBCFILE ]

    then

    echo "DBC $DBCFILE exits..."

    else

    echo "Unable to locate dbc file ..."

    exit

    fi

     

    cd $COMMON_TOP/java

    $JAVA_HOME/jre/bin/java oracle.apps.fnd.oid.LDAPUserImport \

    -v \

    -dbc "$DBCFILE" \

    -f "$FILE" \

    -n uid \

    -l $HOME/usersimp.log

    cd -

    echo "Please check $HOME/usersimp.log file user import detail."

     

    EXECUTION

    $ impoidtoesb11i.sh

    Enter output file location : output.ldif

    File output.ldif is available ...

    DBC /opt01/app/jaiappl/fnd/11.5.0/secure/jai0504e_jaid1.dbc exits...

    LDAP user import from /staging/diagnosis/jsingh/sso/output.ldif started..

    LDAP user import completed sucessfully. For further details refer to log file at /home/orajaid1/usersimp.log

    /home/jaid1

    Please check /home/orajaid1/usersimp.log file user import detail.

     

  3. Verify userimp.log generated in step 2 for failed user import.

 

     

No comments: