Skip to content

Archive for

Happy B’day !!!!!

Today this site turns 1 Year old. Happy B’day !!!!!

I hope the information published in this site would have helped you in some manner. We will try to make more frequent updates related to SQL Server and Netezza this year. Thanks for visiting our website. :-)

How to make changes to Netezza cron job under NZ account?

When we make changes to crontab on Netezza server (active node), it is not automatically changed to crontab on secondary node, because crontab under nz account is not shared between nodes. Each node have its own crontab. SO, when ever we make changes on the primary node we have to make sure that same changes are made on scondary node as well. Here is the steps to follow when we make changes to crontab in Netezza.

1) Connect to active node (say NzServer1_1a or use logical name) from putty and take a backup of current crontab

crontab -l>crontab.dat

Optional : If you have already have a backup of crontab, you can compare the backup with current crontab to make sure their are no changes made to crontab which are not in backup file.

crontab -l|diff - crontab.dat

2) Make required changes to crontab.dat using vi editor

vi crontab.dat

3) Now apply this changes to actual crontab

crontab crontab.dat

4) Now, to propagate these changes to secondary node you have to first connect to the secondary node (say NzServer1_2a) from putty and navigate to /tmp directory.

Then make a sftp to the active node.

sftp NzServer1_2a

5) Now navigate to the path where you have taken  a backup of crontab in primary node. Then issue a command

get crontab.dat

6) Run below command to apply this crontab changes to secondary node.

crontab crontab.dat

7) Now crontab is in sync on both the nodes.