PrimaryFile Property (SQL-DMO)

The PrimaryFile property identifies the operating system file that maintains database-specific system tables.

Applies To

DBFile Object

Syntax

object.PrimaryFile [= value]

Part Description
object Expression that evaluates to an object in the Applies To list
value True or False

Remarks

A Microsoft® SQL Server™ database can have at most one primary file. When creating a database using SQL-DMO, the first DBFile object named PRIMARY added to the DBFiles collection of the FileGroup object referencing the filegroup becomes the primary file. Set the PrimaryFile property to alter the default behavior.

Data Type

Boolean

Modifiable

Read/write prior to database creation. Read-only after database creation.

Prototype (C/C++)

HRESULT GetPrimaryFile(LPBOOL pRetVal);

HRESULT SetPrimaryFile(BOOL NewValue);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.