Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 21 Apr 2014 @ 13:17:07 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Procedure to set up PACKDISK utility on database node
 
From:   Pirri, Antonio

James:

  1. There is a file called crontab under etc directory. Can I put multiple schedules in this one file. Or can I create more crontab files under etc such as crontab1, crontab2... and put only one schedule in each crontabX file?  


Answer:

You can put one line for each action, or make a .sh an just execute this .sh from de contrab, just one crontab.


  2. When I opened crontab file under etc I expected to see nothing. But I see at the top of the file SHELL=/bin/sh PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin MAILTO=root  


  I wonder why these lines were there and what they do and how they will affect running packdisk command file.  


Answer:

This line are from crontab, not affect the packdisk


  3. I'd like to run Packdisk utility once a week Thursday 7pm. Should I write?  


  0 19 * * thu /.......................  


The command to work with crontab:

crontab -e Edit your crontab file, or create one if it doesn't already exist.

crontab -l Display your crontab file.

crontab -r Remove your crontab file.

crontab -v Display the last time you edited your crontab file. (This option is only available on a few

          *     *     *   *    *        command to be executed
          -     -     -   -    -
          |     |     |   |    |
          |     |     |   |    +----- day of week (0 - 6) (Sunday=0)
          |     |     |   +------- month (1 - 12)
          |     |     +--------- day of        month (1 - 31)
          |     +----------- hour (0 - 23)
          +------------- min (0 - 59)

  4. Is there a way to set up email notification in either crontab file or the packdisk command file that when packdisk finishes running it send an email saying "It finished successfully." with an output?  


Answer:

Yes you can setup it from the node, or redirect the log, for example

     30  19 * * 4  /opt/Teradata/tdat/pde/14.00.04.03/bin/cnsrun -utility ferret -multi -file
     /var/opt/Teradata/bteqdba/packdisk-scandisk.txt  > /var/opt/Teradata/bteqdba/CNSRUN_`date
     +\%y\%m\%d-\%H:\%M`.output 2>&1

Take care, my example run first a packdisk, and then the scandisk, you can remove the sentence scandisk.


Have a nice day.

Antonio Angel Pirri
PS Consultant



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023