Scheduling a DB2 command to run

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fridge
    New Member
    • Sep 2007
    • 2

    Scheduling a DB2 command to run

    Hi,

    I'm quite new to DB2 and AIX and I'm looking for a way to schedule a DB2 command to run on a daily basis or perhaps even on an hourly basis.

    Thanks

    Regards

    Fridge
  • raimee
    New Member
    • Sep 2007
    • 3

    #2
    Originally posted by Fridge
    Hi,

    I'm quite new to DB2 and AIX and I'm looking for a way to schedule a DB2 command to run on a daily basis or perhaps even on an hourly basis.

    Thanks

    Regards

    Fridge
    If you use the graphic tools, have a look at the Task Center. You can schedule
    'commands' there and then use the Journal to monitor status.

    Comment

    • dewa81
      New Member
      • Jul 2007
      • 14

      #3
      You can also setup a cron job in AIX and schedule it

      Comment

      • docdiesel
        Recognized Expert Contributor
        • Aug 2007
        • 297

        #4
        Hi,
        Originally posted by dewa81
        You can also setup a cron job in AIX and schedule it
        and make sure that you setup the cronjob as the instance owner, e.g. db2inst1. That way you don't need to give a password when connecting to a db.

        Regards, Bernd

        Comment

        • Fridge
          New Member
          • Sep 2007
          • 2

          #5
          Originally posted by dewa81
          You can also setup a cron job in AIX and schedule it
          I know now how to setup a cron job, but I dont know how to script the following.

          su - db2prd
          (username)
          (password)
          db2....

          Comment

          Working...