Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Explore the features being added with each release of SQL Azure

Moderators

Top Categories · View All
SU8(Dec 2011) 7
SU7(July 2011) 6
SU6(May 2011) 4
SU5 (Oct 2010) 4
SU2(APR 2010) 4
SU1(Feb 2010) 4
SU4(Aug 2010) 3
SU3(June 2010) 3

Browse by Tags · View All
Spatial Types 3
Availability 2
SQL Azure Management Portal 2
Database Size 2
Metro Styled UI 1
User Collations 1
Database cost 1
Federations 1
Performance 1
Scalabilty 1
Co-Administrator support 1
Firewall rules 1
DAC Upgrade 1
JDBC Driver 1
DB Management REST API 1
Multiple servers for subscription 1
sp_tableoption 1
Error Messages 1
Reporting 1
Sync Support 1

Browse by Release · View All
All 35

SQL Azure - Support for few DMV's

Mar 12 2012 12:00AM by Ramireddy   

SQL Azure has support for few DMV's, which can be used to get information about database. As these DMV's are user database scoped, we must login into database and also user need to have VIEW DATABASE STATE permission.

1. sys.dm_db_partition_stats 
2. sys.database_usage
3. sys.bandwidth.usage

sys.dmdbpartition_stats:

This DMV can be used to get the size of database and various objects in database. To Calculate Database size, we can use below query.

select   sum(reserved_page_count) * 8.0 / 1024 as “size in MB”    from    sys.dm_db_partition_stats

sys.database_usage:

This DMV can be used to get the billing information specific to database. This DMV contains the number of instances of web or business databases on every date. This DMV has 3 columns, time,sku and quantity.

  time: Represent the timestamp
  sku : Indicates type of database, business or web
  quantity: Indicates number of databases on given day.

We can use this DMV information to calculate Database usage cost.

select sku, 
    sum (
    case when sys.database_usage.sku = 'web' 
            then (quantity*9.99/31)   
        when sys.database_usage.sku = 'business' 
            then (quantity*99.99/31)   
    end ) as 'cost'     
    from sys.database_usage     
    where datepart(yy,time) = datepart(yy, getutcdate()) and     
    datepart(mm,time) = datepart(mm, getutcdate())     
    group by sku

Note: 9.99$,99.99$ are costs of web and business databases respectively. These bound to change in future.

sys.bandwidth_usage:

This DMV can be used to get information about the data transfer in/out from databases. This DMV consists of 6 columns.

  a) **Database_Name:** Name of the database from/to which data is transferred.    
  b) **Direction:** Direction of data transferred. Possible values are Ingress and Engress. Ingress refers to data moving into azure database and Engress refers to data moving out of azure database.    
  c) **Class:** Type of bandwidth used. Possible values are Internal and External. Internal refers to data moving into azure platform and External refers to data moving out of  azure platform    
  d) **Time:** Time of data transferred.    
  e) **Time_Period :** Indicates whether data transferred in peak period or off-peak period.    
  f) **Quantity:** Size of data transferred

According to costs of various types of data transfer, you can use this information in this DMV to calculate data transfer cost.

Read More Have you written a blog post or article related to this feature and want to get them added here? Read More...
Category : SU1(Feb 2010)
Release : All
Tags : DMV


Ramireddy
2 · 41% · 12972
1



Submit

Your Comment


Sign Up or Login to post a comment.

"SQL Azure - Support for few DMV's" rated 5 out of 5 by 1 readers
SQL Azure - Support for few DMV's , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]