| Sv translation | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||
Если дальнейшее хранение данных не требуется, то Вы можете воспользоваться процедурой удаления ежедневных ТП (iwtm_iwtm_delete_tablespaces). Данная процедура позволяет автоматически удалить все данные, хранящиеся в табличном пространстве, сегменты, табличное пространство и файлы данных.
В результате выполнения этой процедуры удаляются все ежедневные ТП (в т.ч. информация об архивированных ежедневных ТП), которые удовлетворяют следующему условию: Дата создания табличного пространства меньше или равна разнице между текущей датой и заданным интервалом времени для удаления табличного пространства.
Рекомендуется запускать задание на удаление данных ежедневно. В противном случае количество удаляемых данных увеличится, что приведет к большим временным затратам на выполнение данной процедуры и, как следствие, к увеличению времени простоя сервера Traffic Monitor.
Определение интервала времени для отключения ежедневных ТП
Удаление архивированных ТП При отключении в БД архивированных ежедневных ТП в Системе остаются файлы данных (по умолчанию в директории /
Удаление ежедневных ТП вручную Если вам требуется немедленно удалить ежедневные ТП (например, из-за нехватки места в файловой системе был изменен интервал удаления, но следующий запуск задания произойдет нескоро), от имени владельца схемы базы данных выполните сценарий:
Если требуется удалить одно ЭТП, выполните сценарий, указав его номер (
Удаление ежедневных ТП с помощью скрипта Если вам требуется настроить автоматическое удаления ежедневных ТП, используйте скрипт /opt/iw/tm5/bin/dbtools/dbconf-iwdrop-postgres.sh или /opt/iw/tm5/bin/dbtools/dbconf-jobs-postgres.sh. Возможны команды:
|
| Sv translation | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||
If you do not need to further store the data, you can use the procedure for deleting daily tablespaces (iwtm_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 tablespaces (including information about the archived daily tablespaces), 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.
We recommend running a job to delete data daily. Otherwise, the amount of deleted data increases, which 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). Specify period to store information of archived tablespaces:
where: 1 indicates that automatical deletion is enabled (to disable it, specify 0 instead); D is a number of days after which the daily TS will be deleted by the System. This number should be larger than the set number of days before archiving the daily tablespace (see "Автоматическое архивирование ежедневных табличных пространств"). After removal of the tablespaces disconnected from the database (with Offline status), they become unavailable in the System. Deleting archived tablespaces When deleting archived daily tablespaces from the database, datafiles remain in the System (by default, they are stored in the /
Deleting daily tablespaces manually If you need to delete daily tablespaces immediately (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), then run the following script on behalf of the database scheme owner:
If you need to delete only one daily tablespace, then run the script with this tablespace number (
Deleting daily tablespaces with a script If you want to configure automatic deletion of daily tablespaces, use /opt/iw/tm5/bin/dbtools/dbconf-iwdrop-postgres.sh or /opt/iw/tm5/bin/dbtools/dbconf-jobs-postgres.sh script. You can use the following commands:
|