Cosmos SQL Container

Prev Next

Overview

Azure Cosmos DB SQL API accounts let you query items using the Structured Query Language (SQL), one of the most familiar query languages, as a JSON query language. Once a Cosmos SQL Container is associated with a Business Application, it can be managed from Turbo360. A Cosmos SQL Database can contain any number of containers, and each is managed independently.

Business value

Managing Cosmos SQL Containers from Turbo360 removes the need to switch to a separate database management tool, letting you run queries, execute stored procedures, and manage items directly during incident response.

How it works

  • Once associated with a Business Application, the container's queries, stored procedures, and items become directly manageable from Turbo360.
  • Only SELECT queries and stored procedures can be executed from Turbo360; DML and DDL statements are restricted to prevent SQL injection attacks.

Permissions

Access to Cosmos SQL Container actions is controlled through RBAC when adding a role to a Business Application.

Permission Description
Read View container details, execute SELECT queries, and view stored procedures and items.
Manage Execute stored procedures, save queries, and update or delete container items.

Operations

Turbo360 lets you run queries, execute stored procedures, and manage container items directly from the resource, without switching to a separate database tool.

Execute SQL queries

  • Execute query: run a SELECT query against the container and view results inline. Use this when you need to inspect data without opening a separate database client.
  • Save query: store a frequently used query for reuse. Use this when the same query is run repeatedly during monitoring or troubleshooting.

Saved queries can be opened by clicking Saved queries at the top of the section.

Stored procedures

  • Execute stored procedure: select a stored procedure present in the container, provide the required input, and run it. Use this when a procedure needs to be triggered as part of an operational task.

SELECT queries and Stored Procedures can only be executed from Turbo360. DML and DDL statements are restricted to prevent SQL injection attacks.

Managing container items

  • Update item: edit an item returned from a query. Use this when a single record needs correction.
  • Delete item: remove an item returned from a query. Use this when a single record needs to be removed.

Clicking the item id opens a blade where the item can be edited and updated.

Bulk operations

  • Bulk delete: delete multiple container items returned from a query in a single action. Use this when cleaning up a large batch of stale or invalid records rather than deleting items one at a time.

Resource dashboard

The Cosmos SQL Container dashboard surfaces request volume and capacity signals so you can spot throttling or unexpected usage spikes without leaving Turbo360.

Widget What it shows
Metadata Requests Volume of metadata operations against the container.
Total Requests vs Total Request Units Correlates request count with RU consumption to flag inefficient queries.
Cosmos Container Summary At-a-glance container health and configuration summary.
Total Requests Overall request volume for the container.

You can add, remove, or reconfigure widgets to focus on the metrics most relevant to your support scenario.

Metrics

The Metrics tab lets you chart any Azure metric for your Cosmos SQL Container directly in Turbo360, without switching to the Azure portal. Use it to visualize RU consumption patterns, request throughput, and throttled request rates over time, particularly useful when identifying whether a sudden spike in RU usage is caused by a specific time window, a query pattern change, or unexpected write volume growth.

Use the following controls to build your chart:

Control Description
Select metric Choose the Azure metric to visualize (e.g. Total Request Units, Total Requests, Normalized RU Consumption, Server Side Latency, Throttled Requests).
Aggregation Set the aggregation method: Average, Min, Max, Total, or Count.
Time range Set the time window for the data (e.g. Last 24 hours, Last 7 days).
Granularity Set the data point resolution (e.g. 1 minute, 1 hour).
Chart type Choose the visualization type: Line or Bar.

Click Apply to render the chart.

Monitoring

Cosmos SQL Container supports metric and query monitoring rules. Navigate to Cosmos SQL Container > Monitoring to configure rules.

Monitoring rules are saved per resource, and the monitoring state is reflected after every monitoring cycle.

Metric monitoring

Tracks resource metrics against a configured threshold. Use this when you need to be alerted if RU consumption or another metric exceeds expected bounds.

  1. Switch to the Rules tab.
  2. Select the necessary monitoring metrics and configure the threshold values.
  3. Click Save.

The threshold values can be provided with any metric name; the rule is violated when the configured threshold value is met.

Query monitoring

Tracks the result of a saved or custom query against a threshold. Use this when a specific query result, such as a record count, needs to trigger an alert.

  1. Switch to the Queries tab.
  2. Click Add.
  3. Enter a name for the query rule.
  4. Enter the desired query, or select one from saved queries using Open from saved queries.
  5. Click Validate to validate the query.
  6. Click Save.

Troubleshooting

  1. Query monitoring rule does not trigger
    Cause: The query was not validated before saving.
    Fix: Reopen the rule, click Validate, and save again.
  2. Stored procedure execution fails
    Cause: Required input parameters were not provided in the expected format.
    Fix: Confirm the input format matches what the stored procedure expects, then retry.
  3. Item update or delete not reflected
    Cause: The query results were not refreshed after the change.
    Fix: Re-run the query to fetch the latest item state.
  4. Dashboard widgets show no data
    Cause: The container was recently associated and has not completed its first monitoring cycle.
    Fix: Wait for the next monitoring cycle, then refresh the dashboard.

Related articles