add sql server support
minor fixes