Table of Contents

Class AzureSQLDatabaseSchema.ResourceUsage

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

sys.resource_usage (Azure SQL Database and Azure SQL Managed Instance)

Applies to:Azure SQL DatabaseAzure SQL Managed Instance


important


This feature is in a preview state. Do not take a dependency on the specific implementation of this feature because the feature might be changed or removed in a future release.
While in a preview state, the Azure SQL Database operations team might turn data collection off and on for this DMV:
- When turned on, the DMV returns current data as it is aggregated.
- When turned off, the DMV returns historical data, which might be stale.



Provides hourly summary of resource usage data for user databases in the current server. Historical data is retained for 90 days.
For each user database, there is one row for every hour in continuous fashion. Even if the database was idle during that hour, there is one row, and the usage_in_seconds value for that database will be 0. Storage usage and SKU information are rolled up for the hour appropriately.

See sys.resource_usage.

[Table(Schema = "sys", Name = "resource_usage", IsView = true)]
public class AzureSQLDatabaseSchema.ResourceUsage
Inheritance
AzureSQLDatabaseSchema.ResourceUsage
Inherited Members
Extension Methods

Properties

DatabaseName

database_name NOT NULL nvarchar

Name of user database.
[Column("database_name")]
[NotNull]
public string DatabaseName { get; set; }

Property Value

string

EndTime

end_time NOT NULL datetime

Time (UTC) in hour increments.
[Column("end_time")]
[NotNull]
public DateTime EndTime { get; set; }

Property Value

DateTime

Sku

sku NOT NULL nvarchar

Name of the service tier. Possible values include: Basic, Standard, Premium, GeneralPurpose, BusinessCritical, Hyperscale.
[Column("sku")]
[NotNull]
public string Sku { get; set; }

Property Value

string

StorageInMegaBytes

storage_in_megabytes NOT NULL decimal

Maximum used storage size for the hour, including database data, indexes, stored procedures and metadata.
[Column("storage_in_megabytes")]
[NotNull]
public object StorageInMegaBytes { get; set; }

Property Value

object