I'm using AR with SQLServer adapter on Rails2/linux. On my local env, I can easily change freetds and odbc.ini files to trace back and find out the connection information. But in test envs, this information constantly changes and gets out of sync, so I'm trying to put it in our logging as well so we can troubleshoot more easily.
Yes, I know TinyTDS does this better, we are moving to that, but not quite there yet.
I can do:
But can't find anything similar for getting the server address or ip.
i can't remember if there is a public API for this, but you can get the config of AR like this
this returns the config hash, which includes the host