Unix Technical Forum

ER - inital data loading problems

This is a discussion on ER - inital data loading problems within the Informix forums, part of the Database Server Software category; --> Hello everyone. I'm setting up ER on three servers in primary-target mode. All servers run Linux kernel 2.6 (Debian, ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 11:43 AM
Davorin Kremenjas
 
Posts: n/a
Default ER - inital data loading problems

Hello everyone.
I'm setting up ER on three servers in primary-target mode.
All servers run Linux kernel 2.6 (Debian, Suse SLES 9 and Redhat RHEL 4) and
IDS 10.00 UC4.
SLES and RHEL are setup exactly as machine notes say, and Debian is setup
accordingly.

At the moment it's only testing scenario, but the production system will be
identical.
I sucessfully initialized ER on all servers. Here is the output of cdr list
server command:

SERVER ID STATE STATUS QUEUE CONNECTION CHANGED
-----------------------------------------------------------------------
g_debian 111 Active Local 0
g_redhat 311 Active Connected 0 Mar 13
12:05:36
g_suse 211 Active Connected 0 Mar 13
12:07:08

g_debian is primary server group, g_redhat and g_suse are targets

After that I created stores_demo database on all servers, but deleted tables
from stores_demo@g_suse and stores_demo@g_redhat because I wanted to test
initial synchronization and loading the data.

Now came template definition:
cdr define template template_sd --conflict=ignore --master
g_debian --ats --floatieee --ignoredel
y --exclusive --all --database=stores_demo


and then the realization of template, first for the primary...

cdr realize template template_sd stores_demo@g_debian



....and then for the targets...

cdr realize template
template_sd --syncdatasource=g_debian --autocreate --dbspace
<target_dbspace> --target

stores_demo@g_suse stores_demo@g_redhat



Both "cdr realize template" command were run on the primary server.



The result is: everything's fine EXCEPT there are no rows in tables on
targets. The tables got autocreated on targets but not populated with data.

I suppose I made a mistake throughout the process, but after googling and
RTFMing I didn't find where.



Then I tried to synchronize the data "manually" with:

cdr sync replicateset --master=g_debian --replset template_sd --all



but I get error like this one:

SYNC: Replicate template template_sd_ifxdebian_er_2_6_state is not active.



Now I'm stuck here, waiting for any of your ideas...



Thanks everyone!




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 11:43 AM
Madison Pruet
 
Posts: n/a
Default Re: ER - inital data loading problems

Can I see the exact commands that you used?

"Davorin Kremenjas" <davorin.kremenjas@alfatec.hr> wrote in message
news:dv3pbu$1l2$1@ss405.t-com.hr...
> Hello everyone.
> I'm setting up ER on three servers in primary-target mode.
> All servers run Linux kernel 2.6 (Debian, Suse SLES 9 and Redhat RHEL 4)

and
> IDS 10.00 UC4.
> SLES and RHEL are setup exactly as machine notes say, and Debian is setup
> accordingly.
>
> At the moment it's only testing scenario, but the production system will

be
> identical.
> I sucessfully initialized ER on all servers. Here is the output of cdr

list
> server command:
>
> SERVER ID STATE STATUS QUEUE CONNECTION CHANGED
> ----------------------------------------------------------------------

-
> g_debian 111 Active Local 0
> g_redhat 311 Active Connected 0 Mar 13
> 12:05:36
> g_suse 211 Active Connected 0 Mar 13
> 12:07:08
>
> g_debian is primary server group, g_redhat and g_suse are targets
>
> After that I created stores_demo database on all servers, but deleted

tables
> from stores_demo@g_suse and stores_demo@g_redhat because I wanted to test
> initial synchronization and loading the data.
>
> Now came template definition:
> cdr define template template_sd --conflict=ignore --master
> g_debian --ats --floatieee --ignoredel
> y --exclusive --all --database=stores_demo
>
>
> and then the realization of template, first for the primary...
>
> cdr realize template template_sd stores_demo@g_debian
>
>
>
> ...and then for the targets...
>
> cdr realize template
> template_sd --syncdatasource=g_debian --autocreate --dbspace
> <target_dbspace> --target
>
> stores_demo@g_suse stores_demo@g_redhat
>
>
>
> Both "cdr realize template" command were run on the primary server.
>
>
>
> The result is: everything's fine EXCEPT there are no rows in tables on
> targets. The tables got autocreated on targets but not populated with

data.
>
> I suppose I made a mistake throughout the process, but after googling and
> RTFMing I didn't find where.
>
>
>
> Then I tried to synchronize the data "manually" with:
>
> cdr sync replicateset --master=g_debian --replset template_sd --all
>
>
>
> but I get error like this one:
>
> SYNC: Replicate template template_sd_ifxdebian_er_2_6_state is not active.
>
>
>
> Now I'm stuck here, waiting for any of your ideas...
>
>
>
> Thanks everyone!
>
>
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 11:43 AM
Madison Pruet
 
Posts: n/a
Default Re: ER - inital data loading problems

On thing..

You have to have realized the template on the source of the copy (g_debian).
Also, be aware that the msg table in the stores DB has no primary key.
You'll need to make sure that you put a PK on it before starting
replicaiton.

M.P.
"Davorin Kremenjas" <davorin.kremenjas@alfatec.hr> wrote in message
news:dv3pbu$1l2$1@ss405.t-com.hr...
> Hello everyone.
> I'm setting up ER on three servers in primary-target mode.
> All servers run Linux kernel 2.6 (Debian, Suse SLES 9 and Redhat RHEL 4)

