PrimaryFile Property
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The PrimaryFile property identifies the operating system file that maintains database-specific system tables.
A Microsoft SQL Server database can have, at most, one primary file. When a database is created using SQL Distributed Management Objects (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.
Running Transact-SQL scripts before an initial snapshot is applied can be used to:
Perform presnapshot cleanup.
Add users and permissions to databases to be replicated.
Create user-defined data types.
NoteIf PreSnapshotScript is set, the script automatically runs when a subscription is reinitialized. Therefore, the script must be written so that its statements are repeatable.
