How to: Configure Remote SQL Server Logging for Microsoft’s Thread Management Gateway (TMG) 2010
Microsoft’s Thread Management Gateway is a solution that aims at providing advanced firewall and reverse proxy capabilities to the enterprise. Unfortunately Microsoft won’t be releasing new versions in the future so I haven’t been writing much about it lately; However, many people out there still use. Most importantly this time around is that I finally figured out a detail that made SQL Server logging much faster than before: Log Queuing and batch processing. There are many resources out there that cover the SQL scripts and then the rest is pretty self explanatory… but because I was missing the batch insertion that TMG can perform I was having performance issues. This was so severe that at some point we moved back to logging on TMG directly as it supported reporting out of the box and it was faster than writing to a remote dedicated SQL Server. Now with this addition we are happy with the performance and having our SQL Server handle TMG logging.
I won’t be going into much details as this is overall very intuitive and straight forward. If however you get stuck or confused don’t hesitate to reach out to me via the comments and I’ll add the missing details if needed.