SQL -391 Cannot insert a null into column (bar_ser
Posted in 2013
Topics: Installation, Setup & Upgrades
Hello, I installed Informix 12.10 FC1 on windows 2008 x64 and saw the following in my bar_act.log while doing a backup: 2013-05-07 16:32:55 900 900 SQL -391 Cannot insert a null into column (bar_server.srv_node). Backup and restore are successful though. After turning the debug ON, saw the following in the bar_debug.log 2013-05-07 16:32:55 900 900 bar_srv_ins: enter 2013-05-07 16:32:55 900 900 bar_srv_ins: input bar_server srv_name ol_informix1210 srv_node 2013-05-07 16:32:55 900 900 bar_srv_ins: insert into bar_server values bar_server srv_name ol_informix1210 srv_node 2013-05-07 16:32:55 900 900 bar_srv_ins: return 148 (0x94) Any ideas? Thank You, Ankush
Original post: Hello, I installed Informix 12.10 FC1 on windows 2008 x64 and saw the following in my bar_act.log while doing a backup: 2013-05-07 16:32:55 900 900 SQL -391 Cannot insert a null into column (bar_server.srv_node). Backup and restore are successful though. After turning the debug ON, saw the following in the bar_debug.log 2013-05-07 16:32:55 900 900 bar_srv_ins: enter 2013-05-07 16:32:55 900 900 bar_srv_ins: input bar_server srv_name ol_informix1210 srv_node 2013-05-07 16:32:55 900 900 bar_srv_ins: insert into bar_server values bar_server srv_name ol_informix1210 srv_node 2013-05-07 16:32:55 900 900 bar_srv_ins: return 148 (0x94) Any ideas? Thank You, Ankush Response: Well the bar_srv_ins() function tries to insert a row into the bar_server table. That table has 2 columns, srv_name and srv_node. From that trace output, it looks like srv_name got a valid value, however, it looks like srv_node is null, which would explain the error you are receiving. I think earlier on in the BAR DEBUG output I think you might be able to see where it sets srv_node...Also, looking at the code, some of the places we call bar_srv_ins() we don't seem to care about the return value, so the insert into the table could fail and the error would get reported into the bar activity log, but it doesn't cause the back-up/restore to fail, which seems to be what you are seeing. So for some reason, srv_node doesn't appear to be getting set so that's causing the insert into the bar_server table to throw an error. But I don't know why srv_node isn't getting set, but there might be some hint of that in the rest of the BAR DEBUG output. Jacques Renaut IBM Informix Advanced Support APD Team
Original post: Original post: Hello, I installed Informix 12.10 FC1 on windows 2008 x64 and saw the following in my bar_act.log while doing a backup: 2013-05-07 16:32:55 900 900 SQL -391 Cannot insert a null into column (bar_server.srv_node). Backup and restore are successful though. After turning the debug ON, saw the following in the bar_debug.log 2013-05-07 16:32:55 900 900 bar_srv_ins: enter 2013-05-07 16:32:55 900 900 bar_srv_ins: input bar_server srv_name ol_informix1210 srv_node 2013-05-07 16:32:55 900 900 bar_srv_ins: insert into bar_server values bar_server srv_name ol_informix1210 srv_node 2013-05-07 16:32:55 900 900 bar_srv_ins: return 148 (0x94) Any ideas? Thank You, Ankush Old Response: Well the bar_srv_ins() function tries to insert a row into the bar_server table. That table has 2 columns, srv_name and srv_node. From that trace output, it looks like srv_name got a valid value, however, it looks like srv_node is null, which would explain the error you are receiving. I think earlier on in the BAR DEBUG output I think you might be able to see where it sets srv_node...Also, looking at the code, some of the places we call bar_srv_ins() we don't seem to care about the return value, so the insert into the table could fail and the error would get reported into the bar activity log, but it doesn't cause the back-up/restore to fail, which seems to be what you are seeing. So for some reason, srv_node doesn't appear to be getting set so that's causing the insert into the bar_server table to throw an error. But I don't know why srv_node isn't getting set, but there might be some hint of that in the rest of the BAR DEBUG output. Jacques Renaut IBM Informix Advanced Support APD Team New response: Specifically can you look for any bar debug output containing bar_get_hostname in the line. It looks like we are trying to pull the hostname out of the sqlhosts file for the INFORMIXSERVER value that's being used. If I recall correctly, on 12.10 on windows I think there was a feature involving either moving or duplicating the sqlhosts file from just the windows registry to an actual file as well...so perhaps it's a problem with that feature and the hostname isn't getting set up correctly in where ever we are checking it. Jacques Renaut IBM Informix Advanced Support APD Team
Hello Jacques,
Thank You very much for your reply !!!!
As you said I went through the bar_debug.log, looking for bar_get_hostname and
is was blank. Then I saw they following message, appear on my cmd when I
started the server
C:\\\\PROGRA~1\\\\IBMINF~1\\\\bin\\\\syncsqlhosts.exe [-source <sqlhostvalue>] [-target
<sqlhostvalue>] [-servers {serverlist }]
if source or target is not specified it defaults to local informixsqlhosts
registery node sqlhostvalue is either \\\\\\\\machine name or an sqlhosts file.
serverlist is a space seperated list of informix server entries that are
copyed from source to target
C:\\\\PROGRA~1\\\\IBMINF~1\\\\bin\\\\syncsqlhosts.exe [-source <sqlhostvalue>] [-target
<sqlhostvalue>] [-servers {serverlist }]
if source or target is not specified it defaults to local informixsqlhosts
registery node sqlhostvalue is either \\\\\\\\machine name or an sqlhosts file.
serverlist is a space seperated list of informix server entries that are
copyed from source to target
This is different, as in Informix 11.7, I never worked with a SQLHOSTSFILE (
it was only used on Linux/Unix), but its been changed in 12.10.
Before ( bar_debug.log)
2013-05-06 15:35:54 2312 2312 bar_get_hostname: enter
2013-05-06 15:35:54 2312 2312 bar_get_hostname: input new_svr ol_informix1210
2013-05-06 15:35:54 2312 2312 bar_get_hostname: output hostname
2013-05-06 15:35:54 2312 2312 bar_get_hostname: return 0 (0x00)
I have a single host machine so I issued the following command ( my machine
name : balia-win2k8-32)
C:\\\\Program Files\\\\IBM Informix Software Bundle\\\\bin> syncsqlhosts.exe -target
"c:\\\\Program Files\\\\IBM Informix Software Bundle\\\\etc\\\\sqlhosts.ol_informix1210_3"
-servers balia-win2k8-32
After : (bar_debug.log)
2013-05-09 09:59:24 2364 2364 bar_get_hostname: enter
2013-05-09 09:59:24 2364 2364 bar_get_hostname: input new_svr ol_informix1210_3
2013-05-09 09:59:24 2364 2364 bar_get_hostname: output hostname
*balia-win2k8-32
2013-05-09 09:59:24 2364 2364 bar_get_hostname: return 0 (0x00)
Now I am not seeing any messages in my bar_act.log, but I still see the
following message being printed on the cmd:
Starting scheduling system...succeeded
Verbose output complete: mode = 5
C:\\\\PROGRA~1\\\\IBMINF~1\\\\bin\\\\syncsqlhosts.exe [-source <sqlhostvalue>] [-target
<sqlhostvalue>] [-servers {serverlist }]
if source or target is not specified it defaults to local informixsqlhosts
registery node sqlhostvalue is either \\\\\\\\machine name or an sqlhosts file.
serverlist is a space seperated list of informix server entries that are
copyed from source to target
I do notice one more thing though sometimes ( it is intermittent ): I see the
below error 2 from CallNamedPipe() while doing backup and recovers. This time
no messages in seen in the bar_act.log and both backups and recover work good.
Just the message shows up on the output.
C:\\\\Program Files\\\\IBM Informix Software Bundle\\\\bin>onbar -b
Error 2 from CallNamedPipe().
C:\\\\Program Files\\\\IBM Informix Software Bundle\\\\bin>
I can probably start a new topic for this.
Again Thank You very much.
Thank You,
Ankush Bali