Question about replication
Posted in 2004
Topics: High Availability & Replication, Server Administration, Networking & sqlhosts Configuration
Dear All:
I'm trying to set up a replication environment with 2 informix server.
According to the example procedures on the document, I issued the
following commands(of cource,I've done with sqlhosts & ONCONFIG file):
1. cdr define server --init group_source
--> OK
2. cdr list server
--> OK
3. cdr define server --connect=DBSERVER_Target --init
--sync=group_source group_destination
--> Error: command filed -- unable to connect to the server specified
(DBSERVER_Target is the DATABASE NAME corrosponding to the remote
informix server)
I am sure I can connect to the other server because I've use dbaccess in
the following form to connect to it:
dbaccess database@DBSERVER_Target
Does anyone know what's going wrong here ? Please shed some light on me,
I am eager to know why.
Thanks in advance.
Ken
You need to post the error that you got.
Also as an FYI, you must connect to the server that you are defining. So in
step 3, you need to ensure that the --connect option and the
'group_destination' is the same.
Finally make sure that the sqlhost file on the two servers is the same.
"Ken Hu" <kenhu1970@yahoo.com.tw> wrote in message
news:cgk46a$6k$1@netnews.hinet.net...
> Dear All:
>
> I'm trying to set up a replication environment with 2 informix server.
> According to the example procedures on the document, I issued the
> following commands(of cource,I've done with sqlhosts & ONCONFIG file):
>
> 1. cdr define server --init group_source
> --> OK
> 2. cdr list server
> --> OK
> 3. cdr define server --connect=DBSERVER_Target --init
> --sync=group_source group_destination
>
> --> Error: command filed -- unable to connect to the server specified
> (DBSERVER_Target is the DATABASE NAME corrosponding to the remote
> informix server)
>
>
> I am sure I can connect to the other server because I've use dbaccess in
> the following form to connect to it:
>
> dbaccess database@DBSERVER_Target
>
> Does anyone know what's going wrong here ? Please shed some light on me,
> I am eager to know why.
>
> Thanks in advance.
>
> Ken
>
Madison Pruet wrote:
> You need to post the error that you got.
>
> Also as an FYI, you must connect to the server that you are defining. So in
> step 3, you need to ensure that the --connect option and the
> 'group_destination' is the same.
>
> Finally make sure that the sqlhost file on the two servers is the same.
Hi , thanks for your replying.
I am sure the 2 sqlhosts files are the same(copy from one server to
another).
The sqlhosts file :
g_source group - - i=1
MEDIADB onsoctcp cvs-server mediaDB
g=g_source
g_destination group - - i=2MEDIADB_kenlinux onsoctcp ken-linux mediaDB_kenlinux g=g_destination
As it said, I have 2 groups(g_source & g_destination) and each group has
1 server(cvs-server & ken-linux are 2 host name , MEDIADB &
MEDIADB_kenlinux are 2 DATABASE name)
I execute the following command on machine "cvs-server" which is my
source database :
cdr define server --connect=MEDIADB_kenlinux --init --sync=g_source
g_destination
The error message I got is : command failed -- unable to connect to
server specified (5)
But I can use "dbaccess mediadb@MEDIADB_kenlinux" to connect to the
database running on my destination server "ken-linux".
According to the document , the "--connect=" option should be applied on
database name (here : MEDIADB_kenlinux), not the group name , isn't it ?
Even I change that to the group name , I still get the same error message.
Ken
We really need to see the exact commands you are executing.
Just as a quick example, here is a sample of the script that I use to
generate replication. In my case,
my sqlfile looks like....
---------------------------------------------------------------
cdr1 group - - i=1
serv1 onsoctpc texpdx soc.serv1 g=cdr1
cdr2 group - - i=2
serv2 onsoctcp texpdx soc.serv2 g=cdr2
---------------------------------------------------------
cdr define server -c cdr1 -I cdr1
cdr define server -c cdr2 -I -S cdr1 cdr2
You might want to look at the message log file on both the source and the
target servers.
If you can't figure out from that what happened, then there is some internal
tracing that can be done, but that gets a bit messy.
N.B. -- I always use the group name, rather than the server name for ER
commands.
Also, when looking in the message log file, check to see if there are any
errors about time differences.
"Ken Hu" <kenhu1970@yahoo.com.tw> wrote in message
news:cgm2kg$mbo$1@netnews.hinet.net...
>
>
> Madison Pruet wrote:
> > You need to post the error that you got.
> >
> > Also as an FYI, you must connect to the server that you are defining.
So in
> > step 3, you need to ensure that the --connect option and the
> > 'group_destination' is the same.
> >
> > Finally make sure that the sqlhost file on the two servers is the same.
>
> Hi , thanks for your replying.
>
> I am sure the 2 sqlhosts files are the same(copy from one server to
> another).
>
> The sqlhosts file :
>
> g_source group - - i=1
> MEDIADB onsoctcp cvs-server mediaDB
> g=g_source
> g_destination group - - i=2> MEDIADB_kenlinux onsoctcp ken-linux mediaDB_kenlinux g=g_destination
>
> As it said, I have 2 groups(g_source & g_destination) and each group has
> 1 server(cvs-server & ken-linux are 2 host name , MEDIADB &
> MEDIADB_kenlinux are 2 DATABASE name)
>
> I execute the following command on machine "cvs-server" which is my
> source database :
>
> cdr define server --connect=MEDIADB_kenlinux --init --sync=g_source
> g_destination
>
> The error message I got is : command failed -- unable to connect to
> server specified (5)
>
> But I can use "dbaccess mediadb@MEDIADB_kenlinux" to connect to the
> database running on my destination server "ken-linux".
>
> According to the document , the "--connect=" option should be applied on
> database name (here : MEDIADB_kenlinux), not the group name , isn't it ?
> Even I change that to the group name , I still get the same error message.
>
>
> Ken
>
Madison Pruet wrote: > We really need to see the exact commands you are executing. > Thanks again for your help. The exact commands that I executed are : (1)cdr define server -c g_source -I g_source (2)cdr list server The result is : SERVER ID STATE STATUS CONNECTION CHANGED ------------------------------------------------------------------ g_source 1 Active Local (3)cdr define server -c g_destination -I -S g_source g_destination The result is : command failed -- unable to connect to server specified (5) The sqlhosts file is : ------------------------------------------------------------------ g_source group - - i=1 MEDIADB_cvsserver onsoctcp cvs-server ediaDB_cvsserver g=g_source g_destination group - - i=2 MEDIADB_kenlinux onsoctcp ken-linux mediaDB_kenlinux g=g_destination ------------------------------------------------------------------ Ken