ER and Templates
Posted in 2013
Topics: High Availability & Replication, Platform-Specific Issues, Clustering, Grid & MACH11
Trying to work with templates on 11.7.fc5 on aix 6.1 did a simple define such as this with a db named dock_mgt : cdr define template template_dock_mgt -c g_grid1 -M g_grid1 -C ignore -a -d dock_mgt however when trying to start replication, this error returned: cdr start replicateset template_cm command failed -- participants required for operation specified (17) defining a single repl for a table in the db would look like this: cdr define replicate -c g_grid1 -M g_grid1 -u -R --conflict=ignore --scope=row $i " dock_mgt@g_grid1:informix.${i}" "select * from ${i}" " dock_mgt@g_grid2:informix.${i}" "select * from ${i}" " dock_mgt@g_grid3:informix.${i}" "select * from ${i}" It defines the table to be replicated. The select * is just defining the columns to replicate. In this case all of them. But how do we do that with a template? thanks
On Thursday, January 31, 2013 2:59:33 PM UTC-6, tom...@gmail.com wrote: > Trying to work with templates on 11.7.fc5 on aix 6.1 > > > > did a simple define such as this with a db named dock_mgt : > > cdr define template template_dock_mgt -c g_grid1 -M g_grid1 -C ignore -a -d dock_mgt > > > > however when trying to start replication, this error returned: > > cdr start replicateset template_cm > > command failed -- participants required for operation specified (17) > > > > defining a single repl for a table in the db would look like this: > > cdr define replicate -c g_grid1 -M g_grid1 -u -R --conflict=ignore --scope=row $i " dock_mgt@g_grid1:informix.${i}" "select * from ${i}" " dock_mgt@g_grid2:informix.${i}" "select * from ${i}" " dock_mgt@g_grid3:informix.${i}" "select * from ${i}" > > > > It defines the table to be replicated. The select * is just defining the columns to replicate. In this case all of them. > > > > But how do we do that with a template? > > > > thanks I don't do a lot with ER, but perhaps this link could help you out with the template stuff: http://www.ibm.com/developerworks/data/library/techarticle/dm-0505kedia/ Jacques Renaut IBM informix Advanced Support APD Team
On Thursday, January 31, 2013 2:59:33 PM UTC-6, tom...@gmail.com wrote: > Trying to work with templates on 11.7.fc5 on aix 6.1 > > > > did a simple define such as this with a db named dock_mgt : > > cdr define template template_dock_mgt -c g_grid1 -M g_grid1 -C ignore -a -d dock_mgt > > > > however when trying to start replication, this error returned: > > cdr start replicateset template_cm > > command failed -- participants required for operation specified (17) > > > > defining a single repl for a table in the db would look like this: > > cdr define replicate -c g_grid1 -M g_grid1 -u -R --conflict=ignore --scope=row $i " dock_mgt@g_grid1:informix.${i}" "select * from ${i}" " dock_mgt@g_grid2:informix.${i}" "select * from ${i}" " dock_mgt@g_grid3:informix.${i}" "select * from ${i}" > > > > It defines the table to be replicated. The select * is just defining the columns to replicate. In this case all of them. > > > > But how do we do that with a template? > > > > thanks The define template obtains the dictionary information about the table and defines an empty replicate. There is another command "realize template" to define which servers are included in the definition. As an example to define a template of all of the tables in mydb, I would do something like... cdr define template set1 -C timestamp -S row -M g_serv1 -d mydb -a And then to 'realize' the template between g_serv1, g_serv2, g_serv3, and g_serv4, I would do somthing like... cdr realize template set1 g_serv1 g_serv2 g_serv3 g_serv4 If I wanted replication only on the three tables tab1, tab2, and tab3 the define template would be somthing like cdr define template set2 -C timestamp -S row -M g_serv1 -d mydb tab1 tab2 tab3