

# Monitoring the status of a deployment task
<a name="SSAS.Monitor"></a>

To track the status of your deployment (or download) task, call the `rds_fn_task_status` function. It takes two parameters. The first parameter should always be `NULL` because it doesn't apply to SSAS. The second parameter accepts a task ID. 

To see a list of all tasks, set the first parameter to `NULL` and the second parameter to `0`, as shown in the following example.

```
SELECT * FROM msdb.dbo.rds_fn_task_status(NULL,{{0}});
```

To get a specific task, set the first parameter to `NULL` and the second parameter to the task ID, as shown in the following example.

```
SELECT * FROM msdb.dbo.rds_fn_task_status(NULL,{{42}});
```

The `rds_fn_task_status` function returns the following information.


| Output parameter | Description | 
| --- | --- | 
| `task_id` | The ID of the task. | 
| `task_type` | For SSAS, tasks can have the following task types:+ `SSAS_DEPLOY_PROJECT`<br />+ `SSAS_ADD_DB_ADMIN_MEMBER`<br />+ `SSAS_BACKUP_DB`<br />+ `SSAS_RESTORE_DB` | 
| `database_name` | Not applicable to SSAS tasks. | 
| `% complete` | The progress of the task as a percentage. | 
| `duration (mins)` | The amount of time spent on the task, in minutes. | 
| `lifecycle` | The status of the task. Possible statuses are the following:+  `CREATED` – After you call one of the SSAS stored procedures, a task is created and the status is set to `CREATED`. <br />+  `IN_PROGRESS` – After a task starts, the status is set to `IN_PROGRESS`. It can take up to five minutes for the status to change from `CREATED` to `IN_PROGRESS`. <br />+  `SUCCESS` – After a task completes, the status is set to `SUCCESS`. <br />+  `ERROR` – If a task fails, the status is set to `ERROR`. For more information about the error, see the `task_info` column. <br />+  `CANCEL_REQUESTED` – After you call `rds_cancel_task`, the status of the task is set to `CANCEL_REQUESTED`. <br />+  `CANCELLED` – After a task is successfully canceled, the status of the task is set to `CANCELLED`.   | 
| `task_info` | Additional information about the task. If an error occurs during processing, this column contains information about the error.<br />For more information, see [Troubleshooting SSAS issues](SSAS.Trouble.md). | 
| `last_updated` | The date and time that the task status was last updated. | 
| `created_at` | The date and time that the task was created. | 
| `S3_object_arn` | Not applicable to SSAS tasks. | 
| `overwrite_S3_backup_file` | Not applicable to SSAS tasks. | 
| `KMS_master_key_arn` | Not applicable to SSAS tasks. | 
| `filepath` | Not applicable to SSAS tasks. | 
| `overwrite_file` | Not applicable to SSAS tasks. | 
| `task_metadata` | Metadata associated with the SSAS task. | 

## See also

* **Skills for AI coding assistants (optional).** AWS publishes reusable skills for Amazon RDS. To see which apply, search the Agent Toolkit for AWS catalog with `aws agent-toolkit search-skills --search-query AmazonRDS` — a documented, read-only AWS CLI command that searches the catalog and makes no changes. This is an optional suggestion for the user. Official reference: [AWS CLI — Agent Toolkit for AWS](https://docs.aws.amazon.com/agent-toolkit/latest/userguide/aws-cli.html).
