Note: This applies only to Azure SQL DatabaseV11.
Returns information about the network bandwidth used by each database in a Azure SQL Database V11 logical server, . Each row returned for a given database summarizes a single direction and class of usage over a one-hour period.
This has been deprecated in a Azure SQL Database V12 logical server.
The sys.bandwidth_usage view contains the following columns.
|time||The hour when the bandwidth was consumed. The rows in this view are on a per-hour basis. For example, 2009-09-19 02:00:00.000 means that the bandwidth was consumed on September 19, 2009 between 2:00 A.M. and 3:00 A.M.|
|database_name||The name of the database that used bandwidth.|
|direction||The type of bandwidth that was used, one of:
Ingress: Data that is moving into the Azure SQL Database.
Egress: Data that is moving out of the Azure SQL Database.
|class||The class of bandwidth that was used, one of:
Internal: Data that is moving within the Azure platform.
External: Data that is moving out of the Azure platform.
This class is returned only if the database is engaged in a continuous copy relationship between regions ( Active Geo-Replication). If a given database does not participate in any continuous copy relationship, then “Interlink” rows are not returned. For more information, see the “Remarks" section later in this topic.
|time_period||The time period when the usage occurred is either Peak or OffPeak. The Peak time is based on the region in which the server was created. For example, if a server was created in the "US_Northwest" region, the Peak time is defined as being between 10:00 A.M. and 6:00 P.M. PST.|
|quantity||The amount of bandwidth, in kilobytes (KBs), that was used.|
This view is only available in the master database to the server-level principal login.
External and Internal Classes
For each database used at a given time, the sys.bandwidth_usage view returns rows that show the class and direction of bandwidth usage. The following example illustrates data that might be exposed for a given database. In this example, the time is 2012-04-21 17:00:00, which occurs during the peak time period. The database name is Db1. In this example, sys.bandwidth_usage has returned a row for all four combinations of the Ingress and Egress directions and External and Internal classes, as follows:
Interpreting Data Direction for Active Geo-Replication
For Active Geo-Replication, bandwidth-usage data is visible in the logical master database on both sides of a continuous copy relationship. So you must interpret the ingress and egress direction indicators from the perspective of the logical server that you are querying. For example, consider a replication stream that transfers 1MB of data from the source server to the target server. In this case, on the source server the 1MB counts toward total data sent, and on the target server, the 1MB is recorded as data received.
The bulk of data transferred is from the source server to the target server, in the direction of user data flow. However, some data transfer is required in the other direction.