If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Script for checking DB2 has standard fix or non-standard fix.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-11, 23:05
iam_hari iam_hari is offline
Registered User
 
Join Date: Jul 2011
Posts: 8
Red face 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;
Reply With Quote
  #2 (permalink)  
Old 11-06-11, 23:38
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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.
Reply With Quote
  #3 (permalink)  
Old 11-06-11, 23:43
iam_hari iam_hari is offline
Registered User
 
Join Date: Jul 2011
Posts: 8
i mean to say that it is a special fix.
Reply With Quote
  #4 (permalink)  
Old 11-27-11, 19:49
iam_hari iam_hari is offline
Registered User
 
Join Date: Jul 2011
Posts: 8
Script for checking DB2 has standard fix

Hi All,

Could any one please help me with the script please.
Reply With Quote
  #5 (permalink)  
Old 11-28-11, 09:44
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
  #6 (permalink)  
Old 12-06-11, 22:00
iam_hari iam_hari is offline
Registered User
 
Join Date: Jul 2011
Posts: 8
Thanks fro you help :-)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On