Microsoft Identity Integration Server 2003 Developer Reference |
Caution This method permanently removes the stored run histories from the server. If you need to preserve the run history, use the MIIS_RunHistory object to retrieve the run histories prior to deleting them from the server.
string ClearRuns( string EndingBefore );
Note If you want to delete the run histories based on a local date and time, convert the local time to UTC.
The format of this parameter is yyyy-MM-dd HH:mm:ss.fff.
Format specifier | Description |
---|---|
yyyy | Specifies the four-digit year |
MM | Specifies the two-digit month in the range of 1 to 12 |
dd | Specifies the two-digit day of the month in the range of 1 to 31 |
HH | Specifies the two-digit hour of the day in 24-hour format in the range of 0 to 23 |
mm | Specifies the two-digit minute of the day in the range of 0 to 59 |
ss | Specifies the two-digit second of the day in the range of 0 to 59 |
fff | Specifies the three-digit fractions of a second in the range of 0 to 999 |
Note To delete run histories by date only, omit the time units in the parameter.
Return code | Description |
---|---|
success | The run histories with end times earlier than the specified time were successfully deleted from the server. |
access-denied | The user running this method is not a member of the Microsoft Identity Integration Server 2003 security groups. Verify that the user is a member of one of these groups. |
invalid-date-parameter | The specified date is in the wrong format or run histories do not exist for this date. Verify that the specified date is in the correct format. |
We recommended that you remove run histories regularly from the server, since a large number of run histories can detract from the performance of Identity Manager.
The following example shows you how to use Visual Basic Scripting Edition (VBScript) to delete run histories from the server with a run end date that is earlier than or equal to March 31, 2003 (UTC).
Dim Service Dim ManagementAgent Dim DeleteDate Set Service = GetObject("winmgmts:\root\MicrosoftIdentityIntegrationServer") Set Server = Service.Get("MIIS_Server.Name='MIIS_Server1'") DeleteDate = "2003-03-31" WScript.Echo "Deleting Run Histories from " & DeleteDate WScript.Echo "Result: " & Server.ClearRuns(DeleteDate)
The following example shows you how to delete the run histories with a run end date that is earlier than or equal to the time 13:25:00.000 on March 31, 2003 (UTC).
Dim Service Dim ManagementAgent Dim DeleteDate Set Service = GetObject("winmgmts:\root\MicrosoftIdentityIntegrationServer") Set Server = Service.Get("MIIS_Server.Name='MIIS_Server1'") DeleteDate = "2003-03-31 13:25:00.000" WScript.Echo "Deleting Run Histories from " & DeleteDate WScript.Echo "Result: " & Server.ClearRuns(DeleteDate)
Server: Requires Microsoft Identity Integration
Server 2003.
Header: Declared in mmswmi.mof.