Link to home
Start Free TrialLog in
Avatar of anirrao
anirrao

asked on

db2 commands in a batch file

I have a query  select (current date - date(last_refresh_timestamp)) from tbname where some condition
I want the o/p of the query to be assigned to some variable in a batch script,check whether the result of the query>1 then issue net stop svcename ,I need to run it as a batch file.Any ideas on how to accomplish this.
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

maybe you can do it using wmi extensions of db2
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial