DataSpaceUsed 속성
참조 테이블의 행에 사용된 저장 공간(KB)을 가져옵니다.
네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)
구문
‘선언
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Expensive Or SfcPropertyFlags.Standalone)> _
Public ReadOnly Property DataSpaceUsed As Double
Get
‘사용 방법
Dim instance As Table
Dim value As Double
value = instance.DataSpaceUsed
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone)]
public double DataSpaceUsed { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Expensive|SfcPropertyFlags::Standalone)]
public:
property double DataSpaceUsed {
double get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone)>]
member DataSpaceUsed : float
function get DataSpaceUsed () : double
속성 값
유형: System. . :: . .Double
테이블에 있는 데이터 행의 저장 공간(KB)을 지정하는 Float64 값입니다.
주의
The value is the actual amount of disk space that is required to store the row data of the referenced table. SQL Server can allocate additional, unused space to a Table object.
예
The following code example shows how to display the amount of storage space used by each table in the AdventureWorks2008R2 database.
C#
Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2008R2"];
foreach (Table tb in db.Tables)
{
Console.WriteLine("The " + tb.Name + " table is " + tb.DataSpaceUsed.ToString() + " KB in size.");
}
Powershell
$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2008R2")
Foreach ($tb in $db.Tables)
{
Write-Host "The" $tb.Name "table is" $tb.DataSpaceUsed "KB in size."
}