Operating System - HP-UX
1752782 Members
6061 Online
108789 Solutions
New Discussion юеВ

Re: Shall script to check the applied patch.

 
harry_7
Frequent Advisor

Shall script to check the applied patch.

Dear All,

We are running Oracle ERP application. I have 1 DB+OAS server and 5 application servers.

So when ever we are applying any patch we have to apply on 7 places.

Some time by mistake we had missed out one of the application server.

To prevent I was thinking to do a script which will check the DB+OAS server and 5 applications server. That the patch is already applied on all the places. Basically I want to check the appllied patch's log file.

Please advise how I can do it.

Regards.

Harry
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: Shall script to check the applied patch.

Hi Harry:

# swlist -l patch PHxx_nnnn

Regards!

...JRF...
harry_7
Frequent Advisor

Re: Shall script to check the applied patch.

Hi,

Opps. I am talking about the Oracle patch not the OS level patch.

The log files are available in this location.

/XXX/dbsvr/oracle/XXXappl/admin/XXXX/log/d#####.log
/XXX/oas/oracle/XXXappl/admin/XXXX/log/c######.log

Regards.

Harry
Yogeeraj_1
Honored Contributor

Re: Shall script to check the applied patch.

hi harry,

do you want to check the content of the log files?

if yes, you can just do:
more /*/oas/oracle/*appl/admin/*/log/c*.log

let mw know if ok.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
harry_7
Frequent Advisor

Re: Shall script to check the applied patch.

Dear Mr. Yograj,

No ... my question is when you are applying oracle patch it will generate a log file at specific location.

In my case I have 6 different servers ie. One db server + 5 application servers.

DB server contains DB + OAS user ID and remaining 5 applications also containg OAS user ID.

After applying the patch (on all the servers) to DB, OAS + on 5 form servers. I want to check that the applied patch is really applied on all the servers.

So my requirement is I want a scripts which will check all the servers and get the info i.e. just listing of log files. Where I will just have to give the patch ID number and I should get the info like this,

Enter the patch ID C########

DBserver# /XXX/dbsvr/oracle/XXXappl/admin/XXXX/log/C########.log
The following patch C######## is applied

DBserver# /XXX/oas/oracle/XXXappl/admin/XXXX/log/C########.log



The following patch C######## is appliedOASserver1 #/XXX/oas/oracle/XXXappl/admin/XXXX/log/C########.log
The following patch C######## is applied

OASserver2 #/XXX/oas/oracle/XXXappl/admin/XXXX/log/C########.log
The following patch C######## is applied

OASserver3 #/XXX/oas/oracle/XXXappl/admin/XXXX/log/C########.log
The following patch C######## is applied

OASserver4 #/XXX/oas/oracle/XXXappl/admin/XXXX/log/C########.log
The following patch C######## is applied

OASserver5 #/XXX/oas/oracle/XXXappl/admin/XXXX/log/C########.log
The following patch C######## is applied

At present I have to manually check on all the servers.

Regards

Harry
Yogeeraj_1
Honored Contributor

Re: Shall script to check the applied patch.

hi again


once easy way, would be to pull all the logs to one server and check if OK.

echo "Enter Patch id: \c"
read patchid

for i in 1 2 3 4 5 ; do
echo "copying from server OASserver$i"
rcp OASserver$i:/XXX/oas/oracle/XXXappl/admin/XXXX/log/C$patchid.log /tmp/verify/OASserver$i-C$patchid.log
done

is that ok with you?

kind regards
yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Volker Borowski
Honored Contributor

Re: Shall script to check the applied patch.

Well,

simply query the Oracle inventory and capture the output. This makes you free to deal with the diffrent timestamps.

opatch lsinventory

gives you the complete listing of all applied Oracle interim patches.

This could be done via ssh or rsh so that you do not have to deal with diffrent directory locations or likewise.

Hope this helps
Volker
Ninad_1
Honored Contributor

Re: Shall script to check the applied patch.

Harry,

I guess the following should serve your purpose as you may not want a very sophisticated script

1. Create a file named servers.dat on one of the server where you will keep this script
The file should be as below

#servernames.dat
#servername Patch_id_path
srv1 /XXX/oas/oracle/XXXappl1/admin/XXXX/log
srv2 /XXX/oas/oracle/XXXappl2/admin/XXXX/log

2. Use the attached script (This is assuming remsh is allowed on the servers - Pls let know if this is not possible)

Hope this helps,

Ninad