Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2011
    Posts
    17

    Red face Unanswered: Script for checking DB2 has standard fix or non-standard fix.

    Hi

    I am new to DB2. I have written a script to check whether the DB2 has standard fix pack or not. The script which i have written is working fine, but i want to store the variable in an Array and it should point through pointer and display then message whether the Fix pack is standard fix pack or non-standard fix-pack but i don't know how to use in array. Need some help.


    CASE WHEN
    OS_NAME = 'Linux'
    Then (
    CASE WHEN
    SERVICE_LEVEL='DB2 v9.1.0.7' AND PTF =(select PTF from SYSIBMADM.ENV_INST_INFO where PTF IN('MI00274','MI00265','MI00244','MI00235','MI0021 6',
    'MI00204','MI00185','MI00172','MI00273','MI00264', 'MI00243','MI00234','MI00229','MI00215','MI00220', 'MI00203','MI00184','MI00171','MI00275',
    'MI00266','MI00245','MI00236','MI00236','MI00205', 'MI00186','MI00173','MI00276','MI00246','MI00237', 'MI00218','MI00206','MI00187','MI00174'))
    THEN 'Standard Release' || (select PTF from SYSIBMADM.ENV_INST_INFO)
    Else
    'Non-Standard Fixpak' || (select PTF from SYSIBMADM.ENV_INST_INFO)
    end )
    WHEN
    OS_NAME = 'AIX'
    Then (
    CASE WHEN
    SERVICE_LEVEL='DB2 v9.1.0.7' AND PTF =(select PTF from SYSIBMADM.ENV_INST_INFO where PTF IN('U823509','U823469','U817474','U815922','U81576 8',
    'U811792','U813650','U811590','U810940','U809676') )
    THEN 'Standard Release' || (select PTF from SYSIBMADM.ENV_INST_INFO)
    Else
    'Non-Standard Fixpak' || (select PTF from SYSIBMADM.ENV_INST_INFO)
    end )
    WHEN
    OS_NAME = 'SOLARIS'
    Then (
    CASE WHEN
    SERVICE_LEVEL='DB2 v9.1.0.7' AND PTF =(select PTF from SYSIBMADM.ENV_INST_INFO where PTF IN
    ('U823510','U823470','U817475','U815923','U815769' ,'U811793','U813651','U810941','U809677',
    'U823511','U823471','U817476','U815924','U811794', 'U811594'))
    THEN 'Standard Release' || (select PTF from SYSIBMADM.ENV_INST_INFO)
    Else
    'Non-Standard Fixpak' || (select PTF from SYSIBMADM.ENV_INST_INFO)
    end )
    WHEN
    OS_NAME = 'UNIX'
    Then (
    CASE WHEN
    SERVICE_LEVEL='DB2 v9.1.0.7' AND PTF =(select PTF from SYSIBMADM.ENV_INST_INFO where PTF IN('U823513','U823473','U817478','U815926','U81179 6','U811593','U810943','U809679','U823512',
    'U823472','U817477','U815925','U815771','U811795', 'U813653','U810942','U809678'))
    THEN 'Standard Release' || (select PTF from SYSIBMADM.ENV_INST_INFO)
    Else
    'Non-Standard Fixpak' || (select PTF from SYSIBMADM.ENV_INST_INFO)
    end )
    end as msg
    , ptf as token
    from (Select OS_NAME,SERVICE_LEVEL,PTF from SYSIBMADM.ENV_SYS_INFO,SYSIBMADM.ENV_INST_INFO) as standard_release;

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Quote Originally Posted by iam_hari View Post
    whether the Fix pack is standard fix pack or non-standard fix-pack
    What do you mean by non-standard fixpack?

    If db2level output doesn't contain the word "special" (for a special build), then it's a standard fixpack.

  3. #3
    Join Date
    Jul 2011
    Posts
    17
    i mean to say that it is a special fix.

  4. #4
    Join Date
    Jul 2011
    Posts
    17

    Script for checking DB2 has standard fix

    Hi All,

    Could any one please help me with the script please.

  5. #5
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    How about:

    Code:
    select inst_name,service_level,bld_level,ptf,
    case when ucase(bld_level) like '%SPECIAL%' then 'Special build' else 'Standard Fixpack' end as comment
    from SYSIBMADM.ENV_INST_INFO
    Andy

  6. #6
    Join Date
    Jul 2011
    Posts
    17
    Thanks fro you help :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •