Tuesday, February 25, 2014

F00165 Change Media Object Location


Media Object Change Location

1. Change New Location in P98MOQUE
2. Copy Media Object File to new Location
3. Update F00165 Table


UPDATE PRODDTA.F00165 SET GDGTFILENM = REPLACE(RTRIM(GDGTFILENM),'\\OldMachine\E900\MEDIAOBJ\HTMLUpload\','\\OldMachine\E900\MEDIAOBJ\HTMLUpload\') WHERE GDGTFILENM LIKE '%\\OldMachine\E900\MEDIAOBJ\HTMLUpload\%';

Weblogic Start Admin Server and managed Server on Reboot



#!/bin/bash
#
# oracle Init file for starting and stopping WLS
# Created by Vivek Jain
# chkconfig: 35 80 30
# description: Oracle WLS startup script
# Source function library
# chmod 755 /etc/init.d/wls
# chkconfig --add wls --level 0356
# nodemanager properties CrashRecoveryEnabled=true,StartScriptEnabled=true


. /etc/rc.d/init.d/functions

ORACLE_OWNER="oracle"
MW_HOME="/u01/app/Oracle/Middleware"
DOMAIN_HOME="/u01/app/Oracle/Middleware/user_projects/domains/E1_HTTP_PD"

case "$1" in
start)
echo -n $"Starting WLS:"
su - $ORACLE_OWNER -c "nohup /u01/JDE_HOME/SCFHA/bin/startAgent > /dev/null &"
su - $ORACLE_OWNER -c "nohup $MW_HOME/wlserver_10.3/server/bin/startNodeManager.sh > $MW_HOME/wlserver_10.3/common/nodemanager/nodemanager.out 2>&1 &"
su - $ORACLE_OWNER -c "nohup $DOMAIN_HOME/bin/startWebLogic.sh > $DOMAIN_HOME/servers/AdminServer/logs/AdminServer.out 2>&1 &"
echo "OK"
;;
stop)
echo -n $"Stopping WLS:"
su - $ORACLE_OWNER -c "nohup $DOMAIN_HOME/bin/stopWebLogic.sh > $DOMAIN_HOME/servers/AdminServer/logs/AdminServer.out 2>&1 &"
ps -ef | grep NodeManager | grep -v grep | awk '{system("kill -9 "$2)}'
su - $ORACLE_OWNER -c "nohup /u01/JDE_HOME/SCFHA/bin/stopAgent > /dev/null &"
echo "OK"
;;
restart)
echo -n $"Re-Starting WLS:"
stop
sleep 3
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
esac

Thursday, February 20, 2014

Reset Weblogic admin password

 How to change WEBLOGIC Console admin password for 11g (10.3)

1-First set environment variables
export BEAHOME=/u01/app/oracle/product/middleware
export DOMAIN_HOME=$BEAHOME/user_projects/domains/base_domain
export CLASSPATH=$CLASSPATH:$BEAHOME/wlserver_10.3/server/lib/weblogic.jar
cd $DOMAIN_HOME/bin
. ./setDomainEnv.sh

2- Now execute the command below to create the new password
cd ../security
mv DefaultAuthenticatorInit.ldift oldDefaultAuthenticator
java weblogic.security.utils.AdminAccount weblogic new_password . --DON'T FORGET THE "."


3- If it exists remove boot.properties file

cd ../servers/AdminServer
mv data data_old
cd security/
mv boot.properties oldboot.properties

4- Restart Weblogic server

cd $DOMAIN_HOME./startWebLogic.sh

Saturday, February 1, 2014

How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile

Accident may happens, even though it’s costly one. This is especially the case in Oracle database, which stores the database objects physically in data files on hard disk. Fast hand administrators may accidentally delete some of the datafiles, or the datafiles may get corrupted or unreadable on hard disk failure. You may get also some missing datafiles after database recovery process. In any case, missing a or a few datafiles will cause Oracle database to fail to startup, rendering the whole DB inaccessible.

The solution to the missing datafiles is to drop the affected tablespace where has incomplete datafiles, and then recreate the tablespace and import the data into the tablespace from backup. However, the steps are not so straight forward.


  1. Run SQL*Plus.
  2. Connect to database as SYSDBA with this query: CONNECT / AS SYSDBA
  3. Mount the database instead of starting it up: STARTUP MOUNT;
  4. Issue the following command to bring the missing datafile offline so that Oracle won’t trying to connect and access the datafile anymore: ALTER DATABASE DATAFILE ‘’ OFFLINE DROP;
    Repeat the command for every datafiles that unaccounted for.
  5. Now start the database proper: ALTER DATABASE OPEN;
  6. As the tablespace has damaged, drop it to recreate from fresh backup. DROP TABLESPACE INCLUDING CONTENTS;
  7. Ensure the other datafiles for the tablespace has been deleted, if not, remove them manually from the operating system. Tip: How to check datafiles that belong to tablespace.
  8. Continue with the recovery process.

Saturday, November 9, 2013

Java HotSpot Options


Run Large Batch on Change Assistant



E1: CHA: Applying a Large Batch of ESUs, Such as Fix Current, Creates Many Pop-Up Errors: "Business function Library load failed - E:\JDEdwards\E900\PLANNER\bin32\CHRM.dll" (Doc ID 1353471.1)

We all might see this issue when applying big batch of ESU.  At this point there is no resolution from Oracle also.

I have done some changes in CHA start parameter and this has resolved. Here is a solution I tested –

Change Target parameter from. This is for 64 bit Windows Deployment Server

Right click Change Assistant - > Properties - > Target

C:\Windows\SysWOW64\javaws.exe -localfile "C:\Users\jdeservice\AppData\LocalLow\Sun\Java\Deployment\cache\xxxxxxxxxxxxxx"

Add –Xms and –Xmx parameter as shown below.  Note the localfile path should be kept same and only add Java memory parameters.

C:\Windows\SysWOW64\javaws.exe -Xms=256m -Xmx=2048m -localfile "C:\Users\jdeservice\AppData\LocalLow\Sun\Java\Deployment\cache\xxxxxxxxxxxx"

Test this and share your result on comment.


Friday, August 9, 2013

Start JDE Queue's

Start Queue manually



Go to system/bin32 on Enterprise Server

For Windows -
jdequeue.exe JDE jdepassword PD910 QB7333 UBE 5

For Unix -
runque.sh JDE jdepassword PD910 QB7333 UBE 5

where jdepassword is a password of JDE
PD910 is an environment defined in JDE.INI of Enterprise Server

Thursday, August 1, 2013

Oracle: Spool to Excel from SQLPlus

Spooling the output from SQLPlus to log file is often in unreadable format.

To Spool SQLPLus output to Excel (.xls) file, the trick is to turn On "MARKUP HTML"

set markup html on
set feedback off

spool c:\test.xls

select * from testdta.f0101
spool off

set markup html off

Thursday, July 11, 2013

Improve Performance of Server Manager


Improve Performance of Server Manager  -

1.
Stop Server Manager Console Service
Regedit


HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\SCFMngmtConsole1\Parameters\Start

Click on Params

-Xmx786m
-Xrs
-Djde.home=C:\jde_home\SCFMC
-jar
oc4j.jar

New Value
-Xms512m
-Xmx1536m
-Djde.home=C:\jde_home\SCFMC
-jar
oc4j.jar

Start Server Manager Console Service

2. Another way to change is look for document on oracle support 1082765.1






Tuesday, July 9, 2013

Web client not openning PDF


Clicek View PDF on Submitted Job and PDF not opening.

2 Solution to resolve :

Sol 1) Press Control Key quickly after your click View PDF

Sol 2) Internet Option - Security - Trusted Site - Custom level

Verify below setting are Enable.

Download - File Download - Enable
Download - Font Download - Enable

Wednesday, May 29, 2013

Weblogic 11g Start Stop Script on Linux

How to start Weblogic Service automatically on restart ?
How to restart Weblogic instance  on background ?

