| Sv translation | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Архивирование ЕТП вручную производится в порядке, представленном ниже. Выборка ежедневных табличных пространств и файлов данных Список отключаемых табличных пространств можно получить, выполнив запросы к базе данных от имени владельца схемы базы данных. Запросы составляются в соответствии со стратегией архивирования, принятой в вашей организации. Пример. Для выборки ежедневных ТП с указанием основных атрибутов (название, идентификатор, путь, тип, дата создания, размер) можно применить следующий запрос:
tbs_name | tbs_id | tbs_type | part_date | pg_tablespace_location | pg_size_pretty | status | note ----------+--------+----------+------------+------------------------+----------------+--------+-------------------- iwtm_2 | 2 | 1 | 2017-03-30 | /u02/pgdata/iwtm_2 | 692 kB | 0 | Partitions created iwtm_3 | 3 | 2 | 2017-03-30 | /u02/pgdata/iwtm_3 | 692 kB | 0 | Partitions created iwtm_4 | 4 | 0 | 2017-03-31 | /u02/pgdata/iwtm_4 | 25 MB | 0 | Partitions created iwtm_5 | 5 | 1 | 2017-03-31 | /u02/pgdata/iwtm_5 | 692 kB | 0 | Partitions created iwtm_6 | 6 | 2 | 2017-03-31 | /u02/pgdata/iwtm_6 | 692 kB | 0 | Partitions created iwtm_7 | 7 | 0 | 2017-04-01 | /u02/pgdata/iwtm_7 | 692 kB | 0 | Partitions created iwtm_8 | 8 | 1 | 2017-04-01 | /u02/pgdata/iwtm_8 | 692 kB | 0 | Partitions created iwtm_9 | 9 | 2 | 2017-04-01 | /u02/pgdata/iwtm_9 | 692 kB | 0 | Partitions created
Отключение ежедневных табличных пространств от базы данных
Перенос файлов данных Перенесите каталоги с заархивированными табличными пространствами, принадлежащие отключенным ежедневным ТП, на другой носитель информации. Для получения списка отключенных табличных пространств используйте команду: | ||||||||||
| Sv translation | ||||||||||
| ||||||||||
Manual archiving of daily tablespaces is performed in the following steps: Selecting daily tablespaces and data files To get a list of disconnected tablespaces, you must run the following query to the database under the account of the database schema owner. The queries are built according to the archiving policy of your company. For example, to select the daily TS storing the objects which were intercepted more than 100 days ago, run the following query:
tbs_name | tbs_id | tbs_type | part_date | pg_tablespace_location | pg_size_pretty | status | note
----------+--------+----------+------------+------------------------+----------------+--------+--------------------
iwtm_2 | 2 | 1 | 2017-03-30 | /u02/pgdata/iwtm_2 | 692 kB | 0 | Partitions created
iwtm_3 | 3 | 2 | 2017-03-30 | /u02/pgdata/iwtm_3 | 692 kB | 0 | Partitions created
iwtm_4 | 4 | 0 | 2017-03-31 | /u02/pgdata/iwtm_4 | 25 MB | 0 | Partitions created
iwtm_5 | 5 | 1 | 2017-03-31 | /u02/pgdata/iwtm_5 | 692 kB | 0 | Partitions created
iwtm_6 | 6 | 2 | 2017-03-31 | /u02/pgdata/iwtm_6 | 692 kB | 0 | Partitions created
iwtm_7 | 7 | 0 | 2017-04-01 | /u02/pgdata/iwtm_7 | 692 kB | 0 | Partitions created
iwtm_8 | 8 | 1 | 2017-04-01 | /u02/pgdata/iwtm_8 | 692 kB | 0 | Partitions created
iwtm_9 | 9 | 2 | 2017-04-01 | /u02/pgdata/iwtm_9 | 692 kB | 0 | Partitions created
Moving Datafiles Transfer the data files belonging to the disabled daily TS to the other data storage device. To get a list of data files for all disconnected tablespaces, use the following script: |