Automic Workload Automation

 View Only
  • 1.  DB Maintenance (REORG)

    Posted Jun 29, 2020 03:00 AM
    Hi All,

    Needed some help here. I am trying to set the the DB Maintenance Workflow in our Environment, I tested the jobs in NON Prod and they are working fine. However When I try to execute them in PROD, Archive Job completes successfully however in REORG job I start to get error.

    Process Tab: REORG and UNLOAD in VARA.DATABASE_MAINTENANCE are set to Y
    :SET &reorganizing# = GET_VAR('VARA.DATABASE_MAINTENANCE','REORGANIZING')
    :SET &mclient# = GET_VAR('VARA.DATABASE_MAINTENANCE','CLIENT')

    :IF &reorganizing# = 'Y'
    UCYBDBre -B -S&client#
    :ELSE
    : PRINT 'Reorganization shall not take place.'
    :ENDIF

    @set retcode=%errorlevel%
    @if NOT %ERRORLEVEL% == 0 goto :retcode

    Output : 

    C:\Automic\Automation.Platform\Utility\bin>UCYBDBre -B -S & client#
    Could not find a client value
    ========================================================
    Starting C++ batch mode loader...
    User account (user/domain) <AUTOMIC/TVCORP>
    Startup parameter <-B -S >
    Application name <UCYBDBre>
    Launch from <.\>
    LoadLibrary <.\ucydbreorg.dll>
    LoadLibrary pointer = <00007FFA4E860000>
    Application return code = 1
    'client#' is not recognized as an internal or external command,
    operable program or batch file.

    Someone please suggest if I have made a mistake somewhere. 

    Thanks
    Shani 


  • 2.  RE: DB Maintenance (REORG)
    Best Answer

    Posted Jun 29, 2020 04:00 AM
    If you look at the error message it shows a space between the & and client#. Maybe a non visualizable character when typing or your copy is not exactly what you have in your job.

    C:\Automic\Automation.Platform\Utility\bin>UCYBDBre -B -S & client#

    =>  C:\Automic\Automation.Platform\Utility\bin>UCYBDBre -B -S &client#

    And in your are using a variable &mclient# to set client number but your command is using &client# so this variable is not set, at least in the commands you have indicated.

    Hope thios can help you.

    Regards.

    Alain


  • 3.  RE: DB Maintenance (REORG)

    Posted Jun 29, 2020 04:24 AM
    Hi Shani,

    the reorg program is started using the script variable &client# but this variable is not defined. The routine only creates 
    &reorganizing# and &mclient#. The logic looks like &mclient# has to be used.

    regards,
    Peter


  • 4.  RE: DB Maintenance (REORG)

    Posted Jun 29, 2020 04:45 AM
    Hi Alain/Peter,

    My bad here, Thanks for pointing out. I have corrected t and the job is running now.

    One more question: what is the effect of these jobs on the AE performance also if I run the Unload now, will it effect any running processes.(as per my understanding it should not have any effect on running or defined objects)


    Thanks
    Shani


  • 5.  RE: DB Maintenance (REORG)

    Posted Jun 29, 2020 04:51 AM
    No impact. Act only on ended and deactivated process.


  • 6.  RE: DB Maintenance (REORG)

    Posted Jun 29, 2020 05:09 AM
    Edited by shani kushwaha Jun 29, 2020 05:09 AM
    Thanks Alain,

    REORG got completed however UNLOAD got failed with the Below error. For both the jobs we are using same user account which has admin privileges on the server.

    Connected with agent 'PRD2K12AP14'
    Program 'UC4 Job Messenger' version '12.0.1+build.632' terminated normally

    C:\Automic\Automation.Platform\Utility\bin>UCYBDBun -B REORG
    Permission denied, can't create logfile ..\TEMP\ucybdbun_log_00.txt
    ========================================================
    Starting C++ batch mode loader...
    User account (user/domain) <AUTOMIC/TVCORP>
    Startup parameter <-B REORG >
    Application name <UCYBDBun>
    Launch from <.\>
    LoadLibrary <.\ucybdbun.dll>
    LoadLibrary pointer = <00007FFA4E830000>
    Application return code = 1

    ======================
    Job Defintion:
    :SET &unloading# = GET_VAR('VARA.DATABASE_MAINTENANCE','UNLOADING')
    :IF &unloading# = 'Y'
    UCYBDBun -B REORG
    :ELSE
    : PRINT 'Unloading of data records shall not take place.'
    :ENDIF

    @set retcode=%errorlevel%
    @if NOT %ERRORLEVEL% == 0 goto :retcode

    Thanks
    Shani


  • 7.  RE: DB Maintenance (REORG)

    Posted Jun 30, 2020 05:23 AM
    Hi,

    You may have another process running also a DB.unload at the same time. You can run only one execution of the utility program at a time as they are creating the log file ...00.txt and rename older log files.

    Maybe also you can have a previous file created with a specific authorization that cannot be renamed ....01.txt with the account you are using for the maintenance.

    Happen very often on Linux/Unix when people are using a mix of regular account and root account for the same functions. Happen also on Windows with local vs domain account.

    Regards.

    Alain


  • 8.  RE: DB Maintenance (REORG)

    Posted Jul 01, 2020 06:47 AM
      |   view attached
    Hi Alain,

    I removed the old files and was able to run the jobs however I have few queries.

    1: UNLOAD job failed again with error. I have attached the logfile. (U00037058 Invalid batch mode: 'null') (RETCODE 1)
    2: I had to remove the logs for all the jobs (ARCH, REORG and UNLOAD) , does it mean I would need to remove the files every time.


    Thanks
    Shani

    Attachment(s)

    txt
    DB unload log.txt   16 KB 1 version


  • 9.  RE: DB Maintenance (REORG)

    Posted Jul 01, 2020 12:06 PM
    Hi All,

    It is resolved now. needed to use the command in "lowercase"


    Thanks
    Shani