vspacer
 
vspacer
 
Valid XHTML 1.0!
 
Valid CSS 1.0

Kintana Script : Special Command Scripts

 

ZDS Kintana Scripts

Purpose

This is a swiss-army knife script that can be configured in multiple ways to get you anything you need to know about your special command scripts.

Tested

With HP PPM (Project and Portfolio Management) Kintana v6.0.

Usage

Paste the following script into Toad or SQL Runner

Omit the comment if you're using SQL Runner.
This only supports select statements and you'll get a KNTA-10648 error.

#1
List command step code for all or a specified special command.
select nsct.special_command_type_name,
       nc.command_seq,
       nc.command_name,
       nc.condition,
       nc.timeout_seconds,
       ncs.step_seq,
       ncs.command
from KNTA_COMMANDS nc,
     KNTA_ENTITIES ne,
     KNTA_COMMAND_STEPS ncs,
     KNTA_SPECIAL_COMMAND_TYPES nsct
where nsct.special_command_type_id = nc.parent_id
  and nc.command_id = ncs.command_id
  and nc.parent_entity_id = ne.entity_id
-- and ne.entity_name = 'CONNECT_STRING'
-- and nsct.special_command_type_name like 'sc_if_file_writable%' -- List a specific command
   and nsct.special_command_type_name like 'sc_%'                  -- list all user special commands
-- and nsct.special_command_type_name like 'ksc_%'                -- List all system special commands
-- and ncs.command like '%.env%'
order by nsct.special_command_type_name, nc.command_seq, ncs.step_seq
#2
List special command invocations in command steps
select unique ncs.command
from KNTA_COMMAND_STEPS ncs
where ncs.command like 'sc_%'
-- and ncs.command like '%VERSION%'
#3
List special command parameters
select nsct.special_command_type_name,
       nscp.seq, nscp.parameter_name, nscp.parameter_token
from KNTA_COMMANDS nc,
     KNTA_ENTITIES ne,
     KNTA_COMMAND_STEPS ncs,
     KNTA_SPECIAL_COMMAND_TYPES nsct,
     KNTA_SPECIAL_CMD_PARAMS nscp
where nsct.special_command_type_id = nc.parent_id
  and nsct.special_command_type_id = nscp.special_command_type_id
  and nc.command_id = ncs.command_id
  and nc.parent_entity_id = ne.entity_id
  and ne.entity_name = 'Special Commands'
  and nsct.special_command_type_name like 'sc_%'
--  and nscp.parameter_name like 'CI%'
order by nsct.special_command_type_name, nscp.seq

          
#4
Locate special command invocations with a specified parameter
select unique nsct.special_command_type_name, nc.command_seq, ncs.step_seq, ncs.command
from KNTA_COMMANDS nc,
     KNTA_ENTITIES ne,
     KNTA_COMMAND_STEPS ncs,
     KNTA_SPECIAL_COMMAND_TYPES nsct
where nsct.special_command_type_id = nc.parent_id
-- and nsct.special_command_type_id = nscp.special_command_type_id
and nc.command_id = ncs.command_id
and nc.parent_entity_id = ne.entity_id
and ne.entity_name = 'Special Commands'
and nsct.special_command_type_name like 'sc_%'
and ncs.command like '%VERSION%'        -- Sample Parameter
order by nsct.special_command_type_name, nc.command_seq, ncs.step_seq

Download

KintanaScripts.zip (58 Kb)


   


Back to top | ZDS Home | This article updated January 1, 2008.