Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
sp_browsesnapshotfolder (Transact-SQL)
Collapse the table of content
Expand the table of content

sp_browsesnapshotfolder (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns the complete path for the latest snapshot generated for a publication. This stored procedure is executed at the Publisher on the publication database.

Topic link icon Transact-SQL Syntax Conventions

sp_browsesnapshotfolder [@publication= ] 'publication'
    { [ , [ @subscriber = ] 'subscriber' ]
 [ , [ @subscriber_db = ] 'subscriber_db' ] }

[ @publication=] 'publication'

Is the name of the publication that contains the article. publication is sysname, with no default.

[ @subscriber=] 'subscriber'

Is the name of the Subscriber. subscriber is sysname, with a default of NULL.

[ @subscriber_db=] 'subscriber_db'

Is the name of the subscription database. subscriber_db is sysname, with a default of NULL.

0 (success) or 1 (failure)

Column name

Data type




Full path to the snapshot directory.

sp_browsesnapshotfolder is used in snapshot replication and transactional replication.

If the subscriber and subscriber_db fields are left NULL, the stored procedure returns the snapshot folder of the most recent snapshot it can find for the publication. If the subscriber and subscriber_db fields are specified, the stored procedure returns the snapshot folder for the specified subscription. If a snapshot has not been generated for the publication, an empty result set is returned.

If the publication is set up to generate snapshot files in both the Publisher working directory and Publisher snapshot folder, the result set contains two rows. The first row contains the publication snapshot folder and the second row contains the publisher working directory. sp_browsesnapshotfolder is useful for determining the directory where snapshot files are generated.

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_browsesnapshotfolder.

Community Additions

© 2015 Microsoft