def task_status(task_id, cursor):
    """
    Returns rds task status of given task id.
    """
    cursor.execute(
        """
        EXEC msdb.dbo.rds_task_status @task_id={}
    """.
        format(task_id))
    return cursor.fetchall()
