[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 574: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 630: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
Russian Progress User Group • OEReplication на два агента и -DBService replserv не нужен
Страница 1 из 1

OEReplication на два агента и -DBService replserv не нужен

Добавлено: 06 мар 2009, 08:54
Старожыл
OEReplication на два агента и факт что параметр -DBService replserv не нужен для source репликации!

Для настройки необходимо сделать следующее:
1. Создать резервную копию исходной базы данных
2. Актуализировать файл структуры базы данных (.st)
3. Если ai-журналирование не включено, включить его
3,1 Активировать автоматическое архивирование ai-файлов
4. Активировать репликацию на базе
Все это можно прочитать у нашего «букиниста» Валерия по ссылке

А вот далее я предлагаю свой рецепт: /* кстати мой рецепт вовсе не обязательно лучше */
Активировать репликацию на базе нужно после создания файла свойств
/* у Валерия это пункт 4, а создание файла свойствойств это пункт 6 */

Соответсвующий файл необходимо скопировать в каталог базы данных и переименовать, заменив слово source/target на имя базы.

source.repl.properties:

#
[server]
control-agents=agent1, agent2
database=</path>
defer-agent-startup=480
schema-Lock-Action=force
repl-Keep-Alive=7200
agent-shutdown-action=recovery
transition-timeout=600
transition=manual

[control-agent.agent1]
name=<name>
connect-timeout=86400
critical=0
database=</path>
host=<IP>
port=<port1>
connect-timeout=120
replication-method=async

[control-agent.agent2]
name=<name>
connect-timeout=86400
critical=0
database=</path>
host=<IP>
port=<port2>
connect-timeout=120
replication-method=async

[transition]
database-role=normal



Восстановить целевые базы данных на сервереах.
Создать файл свойств для целевой базы 1:

#
[agent]
name=<name>
database=</path>
connect-timeout=86400
listener-minport=40000
listener-maxport=50000

[transition]
database-role=normal

Активировать репликацию целевой базы:
proutil <target> -C enableSiteReplication target

Выключить(!) ai-журналирование:
rfutil <target> -C aimage end
rfutil <target> -C aiarchiver disable

Запустить целевую базу:
proserve -db <target> -DBService replagent -S <port1>

Создать файл свойств для целевой базы 2:

#
[agent]
name=<name>
database=</path>
connect-timeout=86400
listener-minport=40000
listener-maxport=50000

[transition]
database-role=normal

Активировать репликацию целевой базы:
proutil <target> -C enableSiteReplication target

Выключить(!) ai-журналирование:
rfutil <target> -C aimage end
rfutil <target> -C aiarchiver disable

Запустить целевую базу:
proserve -db <target> -DBService replagent -S <port2>



И теперь самое важное что я хотел сообщить:

В статье Валерия пункт 12. – Запустить исходную базу: proserve -db <source> -DBService replserv. Но я обнаружил что запускать исходную базу с -DBService replserv не нужно(!)
Основываясь на вышеуказанном утверждении можно включать и выключать репликацию в процессе работы пользователей. Я имею ввиду если на один логин-брокер повешана и репликация и подключение пользователей на –S порт.

Мои коллеги «чудо-разработчики» настроили WebSpeed на порт для репликации. А также пользователи у нас подключаются непосредственно к БД командой _progres <db> не используя порт -S.
В такой конфигурации при отключении репликации иногда возникает сообщение 10356: Access to database <db> not allowed. The database is enabled for site replication but either replication is not running, or this process is not authorised to open a replication enabled database.

Мне это надоело и я стал стартовать исходную БД вот так:
$DLC/bin/_mprosrv $DBDIR/$DBNAME -aiarcdir $DBDIR/fullai/ -aiarcdircreate -Mn 21 -n 200 -B $BPool -L 60000 -trig $PTRIGLIB -bibufs 25 -aibufs 25 -spin 40000 -semsets 5 -bithold 650 -bistall
$DLC/bin/_mprosrv $DBDIR/$DBNAME -m3 -N TCP -S $WEBSPEEDPORT -minport 40000 -maxport 50000 -Mm 1024 -Mpb 20 -Ma 5 -Mi 3


Как можно увидеть -DBService replserv в строке не учавствует. После старта базы данных настраиваю source.repl.properties файл и даю команду proutil <source> -C enableSiteReplication source. В этот момент БД считывает данные из source.repl.properties файла.

Далее на двух таргет серверах накатываю на созданный бэкап бд с включенной соурс репликацией на таргет бд.
И стартую их так:
Первый таргет сервер:
$DLC/bin/_mprosrv $DBDIR/$DBNAME -aiarcdir $DBDIR/fullai/ -aiarcdircreate -DBService replagent -Mn 21 -n 200 -B $BPool -L 60000 -trig $PTRIGLIB -bibufs 25 -aibufs 25 -spin 40000 -semsets 5 -bithold 650 -bistall
$DLC/bin/_mprosrv $DBDIR/$DBNAME -m3 -DBService replagent -N TCP -S $REPLPORT1 -minport 40000 -maxport 50000 -Mm 16300 -Mpb 20 -Ma 5 -Mi 3


Второй таргет сервер:
$DLC/bin/_mprosrv $DBDIR/$DBNAME -aiarcdir $DBDIR/fullai/ -aiarcdircreate -DBService replagent -Mn 21 -n 200 -B $BPool -L 60000 -trig $PTRIGLIB -bibufs 25 -aibufs 25 -spin 40000 -semsets 5 -bithold 650 -bistall
$DLC/bin/_mprosrv $DBDIR/$DBNAME -m3 -DBService replagent -N TCP -S $REPLPORT2 -minport 40000 -maxport 50000 -Mm 16300 -Mpb 20 -Ma 5 -Mi 3


Как можете видеть -DBService replagent в -m3, а не в главном логин брокере. Прошу не спрашивать почему я так решил стартовать таргет бд таким путем. Получится флуд. У каждого свое субъективное мнение.

Далее на соурс сервере даю команду $DLC/bin/dsrutil $DBDIR/$DBNAME -C restart server. Начинается синхронизация и следом Normal Processing!


__________________
p.s. этой статье предшевствовали две причины:
1. Ровно год назад я настроил репликацию в первый раз
2. Тоже хотелось написать статью

Re: OEReplication на два агента и -DBService replserv не нуж

Добавлено: 06 мар 2009, 10:06
Arelav