Wednesday, December 17, 2014

Kill a Process by Looking up the Port


Here is command to start
    
FOR /F "tokens=5 delims= " %%P IN ('netstat -ano ^| findstr :8700') DO @ECHO TaskKill.exe /PID %%P /F

After I was confident I have removed ECHO command.

FOR /F "tokens=5 delims= " %%P IN ('netstat -ano ^| findstr :8700') DO TaskKill.exe /PID %%P /F

Here is example how this work.
netstat -ano  will give result in below format.  The Process ID associate with Port 8700 is 2686.
Note 2684 (PID) is 5 column in output.


 

Hence token=5. Run above command and see which column is a Port Number. For some OS like XP this is 4th column. So for XP token=4


"tokens=5 delims= "
This lets you split up each line by whitespace, and take the 5th chunk in that line, and stuffs it into %variable (in our case, %%P). delims looks empty, but that extra space is actually significant.

netstat -ano
Run this command on command prompt and see its usage.

^|
Transfer output from netstat and  passes it to findstr

findstr :8700
This filters any output that is passed into it, returning only lines that contain :8700.

TaskKill.exe /PID

This kills a running task, using the process ID.
%%P instead of %P


This is required in batch files. If you did this on the command prompt, you would use %P instead. This is required in batch files. If you did this on the command prompt, you would use %P instead.

Tuesday, November 4, 2014

Update ESU and ASU  DV from  PD
in Planner (E1Local Oracle Database

delete from JDESY910.F9671 where SDSUDFUT2 in ('DV910');
COMMIT;

CREATE TABLE JDEsy910.F9671_BKP AS SELECT * FROM JDESY910.F9671 where SDSUDFUT2='PD910' and SDPKGNAME not in (select SDPKGNAME from JDEsy910.F9671 where SDSUDFUT2='DV910');

UPDATE JDEsy910.F9671_BKP set SDSUDFUT2='DV910';
COMMIT;

insert into JDEsy910.F9671 select * from JDEsy910.F9671_BKP;
COMMIT;
DROP TABLE JDESY910.F9671_BKP;

delete from JDESY910.F9672 where SUPATHCD in ('DV910');

CREATE TABLE JDEsy910.F9672_BKP AS SELECT * from JDEsy910.F9672 where SUPATHCD='PD910' and SUPKGNAME not in (select SUPKGNAME from JDEsy910.F9672 where SUPATHCD='DV910');

UPDATE JDEsy910.F9672_BKP set SUPATHCD='DV910';
COMMIT;

insert into JDEsy910.F9672 select * from JDEsy910.F9672_BKP;
COMMIT;
DROP TABLE JDESY910.F9672_BKP;

Tuesday, July 22, 2014

Reset OC4J Admin Password for OAS

 Source - http://www.dbuggr.com/milly/steps-reset-oc4j-admin-password/

 Steps on how to reset OC4J Admin Password
If you lost your oc4jadmin password (Oracle Application Server admin), follow the steps below to update the password - 
Follow the steps below to reset oc4jadmin user: 
Stop OC4J and the Application Server Control. (opmnctl stopall)
  1. Edit system-jazn-data.xml file with text editor
(UNIX) $OAS_HOME/j2ee/home/config/system-jazn-data.xml
(Windows) $OAS_HOME\j2ee\home\config\system-jazn-data.xml

Search for “oc4jadmin” user in system-jazn-data.xml. You’ll see something similar to this:
      
        oc4jadmin
        OC4J Administrator
        492DECF0CF0B11DEBF5CAF614F0D6C07
        OC4J Administrator
        {903}54k7kX7gDQLsdOnXAgEq1+GCKi20hhGH
      
  1. Replace the encrypted password string between tag to the password you desire. Make sure you prefix the password with an exclamation point (!) and also follow the password requirements for OAS. For example:
      
        oc4jadmin
        OC4J Administrator
        492DECF0CF0B11DEBF5CAF614F0D6C07
        OC4J Administrator
        !mynewpassword1
      
  1. Delete everything under persistence directory (do not delete persistence directory itself):
(UNIX) $OAS_HOME/j2ee/oc4j_soa/persistence/
(Windows) $OAS_HOME\j2ee\oc4j_soa\persistence\
  1. Start OC4J and the Application Server Control. (opmnctl startall)

Saturday, July 19, 2014

Open Source Application Server



The open source application servers compared in this article, with descriptions from their respective Web sites, will be:

    • Geronimo. "The goal of the Geronimo project is to produce a server runtime framework that pulls together the best Open Source
      alternatives to create runtimes that meet the needs of developers and system administrators."

    • GlassFish. "GlassFish is an open source, production-ready, Java EE-compatible application server. GlassFish version 3 provides a small footprint, fully-featured implementation of Java EE 6."

    • JBoss. "JBoss Enterprise Application Platform balances innovation with enterprise class stability by integrating the most popular
      clustered Java EE application server with next generation application frameworks."

    • Jetty. "Jetty provides a Web server and javax.servlet container, plus support for Web Sockets, OSGi, JMX, JNDI, JASPI, AJP and many
      other integrations."

    • JOnAS. "JOnAS is a leading edge Java EE 5 certified Open Source OSGi Enterprise Server developed by Bull and OW2."

    • Resin. "Resin is a smoking hot Java EE 6 web server. It is built on our distributed-agent technology for the elastic cloud."

    • Tomcat. "Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies."

Monday, June 9, 2014

Web Dev Feature SQL


Forgot adding Web Dev Feature in Full Package Assemble and build.

Shot cut to add feature in assembly after Package build.

1.) INSERT INTO JDE900.SY900.F9631 VALUES('C','WEBDEVOC4J','DVF001','DV910',' ',' ',' ','1',' ','P9601','DEP1',114092,123027.000000,'JDE')

