We have moved to www.dataGenX.net, Keep Learning with us.

Thursday, March 27, 2014

Get list of locked item on DataStage Server with Script


This script can be run with or without any argument and provide the list of Job, item locked in DataStage environment by any user. This script will help release the locks if user doesn't locked the item.

Script Name : DSgetJobLocks.sh
Usage : ./DSgetJobLocks.sh [one or more argument]




===========================================================================

===========================================================================


Example :

a) /home/atul> ./DSgetJobLocks.sh

 INODE    USER        PROCESS LOCKED   ITEM
 NUMBER   NUMBER      ID      BY       LOCKED
 -------- ------ ------------ -------- ---------------------------------------------
   144368  49786        15750 peter  BVG02_DV&!DS.ADMIN!&
   144368  54505        11031 peter  BVG02_DV&!DS.ADMIN!&
   144368  34129        31407 alex  OPG01_T1&!DS.ADMIN!&
   144368  51958        13578 alex  OPG01_T1&!DS.ADMIN!&
   144368  38234        27302 janisse    BDW01_DV&!DS.ADMIN!&
   144368  56502         9034 sandra  BDW01_DV&!DS.ADMIN!&
   144368  47623        17913 gopal CDI01_DV&!DS.ADMIN!&
   144368  48104        17432 mahi  LMP02_DV&!DS.ADMIN!&
   144368  55371        10165 hari  LMP02_DV&!DS.ADMIN!&
   144368  57866         7670 ccms LMP02_DV&!DS.ADMIN!&
  7235179  57866         7670 ccms $PROJDEF
   144368  34625        30911 arun OIY01_DV&!DS.ADMIN!&
   144368  64084         1452 arun OIY01_DV&!DS.ADMIN!&
   144368  47409        18127 ricardo  CDI01_DV&!DS.ADMIN!&
   144368  60782         4754 ivan   BDW01_DV&!DS.ADMIN!&
   144368  60473         2863 ivan   BDW01_DV&!DS.ADMIN!&
   144368  53218        12318 priety  LMP02_DV&!DS.ADMIN!&
  7304940  53218        12318 priety  LMP02_DV_default_palette.
   144368  48334        17202 sergio  OPG01_T1&!DS.ADMIN!&
   144368  51141        14395 sergio  OPG01_T1&!DS.ADMIN!&
   144368  61548         3988 akash   LMP02_DV&!DS.ADMIN!&
   144368  35924        29612 cathy  BDW01_DV&!DS.ADMIN!&
   144368  39110        04404 cathy  BDW01_DV&!DS.ADMIN!&


b)  /home/atul> ./DSgetJobLocks.sh cathy sergio atul

 INODE    USER        PROCESS LOCKED   ITEM
 NUMBER   NUMBER      ID      BY       LOCKED
 -------- ------ ------------ -------- ---------------------------------------------
   144368  48334        17202 sergio  OPG01_T1&!DS.ADMIN!&
   144368  51141        14395 sergio  OPG01_T1&!DS.ADMIN!&
   144368  35924        29612 cathy  BDW01_DV&!DS.ADMIN!&
   144368  39110        04404 cathy  BDW01_DV&!DS.ADMIN!&




No comments :

Post a Comment