Hi Deepak,

IF you have access to root authority, 
then the simple way to do this using crontab is 

su to instance owner and take backups.
make sure all environment variables ( includes
.db2profile is set for the instance owner profile ) . 

the script for backups would include these lines ...

su - <instance owner> "-c db2start"
echo "Starting Database backup "
su - <instance owner> "-c db2 backup db FIDPROD to
 /home/db2backups/db2v72i1 without prompting >
 /home/db2backups/db2v72i1/logbackup_FIDPROD  "

Set the above script in crontab .

We do this in our setup and have had no probs as such.

Thx,
Ravi.


--- [EMAIL PROTECTED] wrote:
> 
> 
> Hi All,
> 
> I am having 7.2 version of DB2 on a AIX Machine.
> And i am tring to taking backup of one of my
> database by using a simple
> script.
> 
> Script is like this:
> 
> [[echo The DB2 instance db2v72i1 is going down for
> backup purposes. Please
> log out.
> echo " forcing applications"
> db2 force applications all
> echo " stopping DB2"
> db2stop force
> db2start
> echo "ready for taking backup of fidprod"
> db2 'backup db FIDPROD to
> "/home/db2backups/db2v72i1"' >
> /home/db2backups/db2v72i1/logbackup_FIDPROD ]]
> 
> This script is working perfectly.
> 
> But i want to run this script by using crontab.
> For this i have added a line at line at the start of
> script.
> . /home/db2v72i1/sqllib/db2profile
> ie i want to run db2profile file present in sqllib
> directory.
> 
> Now instead of taking backup i am getting this error
> message.
> 
> DB21015E  The Command Line Processor backend process
> request queue or input
> queue was not created within the timeout period.
> 
> DB21015E The command line processor back-end process
> request
>           queue or input queue was not created
> within the timeout
>           period.
> 
> Explanation:  Either the values for the DB2BQTRY and
> DB2BQTIME
> environment variables need to be increased or the
> command line
> processor back-end program "db2bp" cannot be
> started. The "db2bp"
> program must reside in the correct database manager
> install path
> and users must have execute permission on the file.
> 
> So,  I have changer tha value of  DB2BQTRY to 120
> from 60.
> By
> export DB2BQTRY = 120
> 
> But it as still not working.
> Now if i add the [ db2 list commend options ] to the
> script.
> Even this command is giving the same error.
> Can anyone tell  whats wrong with it.
> 
> Thanx & Rgds
> Deepak Bansal
> 
> 
> 
> 
> -
> :::  When replying to the list, please use
> 'Reply-All' and make sure
> :::  a copy goes to the list ([EMAIL PROTECTED]).
> ***  To unsubscribe, send 'unsubscribe' to
> [EMAIL PROTECTED]
> ***  For more information, check
http://www.db2eug.uni.cc


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
-
:::  When replying to the list, please use 'Reply-All' and make sure
:::  a copy goes to the list ([EMAIL PROTECTED]).
***  To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
***  For more information, check http://www.db2eug.uni.cc

Reply via email to