This are question that keeps fight our mind for weblogic on unix.  I have made a script to restart Weblogic instance automatically on restart. This will stop and start Weblogic and Server Manager Agent in sequence. You can use this script and change parameters to adjust your environment.

 The below script is for Linux system where executable is placed in /etc/init.d to start Weblogic 11g.


#
# This is to be saved on /etc/init.d
# Permissions chmod 755
# Owned by root:root
# Install using chkconfig --add weblogic
#
#
######################################
### Following parameter is set /etc/profile
# MW_HOME=/u01/app/wls1035/Middleware/

case $1 in
    start)
    su - oracle -c 'nohup /u01/jde_home/SCFHA/bin/startAgent > /dev/null &'
    su - oracle -c 'nohup $MW_HOME/wlserver_10.3/server/bin/startNodeManager.sh > $MW_HOME/wlserver_10.3/common/nodemanager/nodemanager.out &'
    su - oracle -c 'nohup $MW_HOME/user_projects/domains/E1_Apps/bin/startWebLogic.sh > $MW_HOME/user_projects/domains/E1_Apps/servers/AdminServer/logs/AdminServer.out &'
    until nc -z jde91web 8000
      do
       sleep 10
      done

    su - oracle -c 'nohup $MW_HOME/user_projects/domains/E1_Apps/bin/startManagedWebLogic.sh NE1SVR t3://jde91web:8000 > $MW_HOME/user_projects/domains/E1_Apps/servers/NE1SVR/logs/NE1SVR.out &'
        until nc -z jde91web 8016
                do
                sleep 10
        done
        ;;

    stop)
    su - oracle -c 'nohup $MW_HOME/user_projects/domains/E1_Apps/bin/stopManagedWebLogic.sh NE1SVR t3://jde91web:8000 > $MW_HOME/user_projects/domains/"E1_Apps"/servers/NE1SVR/logs/NE1SVR.out &'
    su - oracle -c 'nohup $MW_HOME/user_projects/domains/E1_Apps/bin/stopWebLogic.sh > $MW_HOME/user_projects/domains/E1_Apps/servers/AdminServer/logs/AdminServer.out &'
    ps -ef | grep NodeManager | grep -v grep | awk '{system("kill -9 "$2)}'
    su - oracle -c 'nohup /u01/jde_home/SCFHA/bin/stopAgent > /dev/null &'
    ;;

    restart)
    su - oracle -c 'nohup $MW_HOME/user_projects/domains/E1_Apps/bin/stopManagedWebLogic.sh NE1SVR t3://jde91web:8000 > $MW_HOME/user_projects/domains/E1_Apps/servers/NE1SVR/logs/NE1SVR.out &'
    su - oracle -c 'nohup $MW_HOME/user_projects/domains/E1_Apps/bin/stopWebLogic.sh > $MW_HOME/user_projects/domains/E1_Apps/servers/AdminServer/logs/AdminServer.out &'
    ps -ef | grep NodeManager | grep -v grep | awk '{system("kill -9 "$2)}'
    su - oracle -c 'nohup /u01/jde_home/SCFHA/bin/stopAgent > /dev/null &'
    su - oracle -c 'nohup /u01/jde_home/SCFHA/bin/startAgent > /dev/null &'
    su - oracle -c 'nohup $MW_HOME/wlserver_10.3/server/bin/startNodeManager.sh > $MW_HOME/wlserver_10.3/common/nodemanager/nodemanager.out &'
    su - oracle -c 'nohup $MW_HOME/user_projects/domains/E1_Apps/bin/startWeblogic.sh > $MW_HOME/user_projects/domains/E1_Apps/servers/AdminServer/logs/AdminServer.out &'
    until nc -z jde91web 8000
      do
       sleep 10
      done

    su - oracle -c 'nohup $MW_HOME/user_projects/domains/E1_Apps/bin/startManagedWebLogic.sh NE1SVR t3://jde91web:8000 > $MW_HOME/user_projects/domains/E1_Apps/servers/NE1SVR/logs/NE1SVR.out &'
        until nc -z jde91web 8016
                do
                sleep 10
        done
        ;;
esac