The summation of data space allocated by all databases in the elastic pool. ![]() The summation of data space used by all databases in the elastic pool. Understanding the following storage space quantities are important for managing the file space of an elastic pool. Understanding types of storage space for an elastic pool SELECT DATABASEPROPERTYEX('db1', 'MaxSizeInBytes') AS DatabaseDataMaxSizeInBytes Modify the following query to return the database data max size. SUM(size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0) AS DatabaseDataSpaceAllocatedUnusedInMB SELECT SUM(size/128.0) AS DatabaseDataSpaceAllocatedInMB, Database data space allocated in MB and database data space allocated unused in MB Use the following query to return the amount of database data space allocated and the amount of unused space allocated. SELECT TOP 1 storage_in_megabytes AS DatabaseDataSpaceUsedInMBÄatabase data space allocated and unused allocated space Modify the following query to return the amount of database data space used. The following queries can be used to determine storage space quantities for a single database. Query a single database for storage space information The following diagram illustrates the relationship between the different types of storage space for a database. The amount of data space allocated cannot grow beyond the data max size. The maximum amount of space that can be used for storing database data. This quantity represents the maximum amount of free space that can be reclaimed by shrinking database data files. The difference between the amount of data space allocated and data space used. This behavior ensures that future inserts are faster since space does not need to be reformatted. The amount of space allocated grows automatically, but never decreases after deletes. The amount of formatted file space made available for storing database data. ![]() For example, deleting one row from every data page does not necessarily decrease the space used. In some cases, the space used does not change on inserts or deletes depending on the amount and pattern of data involved in the operation and any fragmentation. Generally, space used increases (decreases) on inserts (deletes). The amount of space used to store database data. Understanding the following storage space quantities are important for managing the file space of a database. Understanding types of storage space for a database However, the following APIs also measure the size of space allocated for databases and elastic pools: Azure Resource Manager based metrics APIs including PowerShell get-metrics.Most storage space metrics displayed in the following APIs only measure the size of used data pages: ![]() Data and log files that grow due to regular, recurring business operations do not require shrink operations. Shrink operations should not be considered a regular maintenance operation.
0 Comments
Leave a Reply. |