| Sv translation | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||
Если дальнейшее хранение данных не требуется, то Вы можете воспользоваться процедурой удаления ежедневных ТП (<SchemaOwner>iwtm_iwtm_delete_tablespaces). Данная процедура позволяет автоматически удалить все данные, хранящиеся в табличном пространстве, сегменты, табличное пространство и файлы данных.
В результате выполнения этой процедуры удаляются все ежедневные ТП (и в т.ч. информация о заархивированных об архивированных ежедневных ТП), которые удовлетворяют следующему условию: Дата создания табличного пространства меньше или равна разнице между текущей датой и заданным интервалом времени для удаления табличного пространства.
Рекомендуется запускать задание на удаление данных ежедневно. В противном случае количество удаляемых данных увеличится, что приведет к большим временным затратам на выполнение данной процедуры и, как следствие, к увеличению времени простоя сервера Traffic Monitor.
Определение интервала времени времени для удаления отключения ежедневных ТП
1 – показатель того, что автоматическое удаление включено (чтобы выключить, вместо 1 используйте значение 0)
D – количество дней, по истечении которого ежедневное табличное пространство будет удаляться Системой.
1 – показатель того, что автоматическое удаление включено (чтобы выключить, вместо 1 используйте значение 0)
D – количество дней, по истечении которого ежедневное табличное пространство будет удаляться Системой.
Если вам требуется немедленный запуск процедуры удаления ежедневных
Удаление архивированных ТП При отключении в БД архивированных ежедневных ТП в Системе остаются файлы данных (по умолчанию в директории /
Удаление ежедневных ТП вручную Если вам требуется немедленно удалить ежедневные ТП (например, из-за нехватки места в файловой системе был изменен интервал удаления, но следующий запуск задания произойдет нескоро), от имени владельца схемы базы данных выполните следующий сценарий:
Удаление ежедневных ТП с помощью скрипта Если вам требуется настроить автоматическое удаления ежедневных ТП, то имеет смысл использовать используйте скрипт /opt/iw/tm5/bin/dbtools/dbconf-iwdrop-postgres.sh. Возможны команды:
Решение:
| |||||||||||||||||||||||||||||||||||||||||||||
| Sv translation | |||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||
If you do not need to further store the data, you can use the procedure for deleting daily TS (<SchemaOwner>_iwtm_delete_tablespaces). The procedure automatically deletes all the data in a tablespace, segments, and also the tablespace and data files.
As a result, this procedure will remove all the daily TS (and including information about the archived daily TS), which satisfy the following condition: The date of creating a tablespace is less or equal to the difference between the current date and the specified time interval for deleting the tablespace.
While the tablespaces are being deleted, the iw_deliverd, iw_dbloader, iw_updater daemons are automatically stopped. When the deletion procedure is completed, the processes will be automatically restarted. It is recommended to run the job to delete data on a daily basis. Otherwise, the amount of deleted data increases, which in turn increases the time for running the procedure and consequently increases the idle time of the Traffic Monitor Server.
Setting the interval of daily TS deletion To perform TS deletion automatically (by default the function is disabled) you can use the following scripts (run under the account of the database schema owner):
where: 1 indicates that authomatical deletion is enabled (to disable specify 0 instead); D is a number of days at the end of which the daily TS will be deleted by the System.
where: 1 indicates that automatical deletion is enabled (to disable specify 0 instead); D is a number of days at the end of which the daily TS will be deleted by the System.
where: 1 indicates that automatical deletion is enabled (to disable specify 0 instead); D is a number of days at the end of which the daily TS will be deleted by the System. Manual run If you need an immediate launch of procedure for deletion of daily TS (e.g., due to file system space shortage the interval of deletion was changed, but the next launch of the job will not happen soon), run the following script:
Procedure implementation using script If you require setting up an automatic deletion of daily TS, /opt/iw/tm5/bin/dbtools/dbconf-iwdrop-postgres.sh. script is to be used. The following commands are to be used: | |||||||||||||||||||||||||||||||||||||||||||||
| Purpose | Command | Set up deletion period |
, выполните команды:
|
|
|
Enable automatic deletion
|
Disable automatic deletion
/opt/iw/tm5/bin/dbtools/dbconf-iwdrop-postgres.sh disable violation|noviolation|other [-v]/opt/iw/tm5/bin/dbtools/dbconf-iwdrop-postgres.sh show [-v]Example.
Objective: delete all the objects with "No violation" status, older than 15 days.
Solution:
/opt/iw/tm5/bin/dbconf-iwdrop-postgres.sh set noviolation 15 [-v]
|