def METHOD_NAME(self, query, user):
    connection = None
    try:
        server = self.configuration.get("server", "")
        user = self.configuration.get("user", "")
        password = self.configuration.get("password", "")
        db = self.configuration["db"]
        port = self.configuration.get("port", 1433)
        tds_version = self.configuration.get("tds_version", "7.0")
        charset = self.configuration.get("charset", "UTF-8")
        if port != 1433:
            server = server + ":" + str(port)
        connection = pymssql.connect(
            server=server,
            user=user,
            password=password,
            database=db,
            tds_version=tds_version,
            charset=charset,
        )
        if isinstance(query, str):
            query = query.encode(charset)
        cursor = connection.cursor()
        logger.debug("SqlServer running query: %s", query)
        cursor.execute(query)
        data = cursor.fetchall()
        if cursor.description is not None:
            columns = self.fetch_columns([(i[0], types_map.get(i[1], None)) for i in cursor.description])
            rows = [dict(zip((column["name"] for column in columns), row)) for row in data]
            data = {"columns": columns, "rows": rows}
            json_data = json_dumps(data)
            error = None
        else:
            error = "No data was returned."
            json_data = None
        cursor.close()
        connection.commit()
    except pymssql.Error as e:
        try:
            # Query errors are at `args[1]`
            error = e.args[1]
        except IndexError:
            # Connection errors are `args[0][1]`
            error = e.args[0][1]
        json_data = None
    except (KeyboardInterrupt, JobTimeoutException):
        connection.cancel()
        raise
    finally:
        if connection:
            connection.close()
    return json_data, error