| 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 You can archive daily tablespaces is performed in the following steps:manually. The order is described below. Selecting daily tablespaces and data files To You can get a list of disconnected tablespaces, you must run the following query tablespaces that can be disconnected by running queries to the database under the account on behalf of the database schema owner. The queries are built made 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 . Example. To select daily tablespaces with basic attributes (name, identifier, path, types, creation date, size), you can use the following query:
Daily TS are located in separate catalogues. To get names of these catalogues, run the following command:
tbs_name | tbs_id | tbs_type | part_date | pg_tablespace_location | pg_size_pretty | status | note ----------+--------+----------+------------+------------------------+----------------+--------+--------------------
Name corresponds to values from sample select tbs_name, tbs_id from iwtm.tbs_list
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 carrierData Files Move catalogs with archived tablespaces which belong disconnected daily tablespaces to a different storage. To get a the list of data files for all disconnected tablespaces, use the following scriptcommand: |