PANTHEON™ Help

 Категории
 Главна страна - Добре дојдовте во помош за PANTHEON
[Collapse]PANTHEON
 [Collapse]PANTHEON упатства
  [Expand]Водич за PANTHEON Farming
  [Collapse]Водич за Datalab PANTHEON™
   [Expand]Помош
   [Expand]ПОС
   [Expand]Подесувања
   [Expand]Нарачки
   [Expand]Материјално
   [Expand]Производство
   [Expand]Сервис
   [Expand]ПОС
   [Expand]Финансии
   [Expand]Кадри
   [Expand]Работна површина
   [Expand]Анализи
    Додатно
   [Expand]Аналитика
   [Expand]Пораки и предупредувања
   [Collapse]Системско окружување за Даталаб програми
    [Expand]Безбедносна политика
    [Expand]Инсталација
    [Expand]Автоматско извршување
    [Expand]PANTHEON системска околина
    [Collapse]Администрација на бази
      Converting Posts to a Different Currency
      ФормулаПарсер
     [Collapse]Performance Tweaking
       Moving UNDO Tables
      Поправка на датумот на документот во книгите
    [Expand]Даталаб алатки
   [Expand]Официјални објаснувања
    Речник на термини
   [Expand]Дополнителни програми
   [Expand]Застарени производи
  [Expand]Водич за PANTHEON Ретал
  [Expand]Водич за PANTHEON Вет
 [Collapse]PANTHEON кориснички прирачници
  [Expand]Кориснички прирачник Datalab PANTHEON™
  [Expand]Корисничко упатство за PANTHEON Ретал
  [Expand]Корисничко упатство за PANTHEON Vet
  [Expand]Корисничко упатство за ПАНТЕОН Земјоделство
[Collapse]PANTHEON Web
 [Collapse]Водич за PANTHEON Web
  [Expand]Водич за PANTHEON Web Light
  [Expand]Водич за PANTHEON Chronos Mini
  [Expand]Водич за PANTHEON Web Terminal
  [Expand]Водич за PANTHEON Web Legal
  [Expand]Архива на стари производи
 [Collapse]Кориснички прирачник за PANTHEON Web
  [Expand]Најава во PANTHEON Web
  [Expand]Како да започнете со PANTHEON Web
  [Expand]Кориснички прирачник за PANTHEON Web Light
  [Expand]Кориснички прирачник за PANTHEON Web Terminal
  [Expand]Кориснички прирачник за PANTHEON Web Legal
  [Expand]Стара архивa на производи
[Collapse]PANTHEON Гранула
 [Collapse]Водич за PANTHEON Гранули
  [Expand]Гранула Кадри
  [Expand]Гранула Патни налози
  [Expand]Гранула Документи и задачи
  [Expand]Гранула Контролна табла
  [Expand]Гранула B2B нарачки
  [Expand]Гранула Сервис на терен
  [Expand]Инвентаризација на фиксни средства
  [Expand]Гранула Попис на магацини
 [Collapse]Кориснички прирачник за PANTHEON Гранули
   Започнување
   Користење на PANTHEON Гранули во фиктивната компанија Текта
  [Expand]Гранули и активација
  [Expand]Гранула Кадри
  [Expand]Гранула Патни налози
  [Expand]Гранула Документи и Задачи
  [Expand]Гранула Б2Б нарачки
  [Expand]Гранула Контролна табла
  [Expand]Гранула Сервис на терен
   PANTHEON Гранула - FAQ
  [Expand]Инвентаризација на фиксни средства
  [Expand]Гранула Попис на магацин
   Архива
[Expand]Кориснички сервер

Load Time: 812,4942 ms
"
  5426 | 6162 | 66169 | Localized
Label

Moving UNDO Tables

Moving UNDO Tables

Moving UNDO Tables

UNDO tables hold a history of changes (if the Changelog feature is enabled). For every change made to PANTHEON's database, a record is put into UNDO tables, along with who made the change and when.

UNDO tables are growing very fast and thus take up much space, potentially decreasing server database server performance and increasing backup size.

Moving UNDO tables to another location may:

  • improve performance,
  • decrease server load,
  • decrease backup file size.

Moving UNDO Tables to a Secondary Server

Moving UNDO tables to a secondary server reduces the load of your primary server and keeping the data from UNDO tables archived. A recommended set-up is as follows:

 

55104.png

All UNDO records over a certain age are moved from the primary to the secondary server.

The moved data is not available online, but can be restored as needed.

 

First, create a database on the secondary server.

055067.gif In the example below, the live database on the primary server is named PRI_SERVER.PANTHEON and the archive on the secondary server SEC_SERVER.ARHIV_UNDO. The primary and secondary server are linked servers.

On the primary server, create an SQL Server job that moves old records (older than 3 months in the example) to the secondary server. The job has two steps:

Update Structure

The structure of PANTHEON's database is often upgraded, that is why the structure of the archive database must be synchronized with the live database before moving data.

Move Data

The following script moves records from the most commonly used tables to the archive database. You can add or remove tables as necessary.

insert into SEC_SERVER.ARHIV_UNDO.dbo.BUDGET_UNDO
select * from PRI_SERVER.PANTHEON.dbo.BUDGET_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.BUDGET_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.BUDGETPOZ_UNDO
select * from PRI_SERVER.PANTHEON.dbo.BUDGETPOZ_UNDO 
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.BUDGETPOZ_UNDO 
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.CHSTATPROM_UNDO
select * from PRI_SERVER.PANTHEON.dbo.CHSTATPROM_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.CHSTATPROM_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.CONTACTS_UNDO
select * from PRI_SERVER.PANTHEON.dbo.CONTACTS_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.CONTACTS_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.CONTADDRESS_UNDO
select * from PRI_SERVER.PANTHEON.dbo.CONTADDRESS_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.CONTADDRESS_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.PROMET_UNDO
select * from PRI_SERVER.PANTHEON.dbo.PROMET_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.PROMET_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.PROMETPOZ_UNDO
select * from PRI_SERVER.PANTHEON.dbo.PROMETPOZ_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.PROMETPOZ_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.SERIALNOP_UNDO
select * from PRI_SERVER.PANTHEON.dbo.SERIALNOP_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.SERIALNOP_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.SUBJEKT_UNDO
select * from PRI_SERVER.PANTHEON.dbo.SUBJEKT_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.SUBJEKT_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.TEME_UNDO
select * from PRI_SERVER.PANTHEON.dbo.TEME_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.TEME_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

insert into SEC_SERVER.ARHIV_UNDO.dbo.TEMEPOZ_UNDO
select * from PRI_SERVER.PANTHEON.dbo.TEMEPOZ_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())
delete from PRI_SERVER.PANTHEON.dbo.TEMEPOZ_UNDO
where _dl_LastCh < DateAdd(mm,-3,GetDate())

 

Moving UNDO Tables within the Same Server

Moving UNDO tables from one database to another on the same server resolves the issue only partially. The live database's size is decreased, but the server load is not significantly reduced, because it still spends some resources (cache, memory) on the archive database.

 



 

Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!