Get last changenumber from the database