Size Property

未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。

The Size property exposes the total size, in megabytes, of the Microsoft SQL Server component referenced.

語法

object
.Size [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list
  • value
    A long integer

Data Type

Long

Modifiable

Read-only for the Database, FileGroup, and TransactionLog objects.

The Size property is used to set the initial size of operating system files referenced by DBFile and LogFile objects. The property is read/write if a SQL-DMO object is used to create a new SQL Server database or log file. The property is read-only if a DBFile or LogFile object references an existing component.

Prototype (C/C++)

HRESULT GetSize(LPLONG pRetVal);
HRESULT SetSize(long NewValue);

Applies To:

Database Object

LogFile Object

DBFile Object

TransactionLog Object

FileGroup Object