You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -43,31 +43,31 @@ The name of the publication. *@publication* is **sysname**, with no default.
43
43
44
44
Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publisher. *@publisher* is **sysname**, with a default of `NULL`.
45
45
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.
47
47
48
48
## Result set
49
49
50
50
| Column name | Data type | Description |
51
51
| --- | --- | --- |
52
52
|`id`|**int**| ID of the Snapshot Agent. |
53
53
|`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. |
55
55
|`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 `**********`. |
57
57
|`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`. |
71
71
72
72
## Return code values
73
73
@@ -79,7 +79,7 @@ Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publi
79
79
80
80
## Permissions
81
81
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`.
Copy file name to clipboardExpand all lines: docs/relational-databases/system-stored-procedures/sp-helppublication-transact-sql.md
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
-
title: "sp_helppublication (Transact-SQL)"
2
+
title: "sys.sp_helppublication (Transact-SQL)"
3
3
description: sp_helppublication returns information about a publication.
4
4
author: markingmyname
5
5
ms.author: maghan
6
6
ms.reviewer: randolphwest
7
-
ms.date: 06/23/2025
7
+
ms.date: 01/19/2026
8
8
ms.service: sql
9
9
ms.subservice: replication
10
10
ms.topic: "reference"
@@ -16,19 +16,20 @@ helpviewer_keywords:
16
16
dev_langs:
17
17
- "TSQL"
18
18
---
19
-
# sp_helppublication (Transact-SQL)
19
+
# sys.sp_helppublication (Transact-SQL)
20
20
21
21
[!INCLUDE [SQL Server SQL MI](../../includes/applies-to-version/sql-asdbmi.md)]
22
22
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.
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.
41
46
42
47
#### [@publisher = ] N'*publisher*'
43
48
44
49
Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publisher. *@publisher* is **sysname**, with a default of `NULL`.
45
50
46
51
> [!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.
48
53
49
54
## Result set
50
55
@@ -71,11 +76,11 @@ Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publi
71
76
|`retention`|**int**| Amount of change, in hours, to save for the given publication. |
72
77
|`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. |
73
78
|`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. |
75
80
|`alt_snapshot_folder`|**nvarchar(255)**| Specifies the location of the alternate folder for the snapshot. |
76
81
|`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. |
77
82
|`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. |
79
84
|`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. |
80
85
|`ftp_port`|**int**| The port number of the FTP service for the Distributor. |
81
86
|`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
98
103
|`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). |
99
104
|`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). |
100
105
|`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. |
102
107
103
108
## Return code values
104
109
@@ -116,9 +121,9 @@ Specifies a non-[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] publi
116
121
117
122
## Permissions
118
123
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`.
120
125
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`.
0 commit comments