Avatar of Jim Youmans
Jim Youmans
Flag for United States of America asked on

How to schedule DB2 scripts to run

DB2 10.5 on Windows

How do most people schedule DB2 scripts to run?  I would like to be able to run certain maintenance scripts to run at 3:00 am nightly.  

I have created a batch file that calls another batch file that runs the DB2 cmd window.  The script in the second batch files creates another file of SQL commands that is then run.  The whole thing is run from the windows task scheduler but there are some issues.  

1.  I hate batch files and having to have 2 seems silly.

2.  The files run fine when I run them but fail more often than not when called from the windows task scheduler.  (various reasons not the focus of this post).  The problem is in running the 3rd script file.

3.  I have to put the username / password in the bat file in clear text.

So my question is how do most DB2 DBA's do this on windows?  SQL Server has a nice built-in job agent that makes it a breeze but DB2 does not seem to have that ability.

Is there an easier way to do this?  Am I missing something obvious that would make my life simpler?  Is there a third party application that will run as the SQL Server Agent with DB2?

Thank you!

Jim
DB2Windows OSSQL* Scheduling

Avatar of undefined
Last Comment
Jim Youmans

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Kent Olsen

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Tomas Helgi Johannsson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Jim Youmans

ASKER
Thank you!!!!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck