Skip to content

Commit 2ebf63b

Browse files
committed
Freshness pass on sp_helppublication* (UUF 544813)
1 parent e08a249 commit 2ebf63b

2 files changed

Lines changed: 40 additions & 35 deletions

File tree

docs/relational-databases/system-stored-procedures/sp-helppublication-snapshot-transact-sql.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "sp_helppublication_snapshot (Transact-SQL)"
2+
title: "sys.sp_helppublication_snapshot (Transact-SQL)"
33
description: sp_helppublication_snapshot returns information on the Snapshot agent for a given publication.
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 06/23/2025
7+
ms.date: 01/19/2026
88
ms.service: sql
99
ms.subservice: replication
1010
ms.topic: "reference"
@@ -16,18 +16,18 @@ helpviewer_keywords:
1616
dev_langs:
1717
- "TSQL"
1818
---
19-
# sp_helppublication_snapshot (Transact-SQL)
19+
# sys.sp_helppublication_snapshot (Transact-SQL)
2020

2121
[!INCLUDE [SQL Server SQL MI](../../includes/applies-to-version/sql-asdbmi.md)]
2222

23-
Returns information on the Snapshot agent for a given publication. This stored procedure is executed at the Publisher on the publication database.
23+
Returns information on the Snapshot agent for a given publication. Execute this stored procedure at the Publisher on the publication database.
2424

2525
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
2626

2727
## Syntax
2828

2929
```syntaxsql
30-
sp_helppublication_snapshot
30+
sys.sp_helppublication_snapshot
3131
[ @publication = ] N'publication'
3232
[ , [ @publisher = ] N'publisher' ]
3333
[ ; ]
@@ -43,31 +43,31 @@ The name of the publication. *@publication* is **sysname**, with no default.
4343

4444
Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publisher. *@publisher* is **sysname**, with a default of `NULL`.
4545

46-
*publisher* shouldn't be used when adding an article to a [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Publisher.
46+
Don't use *@publisher* when you add an article to a [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Publisher.
4747

4848
## Result set
4949

5050
| Column name | Data type | Description |
5151
| --- | --- | --- |
5252
| `id` | **int** | ID of the Snapshot Agent. |
5353
| `name` | **nvarchar(100)** | Name of the Snapshot Agent. |
54-
| `publisher_security_mode` | **smallint** | Security mode used by the agent when connecting to the Publisher, which can be one of the following:<br /><br />`0` = [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Authentication<br />`1` = Windows Authentication. |
54+
| `publisher_security_mode` | **smallint** | Security mode the agent uses when connecting to the Publisher. It can be one of the following values:<br /><br />`0` = [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Authentication<br />`1` = Windows Authentication. |
5555
| `publisher_login` | **sysname** | Login used when connecting to the Publisher. |
56-
| `publisher_password` | **nvarchar(524)** | For security reasons, a value of `**********` is always returned. |
56+
| `publisher_password` | **nvarchar(524)** | For security reasons, this column always returns a value of `**********`. |
5757
| `job_id` | **uniqueidentifier** | Unique ID of the agent job. |
58-
| `job_login` | **nvarchar(512)** | Is the Windows account under which the Snapshot agent runs, which is returned in the format `<domain>\<username>`. |
59-
| `job_password` | **sysname** | For security reasons, a value of `**********` is always returned. |
60-
| `schedule_name` | **sysname** | Name of the schedule used for this agent job. |
61-
| `frequency_type` | **int** | Is the frequency with which the agent is scheduled to run, which can be one of these values.<br /><br />`1` = One time<br />`2` = On demand<br />`4` = Daily<br />`8` = Weekly<br />`16` = Monthly<br />`32` = Monthly relative<br />`64` = Autostart<br />`128` = Recurring |
62-
| `frequency_interval` | **int** | The days that the agent runs, which can be one of these values.<br /><br />`1` = Sunday<br />`2` = Monday<br />`3` = Tuesday<br />`4` = Wednesday<br />`5` = Thursday<br />`6` = Friday<br />`7` = Saturday<br />`8` = Day<br />`9` = Weekdays<br />`10` = Weekend days |
63-
| `frequency_subday_type` | **int** | Is the type that defines how often the agent runs when `frequency_type` is `4` (daily), and can be one of these values.<br /><br />`1` = At the specified time<br />`2` = Seconds<br />`4` = Minutes<br />`8` = Hours |
64-
| `frequency_subday_interval` | **int** | Number of intervals of *frequency_subday_type* that occur between scheduled execution of the agent. |
65-
| `frequency_relative_interval` | **int** | Is the week that the agent runs in a given month when `frequency_type` is `32` (monthly relative), and can be one of these values.<br /><br />`1` = First<br />`2` = Second<br />`4` = Third<br />`8` = Fourth<br />`16` = Last |
66-
| `frequency_recurrence_factor` | **int** | Number of weeks or months between the scheduled execution of the agent. |
67-
| `active_start_date` | **int** | Date when the agent is first scheduled to run, formatted as `yyyyMMdd`. |
68-
| `active_end_date` | **int** | Date when the agent is last scheduled to run, formatted as `yyyyMMdd`. |
69-
| `active_start_time` | **int** | Time when the agent is first scheduled to run, formatted as `HHmmss`. |
70-
| `active_end_time` | **int** | Time when the agent is last scheduled to run, formatted as `HHmmss`. |
58+
| `job_login` | **nvarchar(512)** | The Windows account under which the Snapshot agent runs. The column returns this value in the format `<domain>\<username>`. |
59+
| `job_password` | **sysname** | For security reasons, this column always returns a value of `**********`. |
60+
| `schedule_name` | **sysname** | The name of the schedule used for this agent job. |
61+
| `frequency_type` | **int** | The frequency with which the agent is scheduled to run. It can be one of these values:<br /><br />`1` = One time<br />`2` = On demand<br />`4` = Daily<br />`8` = Weekly<br />`16` = Monthly<br />`32` = Monthly relative<br />`64` = Autostart<br />`128` = Recurring |
62+
| `frequency_interval` | **int** | The days that the agent runs, which can be one of these values:<br /><br />`1` = Sunday<br />`2` = Monday<br />`3` = Tuesday<br />`4` = Wednesday<br />`5` = Thursday<br />`6` = Friday<br />`7` = Saturday<br />`8` = Day<br />`9` = Weekdays<br />`10` = Weekend days |
63+
| `frequency_subday_type` | **int** | The type that defines how often the agent runs when `frequency_type` is `4` (daily), and can be one of these values:<br /><br />`1` = At the specified time<br />`2` = Seconds<br />`4` = Minutes<br />`8` = Hours |
64+
| `frequency_subday_interval` | **int** | The number of intervals of `frequency_subday_type` that occur between scheduled execution of the agent. |
65+
| `frequency_relative_interval` | **int** | The week that the agent runs in a given month when `frequency_type` is `32` (monthly relative), and can be one of these values:<br /><br />`1` = First<br />`2` = Second<br />`4` = Third<br />`8` = Fourth<br />`16` = Last |
66+
| `frequency_recurrence_factor` | **int** | The number of weeks or months between the scheduled execution of the agent. |
67+
| `active_start_date` | **int** | The date when the agent is first scheduled to run, formatted as `yyyyMMdd`. |
68+
| `active_end_date` | **int** | The date when the agent is last scheduled to run, formatted as `yyyyMMdd`. |
69+
| `active_start_time` | **int** | The time when the agent is first scheduled to run, formatted as `HHmmss`. |
70+
| `active_end_time` | **int** | The time when the agent is last scheduled to run, formatted as `HHmmss`. |
7171

7272
## Return code values
7373

@@ -79,7 +79,7 @@ Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publi
7979

8080
## Permissions
8181

82-
Only members of the **sysadmin** fixed server role at the Publisher or members of the **db_owner** fixed database role on the publication database can execute `sp_help_publication_snapshot`.
82+
Only members of the **sysadmin** fixed server role at the Publisher or members of the **db_owner** fixed database role on the publication database can run `sp_help_publication_snapshot`.
8383

8484
## Related content
8585

docs/relational-databases/system-stored-procedures/sp-helppublication-transact-sql.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "sp_helppublication (Transact-SQL)"
2+
title: "sys.sp_helppublication (Transact-SQL)"
33
description: sp_helppublication returns information about a publication.
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 06/23/2025
7+
ms.date: 01/19/2026
88
ms.service: sql
99
ms.subservice: replication
1010
ms.topic: "reference"
@@ -16,19 +16,20 @@ helpviewer_keywords:
1616
dev_langs:
1717
- "TSQL"
1818
---
19-
# sp_helppublication (Transact-SQL)
19+
# sys.sp_helppublication (Transact-SQL)
2020

2121
[!INCLUDE [SQL Server SQL MI](../../includes/applies-to-version/sql-asdbmi.md)]
2222

23-
Returns information about a publication. For a [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publication, this stored procedure is executed at the Publisher on the publication database. For an Oracle publication, this stored procedure is executed at the Distributor on any database.
23+
Returns information about a publication. For a [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publication, execute this stored procedure at the Publisher on the publication database. For an Oracle publication, execute this stored procedure at the Distributor on any database.
2424

2525
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
2626

2727
## Syntax
2828

2929
```syntaxsql
30-
sp_helppublication_snapshot
31-
[ @publication = ] N'publication'
30+
sys.sp_helppublication
31+
[ [ @publication = ] N'publication' ]
32+
[ , [ @found = ] found OUTPUT ]
3233
[ , [ @publisher = ] N'publisher' ]
3334
[ ; ]
3435
```
@@ -37,14 +38,18 @@ sp_helppublication_snapshot
3738

3839
#### [ @publication = ] N'*publication*'
3940

40-
The name of the publication to be viewed. *@publication* is **sysname**, with a default of `%`, which returns information about all publications.
41+
The name of the publication to view. *@publication* is **sysname**, with a default of `%`, which returns information about all publications.
42+
43+
#### [ @found = ] *found* OUTPUT
44+
45+
*@found* is an OUTPUT parameter of type **int**. A value of `0` means that no publication matching the input criteria was found.
4146

4247
#### [ @publisher = ] N'*publisher*'
4348

4449
Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publisher. *@publisher* is **sysname**, with a default of `NULL`.
4550

4651
> [!NOTE]
47-
> *publisher* shouldn't be specified when requesting publication information from a [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Publisher.
52+
> Don't specify *@publisher* when you request publication information from a [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Publisher.
4853
4954
## Result set
5055

@@ -71,11 +76,11 @@ Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publi
7176
| `retention` | **int** | Amount of change, in hours, to save for the given publication. |
7277
| `has subscription` | **bit** | Specifies whether the publication has an active subscription. `1` means that the publication has active subscriptions, and `0` means that the publication has no subscriptions. |
7378
| `allow_queued_tran` | **bit** | Specifies whether disables queuing of changes at the Subscriber until they can be applied at the Publisher is enabled. If `0`, changes at the Subscriber aren't queued. |
74-
| `snapshot_in_defaultfolder` | **bit** | Specifies whether snapshot files are stored in the default folder. If `0`, snapshot files are stored in the alternate location specified by *alternate_snapshot_folder*. If `1`, snapshot files can be found in the default folder. |
79+
| `snapshot_in_defaultfolder` | **bit** | Specifies whether snapshot files are stored in the default folder. If `0`, snapshot files are stored in the alternate location specified by `alt_snapshot_folder`. If `1`, snapshot files can be found in the default folder. |
7580
| `alt_snapshot_folder` | **nvarchar(255)** | Specifies the location of the alternate folder for the snapshot. |
7681
| `pre_snapshot_script` | **nvarchar(255)** | Specifies a pointer to an `.sql` file location. The Distribution Agent runs the pre-snapshot script before running any of the replicated object scripts when applying a snapshot at a Subscriber. |
7782
| `post_snapshot_script` | **nvarchar(255)** | Specifies a pointer to an `.sql` file location. The Distribution Agent will run the post-snapshot script after all the other replicated object scripts and data are applied during an initial synchronization. |
78-
| `compress_snapshot` | **bit** | Specifies that the snapshot that is written to the *alt_snapshot_folder* location is to be compressed into the [!INCLUDE [msCoName](../../includes/msconame-md.md)] CAB format. `0` specifies that the snapshot isn't compressed. |
83+
| `compress_snapshot` | **bit** | Specifies that the snapshot that is written to the `alt_snapshot_folder` location is to be compressed into the [!INCLUDE [msCoName](../../includes/msconame-md.md)] CAB format. `0` specifies that the snapshot isn't compressed. |
7984
| `ftp_address` | **sysname** | The network address of the FTP service for the Distributor. Specifies where publication snapshot files are located for the Distribution Agent or Merge Agent of a subscriber to pick up. |
8085
| `ftp_port` | **int** | The port number of the FTP service for the Distributor. |
8186
| `ftp_subdirectory` | **nvarchar(255)** | Specifies where the snapshot files are available for the Distribution Agent or Merge Agent of subscriber to pick up if the publication supports propagating snapshots using FTP. |
@@ -98,7 +103,7 @@ Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publi
98103
| `p2p_continue_onconflict` | **int** | Specifies whether The Distribution Agent continues to process changes when a conflict is detected. A value of `1` means that the agent continues to process changes.<br /><br />**Caution:** We recommend that you use the default value of `0`. When this option is set to `1`, the Distribution Agent tries to converge data in the topology by applying the conflicting row from the node that's the highest originator ID. This method doesn't guarantee convergence. You should make sure that the topology is consistent after a conflict is detected. For more information, see "Handling Conflicts" in [Peer-to-Peer - Conflict Detection in Peer-to-Peer Replication](../replication/transactional/peer-to-peer-conflict-detection-in-peer-to-peer-replication.md). |
99104
| `allow_partition_switch` | **int** | Specifies whether `ALTER TABLE...SWITCH` statements can be executed against the published database. For more information, see [Replicate Partitioned Tables and Indexes](../replication/publish/replicate-partitioned-tables-and-indexes.md). |
100105
| `replicate_partition_switch` | **int** | Specifies whether `ALTER TABLE...SWITCH` statements that are executed against the published database should be replicated to Subscribers. This option is valid only if `allow_partition_switch` is set to `1`. |
101-
| `enabled_for_p2p_lastwriter_conflictdetection` | **int** | Specifies whether the Distribution Agent detects [Configure last writer conflict detection & resolution](../replication/transactional/peer-to-peer/configure-last-writer.md) conflicts for a publication that is enabled for peer-to-peer replication. A value of `1` means that last writer conflicts are detected.<br /><br />**Applies to:** [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)] CU 13 and later versions. |
106+
| `enabled_for_p2p_lastwriter_conflictdetection` | **int** | Specifies whether the Distribution Agent detects [Configure last writer conflict detection & resolution](../replication/transactional/peer-to-peer/configure-last-writer.md) conflicts for a publication that is enabled for peer-to-peer replication. A value of `1` means that last writer conflicts are detected.<br /><br />**Applies to**: [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)] CU 13 and later versions. |
102107

103108
## Return code values
104109

@@ -116,9 +121,9 @@ Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publi
116121

117122
## Permissions
118123

119-
Only members of the **sysadmin** fixed server role at the Publisher or members of the **db_owner** fixed database role on the publication database or users in the publication access list (PAL) can execute `sp_helppublication`.
124+
Only members of the **sysadmin** fixed server role at the Publisher, members of the **db_owner** fixed database role on the publication database, or users in the publication access list (PAL) can execute `sp_helppublication`.
120125

121-
For a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Publisher, only members of the **sysadmin** fixed server role at the Distributor or members of the **db_owner** fixed database role on the distribution database or users in the PAL can execute `sp_helppublication`.
126+
For a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Publisher, only members of the **sysadmin** fixed server role at the Distributor, members of the **db_owner** fixed database role on the distribution database, or users in the PAL can execute `sp_helppublication`.
122127

123128
## Related content
124129

0 commit comments

Comments
 (0)