Here
Full package - DVF0001
Environment - DV910
Machine - DEP1

2.)  Add following line in end of  E:\JDEdwards\E910\PACKAGE_INF\DVF001.inf

[FEATURE]
WEBDEVOC4=\\DEP1\E910\package_inf\feature_inf\WEBDEVOC4J.INF


After this you can install Full package on Fat Client and Web Dev Feature will install.

Thursday, March 27, 2014

Purge WorkCenter Message


Purge Bulk Work Center using SQL :-


Purging WorkCenter Message first time is too time consuming as there are millions of record.  Use below select statement to count records and then using delete purge them.


Note: -The Order of SQL is important, because data are inter-dependent on each other.

SELECT COUNT(*) from PRODDTA.F00166 where GTOBNM='GT01131'
AND GTTXKY IN (SELECT ZZSERK from PRODDTA.F01131 where ZZDTI lt 113170);

SELECT COUNT(*) from PRODDTA.F00165 where GDOBNM='GT01131'
AND GDTXKY IN (SELECT ZZSERK from PRODDTA.F01131 where ZZDTI lt 113170);

SELECT COUNT(*) from  proddta.F01131T where
ZCSERK in (SELECT zzserk)from PRODDTA.F01131 where ZZDTI lt 113170);

SELECT COUNT(*) from PRODDTA.F01131M where ZMDTI lt 113170;

SELECT COUNT(*) from  proddta.F01133 where
ZTSERK in (SELECT zzserk from PRODDTA.F01131 where ZZDTI lt 113170);

SELECT COUNT(*)  from PRODDTA.F01131 where ZZDTI lt 113170;



 Clear Orphaned Record R01131M with Data Selection  on ZMDTI


Now do your regular maintenance to Purge Work Center message with R01131P

Question 1:  In what tables are the Work Center Messages stored?

Answer 1: The Work Center is the hub of all messages within EnterpriseOne. Work Center messages are stored in the following tables:


  •     F01131        PPAT Message Control File
  •     F01133        PPAT Message Detail File
  •     F01131M     JDEM Multi Level Message
  •     F01131T      Message Attachment Tag File
  •     F00165        Media Object Storage (identified under GT01131)
  •     F00166        Media Object Categories (identified under GT01131)


Wednesday, March 26, 2014

JVM JAS to run on different timezone


Setup JVM to run on different Time Zone then the Time Zone on Machine

Add JVM arguments at smae place where you have other arguments like Xmx, Xms etc ...

For eg JVM running on India Time Zone.

-Duser.timezone=GMT+09:30

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\%';