Monday, June 5, 2017

Find current value for env variable for a snapshot in PS using DB

If you want to find current value of env variable for a snapshot in PS environment from DB, it can be used using below 2 queries.

we can also find out if the value came as default from twx file while deployment or it has been updated later.

1.) find the custom changed value after deployment which will overwrite default values.

select s.NAME as "Snap Name", v.NAME as "Env Var Name", v.VALUE, v.LAST_MODIFIED from LSW_ENV_VAR_VAL v, LSW_SNAPSHOT s  where v.SNAPSHOT_ID=s.SNAPSHOT_ID and s.NAME='<Snapshot Name>' 

2.) Find default values of env variables which was set while deploying a snapshot.

select e.NAME, e.DEFAULT_VALUE from LSW_PO_VERSIONS v, LSW_BRANCH b, LSW_SNAPSHOT s, LSW_ENV_VAR e where v.BRANCH_ID=b.BRANCH_ID and e.VERSION_ID=v.PO_VERSION_ID and s.BRANCH_ID=b.BRANCH_ID and  s.NAME='<Snapshot_Name>'

No comments:

Post a Comment