Preparation for compatibility with MSSQL Server and added improved logging.