and
> IDS 10.00 UC4.
> SLES and RHEL are setup exactly as machine notes say, and Debian is setup
> accordingly.
>
> At the moment it's only testing scenario, but the production system will

be
> identical.
> I sucessfully initialized ER on all servers. Here is the output of cdr

list
> server command:
>
> SERVER ID STATE STATUS QUEUE CONNECTION CHANGED
> ----------------------------------------------------------------------

-
> g_debian 111 Active Local 0
> g_redhat 311 Active Connected 0 Mar 13
> 12:05:36
> g_suse 211 Active Connected 0 Mar 13
> 12:07:08
>
> g_debian is primary server group, g_redhat and g_suse are targets
>
> After that I created stores_demo database on all servers, but deleted

tables
> from stores_demo@g_suse and stores_demo@g_redhat because I wanted to test
> initial synchronization and loading the data.
>
> Now came template definition:
> cdr define template template_sd --conflict=ignore --master
> g_debian --ats --floatieee --ignoredel
> y --exclusive --all --database=stores_demo
>
>
> and then the realization of template, first for the primary...
>
> cdr realize template template_sd stores_demo@g_debian
>
>
>
> ...and then for the targets...
>
> cdr realize template
> template_sd --syncdatasource=g_debian --autocreate --dbspace
> <target_dbspace> --target
>
> stores_demo@g_suse stores_demo@g_redhat
>
>
>
> Both "cdr realize template" command were run on the primary server.
>
>
>
> The result is: everything's fine EXCEPT there are no rows in tables on
> targets. The tables got autocreated on targets but not populated with

data.
>
> I suppose I made a mistake throughout the process, but after googling and
> RTFMing I didn't find where.
>
>
>
> Then I tried to synchronize the data "manually" with:
>
> cdr sync replicateset --master=g_debian --replset template_sd --all
>
>
>
> but I get error like this one:
>
> SYNC: Replicate template template_sd_ifxdebian_er_2_6_state is not active.
>
>
>
> Now I'm stuck here, waiting for any of your ideas...
>
>
>
> Thanks everyone!
>
>
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 11:44 AM
Davorin Kremenjas
 
Posts: n/a
Default Re: ER - inital data loading problems

"Madison Pruet" <mpruet@comcast.net> wrote in message
news:5LGdnZsQl8VROIjZnZ2dnUVZ_sKdnZ2d@comcast.com. ..
> Can I see the exact commands that you used?


Here they are:

-- on primary server
cdr define server --idle=500 --init g_debian



-- on targets



cdr define server --idle=500 --ats=<ats_dir> --sync=g_debian --init g_suse

cdr define server --idle=500 --ats=<ats_dir> --sync=g_debian --init g_redhat



-- on primary



cdr define template template_sd --conflict=ignore --master
g_debian --ats --floatieee --ignoredel
y --exclusive --all --database=stores_demo
cdr realize template template_sd stores_demo@g_debian
cdr realize template
template_sd --syncdatasource=g_debian --autocreate --dbspace
datadbs --target stores_demo@g_suse stores_demo@g_redhat


Here I checked targets and saw that tables were autocreated, but not
populated with rows.

Then I tried on primary:

cdr sync replicateset --master=g_debian --replset template_sd --all



and got this error:



SYNC: Replicate template template_sd_ifxdebian_er_2_6_state is not active





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 11:44 AM
Davorin Kremenjas
 
Posts: n/a
Default Re: ER - inital data loading problems


"Madison Pruet" <mpruet@comcast.net> wrote in message
news:SamdnVEp54ZAOojZRVn-tw@comcast.com...
> On thing..
> You have to have realized the template on the source of the copy
> (g_debian).


Yes, I did that as mentioned in the other post.

> Also, be aware that the msg table in the stores DB has no primary key.
> You'll need to make sure that you put a PK on it before starting
> replicaiton.


I noticed that before trying to start the replication on targets.
I dropped the table as the quickest solution.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 11:45 AM
Davorin Kremenjas
 
Posts: n/a
Default Re: ER - inital data loading problems

I tried to realize template on targets again, this time
using --extratargetrows=keep and executed it separately for each target.
This time it worked OK, but I must admit it doesn't make too much sense to
me. I'll continue to play with it...


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-20-2008, 11:55 AM
tarod35
 
Posts: n/a
Default Re: ER - inital data loading problems

Yo estoy replicandodos bases de datos y no utilizo templates, solo creo
replicas y las sincronizo.
cdr define Server - -init g_hofman10UC4
cdr modif. Server -ats=/opt/informix/ats -ris=/opt/informix/ris
ghofman10
dr define server --connect=calamar10_ER --init --sync=ghofman10UC4
gcalamar10

Una vez creado los dos servidores, el primario y el secundario, creo
una replicacion llamada replica1 de una tabla:

cdr define replicate --conflict=ignore --master=gcalamar10 --name=y -u
-A -R --firetrigger replica1 "P prueba@gcalamar10:informix.manufact"
"select * from manufact" "R prueba@ghofman10UC4:informix.manufact"
"select * from manufact"

Donde gcalamar10 es el master y ghofman10UC4 es el target. Esto crea la
tabla manufact en el target ghofman10UC4 si no existe, utiliza los
directorios ats y ris si hay conflictos o errores para guardar los
datos que no se han podido replicar y habilita los triggers en el
target.
Ahora, para sincronizar los datos:
$ cdr stop replicate replica1
$ cdr start replicate -S gcalamar10 -e keep replica1 ghofman10
Esto carga todos los datos de la tabla manufact del servidor gcalamar10
al target ghofman10UC4 y la deja activa.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:43 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com