sp_helpdistributiondb (Transact-SQL)


Applies To: SQL Server

Returns properties of the specified distribution database. This stored procedure is executed at the Distributor on the distribution database.

Topic link icon Transact-SQL Syntax Conventions

sp_helpdistributiondb [ [ @database= ] 'database_name' ]  

[ @database=] 'database_name'
Is the database name for which properties are returned. database_name is sysname, with a default of % for all databases associated with the Distributor and on which the user has permissions.

Column nameData typeDescription
namesysnameName of the distribution database.
min_distretentionintMinimum retention period, in hours, before transactions are deleted.
max_distretentionintMaximum retention period, in hours, before transactions are deleted.
history retentionintNumber of hours to retain history.
history_cleanup_agentsysnameName of the History Cleanup Agent.
distribution_cleanup_agentsysnameName of the Distribution Cleanup Agent.
statusintInternal use only.
data_foldernvarchar(255)Name of the directory used to store the database files.
data_filenvarchar(255)Name of the database file.
data_file_sizeintInitial data file size in megabytes.
log_foldernvarchar(255)Name of the directory for the database log file.
log_filenvarchar(255)Name of the log file.
log_file_sizeintInitial log file size in megabytes.

0 (success) or 1 (failure)

sp_helpdistributiondb is used in all types of replication.

Members of the db_owner fixed database role or the replmonitor role in a distribution database and users in the publication access list of a publication using the distribution database can execute sp_helpdistributiondb to return file-related information. Members of the public role can execute sp_helpdistributiondb to return non-file-related information for distribution databases to which they have access.

View and Modify Distributor and Publisher Properties
sp_adddistributiondb (Transact-SQL)
sp_changedistributiondb (Transact-SQL)
sp_dropdistributiondb (Transact-SQL)
System Stored Procedures (Transact-SQL)

Community Additions