none
MIISClearRunHistory syntax RRS feed

  • Question

  • I would like to use MIISClearRunHistory to save run history and clear them.

    Oldest operation I can see in Operation of MIIS is 2012/6/29.

    I would like to save and delete day by day

    It is production environment ,so I should be carefull.

    MIISClearRunHistory /d:06-29-2012 /s:servername  /f c:filepath\operationslog0629.log

    is correct in syntax ?

    /u user need to be miis service account ?

    Syntax:  MIISClearRunHistory [/d:mm-dd-yyyy [/t:hh:mm[:ss]] | /pr:preservedays]
             [/s:servername [/u:[domain\]user [/p:password]]] [/f filename]
             [/l:loglevel] [/y]

    Parameters:

    Value                   Description

    /d:     mm-dd-yyyy      Specifies the date of the latest run that will be
                            deleted from the server. Runs after this specified
                            date will be preserved. If the date parameter is not
                            specified, ClearRunHistory uses the current date.

    /t:     hh:mm[:ss]      Specifies the time of the latest run for the date
                            specified in the /d switch. It should be specified in
                            24 hour format - Hour:Minute:Seconds, If the /d switch
                            is specified without the /t switch then the time
                            parameter is automatically set to midnight of the
                            specified date.

    /pr:    preservedays    Specifies the number of days to preserve.  If the
                            /d switch is specified, /pr is ignored.

    /s:     servername      Specifies the remote MIIS server name.

    /u:     [domain\]user   Specifies the user account authorized to access the
                            MIIS server.

    /p:     password        Specifies the password for the given user.

    /f      [filename]      Specifies that the execution history should be saved
                            to a plain text file before deleting it. You can
                            optionally specify the file name. If the file name is
                            not specified the history will be saved to a file named
                            MIISClearRunHistoryMMDDYYYYHHMMSS.txt in the current
                            working directory.

    /l:     loglevel        Specifies the status message logging level.
                            1 = All (Verbose)  2 = Warnings  3 = Errors
                            A log file named MIISClearRunHistory.log will be
                            created in the current working directory.

    /y                      Suppresses prompting to delete management agent
                            run history without saving to a file

    /?                      Displays the Help/Usage.

    Examples:

    To clear all the management agent run histories before June 1, 2003,
    12:00:00 AM, to the default text file, with verbose logging, use the following
    command:

    MIISClearRunHistory /f /l:1 /d:06-01-2003

     

    Wednesday, September 12, 2012 8:03 AM

Answers

  • I would advise you to use this option:

    /pr:    preservedays    Specifies the number of days to preserve.  If the
                            /d switch is specified, /pr is ignored

    And specify number of days you want to keep in history.  For the first trim if this will be large number of history records do this on some lower usage period but subsequently just schedule this to some time when your MIIS is not processing any other jobs and it will not put too much load on the server anyway as it will just clear one day at each time if you will run it daily

    Wednesday, September 12, 2012 8:46 AM

All replies

  • I would advise you to use this option:

    /pr:    preservedays    Specifies the number of days to preserve.  If the
                            /d switch is specified, /pr is ignored

    And specify number of days you want to keep in history.  For the first trim if this will be large number of history records do this on some lower usage period but subsequently just schedule this to some time when your MIIS is not processing any other jobs and it will not put too much load on the server anyway as it will just clear one day at each time if you will run it daily

    Wednesday, September 12, 2012 8:46 AM
  • OK - for low machine spec - make sure that you have some free disk space on a disk where MIIS database logsand SQL Temp DB is stored. These databases will grow during the operation.
    Wednesday, September 12, 2012 11:42 AM