on ‎2009 Oct 09 12:07 PM
Hi all,
MII stores the job history forever, if it is not deleted by a user in the scheduler or if the job itself is not deleted.
However, is it possible to delete only the history of a specific time intervall using MII standard functions? Say I would like to keep the job history from the last 30 days. Is there some service which provides a mode to delete the history using start and end time?
Michael
Request clarification before answering.
Michael,
One option would be to enable a cleanup job at the NW database level, and manage it there.
Or you could enable a weekly or daily task in the scheduler to run a simple SQLQuery temple. If you are already connected to the NW database through a fully capable JDBC driver (not a NW Datasource that trys to use the default connection used by MII in the background) and have established a working data server, your FixedQuery syntax could incorporate an approach such as the following sample:
DELETE FROM TABLENAME WHERE DATECOLUMN <= [SD]This way the date prefix/suffix can come from the Data Server settings (DatePrefix + InternalDateFormat + DateSuffix) and the date value will come from the query time engine. Just set your Duration to 30 Days and MII will set the EndDate of the query to the current time on the server and the StartDate will be ED - 30 Days. Since we only want the value of the date 30 days in the past we obviously don't include the ED token in our query.
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jeremy,
thanks for the explanation. I will talk to our server people, though I doubt that I will be allowed to create a direct JDBC connection to the MII NW database in MII.
Anyway I will try out the [SD] example with another table, as I haven't used the date settings from the Data Server yet.
Michael
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.