Friday 21 August 2015

How to check the status of node manger and to kill the node manager.

Below commands are used to check the running applications.

check using ps -ef | grep weblogic to see if any weblogic services left running.

check using ps -ef | grep node to see if any nodemanager services left running.

Below commands are used to kill the node manager and weblogic.



 kill -9 PID to kill them (PID is first number in ps -ef)
 

Wednesday 19 August 2015

ORA-01840: input value not long enough for date format

Issue: when we create a virtual column with DATE datatype,we should have the proper value for the physical column.
Ex:We created a virtual column X_CAL_WEEK_END_DT based on the physical column CAL_WEEK_END_DT_WID.

CAL_WEEK_END_DT_WID having the date values in the following formate YYYYMMDD.But one value has 0.Without knowing the value of zero(0),we created Virtual column with below script

ALTER TABLE w_day_d ADD x_CAL_WEEK_END_DT GENERATED ALWAYS AS (TO_DATE(TO_CHAR("CAL_WEEK_END_DT_WID"),'yyyymmdd'))  VIRTUAL;

The above alter script can not covert the value ZERO(0) to DATE.

FIX:Changed the alter script like below.
ALTER TABLE w_day_d ADD x_CAL_WEEK_END_DT GENERATED ALWAYS AS (CASE  WHEN "CAL_WEEK_END_DT_WID"<>0 THEN TO_DATE(TO_CHAR("CAL_WEEK_END_DT_WID"),'yyyymmdd') END)  VIRTUAL;



ORA-00938: not enough arguments for function

Issue:Coalesce function is uesd in the map without placing sufficient arguments.
Ex:COALESCE(
(CASE
WHEN
 SQ_W_MCAL_PERIOD_D.ADJUSTMENT_PERIOD_FLG = 'Y' THEN
 SQ_W_MCAL_PERIOD_D.MCAL_PRIOR_PERIOD_WID
ELSE
 LKP_PERIOD_PRIOR.ROW_WID

END )
)  AS MCAL_PRIOR_PERIOD_WID

Fix:For example if we miss the replacing value in the COALESCE function then will get this error.So we need to place arguments properly.
 Ex:
 COALESCE(
(CASE
WHEN
 SQ_W_MCAL_PERIOD_D.ADJUSTMENT_PERIOD_FLG = 'Y' THEN
 SQ_W_MCAL_PERIOD_D.MCAL_PRIOR_PERIOD_WID
ELSE
 LKP_PERIOD_PRIOR.ROW_WID

END )
,0)  AS MCAL_PRIOR_PERIOD_WID