Get last changenumber from database