views:

10

answers:

1

I am on a linux system, logged in as the informix user. I have the following environment variables set:

INFORMIXDIR=/opt/IBM/informix
INFORMIXSQLHOSTS=/opt/IBM/informix/etc/sqlhosts.mydb
INFORMIXSERVER=rep_0

The contents of sqlhosts.mydb are as follows:

g_rep_0         group           -               -       i=0
rep_0           onsoctcp        svr0            30100   g=g_rep_0

g_rep_1         group           -               -       i=1
rep_1           olsoctcp        svr1            30101   g=g_rep_1

I am trying to run the command cdr define server --init g_rep_0 to set up g_rep_0 as the replication master, but get the following error:

connect to rep_0 failed 
Incorrect password or user rep_0 is not known on the database server.
 (-951)
command failed -- unable to connect to server specified  (5)

Can anyone suggest what I might be doing wrong?

edit

Looking in the log I got an error:

10:26:36  CDR GC: operation error reporting severe error message failed (error 62).
10:30:00  SCHAPI: [Save SQL Trace 27-550] Error -206 The specified table (mon_syssqltrace) is not in the database.
10:30:00  SCHAPI: [Save SQL Trace 27-550] Error -111 ISAM error:  no record found.
A: 

This problem turned out to be due to a corrupt database. I re-initialized it by running onmode -ky, oninit -ivyw, and it appears to be fine now.

fredley
Difficult to decide what to do with this. That is an unusual reason for the failure; most people won't run across the problem. Your answer clearly is correct and helpful in your scenario, but...
Jonathan Leffler