IBM Storage Defender

IBM Storage Defender

Early threat detection and secure data recovery

 View Only
  • 1.  Scheduler is failing to take db2 database image backup

    Posted Tue December 13, 2016 12:21 AM

    Hi Team,

    I am looking for your help I have created one batch file to automate the db2 image backup although when i am going into Db2cmd and putting that syntax i am getting expected result. but while automating this through windows scheduler it's failing i am attaching the log for your reference and attaching the batch file also please give some idea I am guessing this is happening because the batch file is not able to call db2cmd which is required/mandatory.

    Syntax-
    db2cmd -c -w -i db2 -tvf F:\DB2\BACKUP_SCRIPT\db2backup1.txt -l F:\DB2\BACKUP_SCRIPT\db2backup1.txt.out -r F:\DB2\BACKUP_SCRIPT\db2backup1.txt.rpt 

    Log-

    Task Scheduler queued instance "{ef9f5b59-7cea-44cc-9593-d865fae5a0f2}"  of task "\Microsoft\Windows\Shell\CreateObjectTask".

    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
      <Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" />
      <EventID>325EventID>
      <Version>0Version>
      <Level>3Level>
      <Task>325Task>
      <Opcode>0Opcode>
      <Keywords>0x8000000000000000Keywords>
      <TimeCreated SystemTime="2016-12-10T15:33:12.884324200Z" />
      <EventRecordID>858EventRecordID>
      <Correlation ActivityID="{EF9F5B59-7CEA-44CC-9593-D865FAE5A0F2}" />
      <Execution ProcessID="584" ThreadID="3120" />
      <Channel>Microsoft-Windows-TaskScheduler/OperationalChannel>
      <Computer>Computer>
      <Security UserID="S-1-5-18" />
      System>
    - <EventData Name="TaskInstanceQueued">
      <Data Name="TaskName">\Microsoft\Windows\Shell\CreateObjectTaskData>
      <Data Name="QueuedTaskInstanceId">{EF9F5B59-7CEA-44CC-9593-D865FAE5A0F2}Data>
      EventData>

     

     

    Regards

    Prem



  • 2.  RE: Scheduler is failing to take db2 database image backup

    Posted Wed December 14, 2016 03:55 AM

    Hi,

    Experts awaiting for your response.

     

    Regards

    Prem



  • 3.  RE: Scheduler is failing to take db2 database image backup

    Posted Fri December 16, 2016 11:10 PM

    This is a Windows task scheduler issue.  Windows task scheduler is quite difficult but first point is to put command into a command file or script with a .cmd extension (to keep it simple use a short file name with no spaces) and schedule the script which will be much easier than trying to schedule a command and figure out the quoting.



  • 4.  RE: Scheduler is failing to take db2 database image backup

    Posted Fri December 16, 2016 11:27 PM

    Hi Ano,

    Thanks for the response I tried earlier also this but after your suggestion i created fresh (.cmd) extension and created the new scheduler also but still no luck.

    I am attaching the log for your reference.

    Log from Task scheduler-

    Log Name:      Microsoft-Windows-TaskScheduler/Operational
    Source:        Microsoft-Windows-TaskScheduler
    Date:          12/17/2016 9:46:58 AM
    Event ID:      102
    Task Category: Task completed
    Level:         Information
    Keywords:      (1)
    User:          CONTENTSTORE\Satinder
    Computer:      ContentStore.RenewPower.com
    Description:
    Task Scheduler successfully finished "{87d0c087-ad78-4be9-abb7-7a756fef6707}" instance of the "\Test" task for user "CONTENTSTORE\Satinder".
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" />
        <EventID>102</EventID>
        <Version>0</Version>
        <Level>4</Level>
        <Task>102</Task>
        <Opcode>2</Opcode>
        <Keywords>0x8000000000000001</Keywords>
        <TimeCreated SystemTime="2016-12-17T04:16:58.907581200Z" />
        <EventRecordID>2043</EventRecordID>
        <Correlation ActivityID="{87D0C087-AD78-4BE9-ABB7-7A756FEF6707}" />
        <Execution ProcessID="6960" ThreadID="6712" />
        <Channel>Microsoft-Windows-TaskScheduler/Operational</Channel>
        <Computer>ContentStore.RenewPower.com</Computer>
        <Security UserID="S-1-5-21-3527382081-4031014434-1929481814-1005" />
      </System>
      <EventData Name="TaskSuccessEvent">
        <Data Name="TaskName">\Test</Data>
        <Data Name="UserContext">CONTENTSTORE\Satinder</Data>
        <Data Name="InstanceId">{87D0C087-AD78-4BE9-ABB7-7A756FEF6707}</Data>
      </EventData>
    </Event>

    Log from event viewer-

    Log Name:      Microsoft-Windows-TaskScheduler/Operational
    Source:        Microsoft-Windows-TaskScheduler
    Date:          12/17/2016 9:51:58 AM
    Event ID:      318
    Task Category: Task engine properly shut down
    Level:         Information
    Keywords:      
    User:          SYSTEM
    Computer:      
    Description:
    Task Scheduler shutdown Task Engine "S-1-5-21-3527382081-4031014434-1929481814-1005:CONTENTSTORE\Satinder:Password:Highest"  process.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" />
        <EventID>318</EventID>
        <Version>0</Version>
        <Level>4</Level>
        <Task>318</Task>
        <Opcode>2</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2016-12-17T04:21:58.907735000Z" />
        <EventRecordID>2047</EventRecordID>
        <Correlation />
        <Execution ProcessID="584" ThreadID="2348" />
        <Channel>Microsoft-Windows-TaskScheduler/Operational</Channel>
        <Computer></Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <EventData Name="TaskEngineProcessMainShutdown">
        <Data Name="TaskEngineName">S-1-5-21-3527382081-4031014434-1929481814-1005:abcd\test:Password:Highest</Data>
      </EventData>
    </Event>

     

    Regards

    Prem



  • 5.  RE: Scheduler is failing to take db2 database image backup

    Posted Fri December 16, 2016 11:48 PM

    Ano,

    I tried changing and added path on (.cmd file) seems it's not able to call db2cmd please refer the snapshot as attached. I am guessing we have to set environment variable but not sure that is mandatory. but that is sure on cmd that command doesn't run it requires db2cmd only.

     

    Regards

    Prem