The PrimaryFile property identifies the operating system file that maintains database-specific system tables.
object.PrimaryFile [= value]
object
Expression that evaluates to an object in the Applies To list
value
TRUE or FALSE
A Microsoft® SQL Server™ 2000 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.
Boolean
Read/write prior to database creation. Read-only after database creation.
HRESULT GetPrimaryFile(LPBOOL pRetVal);
HRESULT SetPrimaryFile(BOOL NewValue);
Running Transact-SQL scripts before an initial snapshot is applied can be used to:
Note If PreSnapshotScript is set, the script automatically runs when a subscription is reinitialized. Therefore, the script must be written so that its statements are repeatable.