sp_startpublication_snapshot (Transact-SQL)
Applies to: SQL Server
Used to start the Snapshot Agent job that generates the initial snapshot for a publication. This stored procedure is executed at the Publisher on the publication database.
Transact-SQL syntax conventions
Syntax
sp_startpublication_snapshot [ @publication = ] 'publication'
[ , [ @publisher = ] 'publisher' ]
Arguments
[ @publication = ] 'publication'
Is the name of the publication. publication is sysname, with no default.
[ @publisher = ] 'publisher'
Is the name of a non- SQL Server Publisher. publisher is sysname, with a default value of NULL. You should not specify this parameter for a SQL Server Publisher.
Return Code Values
0 (success) or 1 (failure)
Remarks
sp_startpublication_snapshot is used with all types of replication.
For a non- SQL Server Publisher, this stored procedure is executed at the Distributor on the distribution database.
Permissions
Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_startpublication_snapshot.
See Also
Create and Apply the Initial Snapshot
sp_addpublication_snapshot (Transact-SQL)
sp_changepublication_snapshot (Transact-SQL)
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for