ISA 2006 Remote SQL Logging “the data area passed to a system call is too small..”

I recently came across a very interesting problem while configuring ISA 2006 logging to a remote SQL server. If you have ever done this, you’ll no doubt know that its not a very complicated thing to do –in fact, Richard Hicks has a great guide on his blog, here. It really surprised me when I was not able to get it working, I’ve done it many times before and I have never had any problems.

I checked connectivity to my SQL server using telnet and the "Test” button when performing the configuration, everything seemed fine, but no data was appearing in the database


On the SQL server, a temp table was being created, no rows inserted and the stored proc to copy the rows from the temp table to the permanent one never got called. The session appeared to wait with "async_network_io"

After speaking to Microsoft and performing a ISA trace, it appeared that there is some buffer issue (insufficient buffer) when ISA is trying to insert the log record to the SQL server. It looked like the problem happened before writing to SQL. This also explained why there was no row inserted into the temp table, and the SP to move the record from temp table to permanent one had never been called.

It turns out that the string format call which generates an EXEC SP statement to insert log records only has a buffer of 100 characters and the combination of my server name and table name exceeded this. Shortening the table name fixed the problem.