尝试使用 informix 设置复制时出现未知用户错误
我在linux系统上,以informix用户登录。我设置了以下环境变量:
INFORMIXDIR=/opt/IBM/informix
INFORMIXSQLHOSTS=/opt/IBM/informix/etc/sqlhosts.mydb
INFORMIXSERVER=rep_0
sqlhosts.mydb 的内容如下:
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
我尝试运行命令 cdr Define server --init g_rep_0 将 g_rep_0 设置为复制主机,但是得到以下错误:
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)
任何人都可以建议我可能做错了什么吗?
编辑
查看日志时出现错误:
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.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,这个问题是由于数据库损坏造成的。我通过运行
onmode -ky
、oninit -ivyw
重新初始化它,现在看起来一切正常。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.