ILM
Use the ILM script function to control the Information Lifecycle Management (ILM) functionality. You can take various actions depending on what you want to achieve. You can query whether the AE database is partitioned with ILM or if ILM is active. You can start or stop ILM, switch out a partition, or delete a partition.
This page includes the following:
General Syntax
ILM (Action [,Parameter [, Parameter]] )
Parameters
- ILM
Controls ILM functionality -
Action
Action to be taken depending on what you want to do. See below for details - Parameter
(Optional) Definitions that go along with the corresponding Action parameter - Parameter
(Optional) Definitions that go along with the corresponding Action parameter
Installation
Syntax
ILM (INSTALLED)
Parameters
-
INSTALLED
Queries whether the AE database has been partitioned with ILM
Return codes:
-
Y
Partitioning with ILM is installed -
N
The AE database is not partitioned
Example
:SET &ILM# = ILM(INSTALLED)
Status
Syntax
ILM (ACTIVE)
Parameters
-
ACTIVE
(MS SQL SERVER only) Queries whether ILM is active
Return codes:
-
Y
ILM is active; new partitions are created, and data is switched out -
N
ILM is not active; the partition is not changed, and no data is switched out
Example
:SET &ILM# = ILM(ACTIVE)
Start and Stop
Syntax
ILM (START)
ILM (STOP)
Parameters
-
START
Activates ILM
(MS SQL Server only) :- If ILM is active, new partitions are created, and data is switched out.
- If ILM is not active, the partition is not changed, and no data is switched out.
-
STOP
Deactivates ILM
Return code: This script function returns the value "0" after a successful start or stop, or the corresponding error number if an error has occurred.
Example
ILM should be deactivated.
:SET &ILM# = ILM(STOP)
Switch-Out
Syntax
ILM (SWITCHOUT [, check])
Parameters
-
SWITCHOUT
(MS SQL Server only) Switches the oldest partition out. -
Check
(Optional) Setting that defines whether a check should be made before data is switched out
Allowed values:-
CHECK (default)
The system checks whether the relevant partition includes data records of active tasks before it starts to switch out data. No switch-out takes place if it includes active tasks. -
NOCHECK
Data is switched out without a prior check
-
Return code: This script function returns the value "0" if the data switch-out has been successful, or if the corresponding error number if an error has occurred.
Important!
- This script function triggers a data switch-out but does not wait until it is complete.
- The number of online partitions specified by the administrator in the ONLINE_PARTITIONS of UC_ILM_SETTINGS variable is irrelevant. For example, if four partitions are online. By using this script function several times, you can achieve that only three, two, or only one partition is online.
- You cannot switch out data of the current partition. At least one partition must be online.
- Switching out data of a partition that includes data records of active tasks will result in data loss.
- Contact the Support team if you want to perform forced switch-outs that involve active tasks.
Example
Before switching out data, you want to check whether there are active tasks. Therefore, you make use of the default value of the SWITCHOUT parameter.
:SET &ILM# = ILM(SWITCHOUT)
Check
Syntax
ILM (CHECK, Partition number)
Parameters
-
CHECK
Checks whether the specified partition includes active objects -
Partition number
Number of the partition
Format: script literal or script variable
Return code: This script function returns the value "0" if the specified partition does not include any active objects.
Example
Partition "25" is checked.
:SET &ILM# = ILM(CHECK, "25")
Deleting a Partition
Syntax
ILM (DROP, Partition [, Check])
Parameters
-
DROP
Deletes the specified partition
Note: You can only drop a partition without losing data if it does not include data records of active tasks. -
Partition
Name or number of the partition
Format: script literal or script variable
Important! If you specify the name of an individual staging table (MS SQL Server), the ILM database user is not used for the deletion process. Instead, the database user specified in the [ODBC] INI file section of the Automation Engine is used. This user requires the corresponding authorizations for this purpose. -
Check
(Optional, Oracle databases only) Setting that defines whether a check should be made before the partition is deleted
Allowed values:-
CHECK (default)
The system checks whether the relevant partition includes active tasks before it starts to delete the partition. No deletion takes place if the partition includes active tasks.
Note: This parameter is not relevant for the MS SQL Server as in the MS SQL Server, you can only delete staging tables. These tables are already checked when they are switched out. -
NOCHECK
The partition is deleted without a prior check
-
Return code: This script function returns the value "0" if the specified partition has been deleted successfully.
Example
The following example deletes the partition number 25:
:SET &ILM# = ILM(DROP, "25")
See also: