log_shipping_primary_databases (Transact-SQL)log_shipping_primary_databases (Transact-SQL)

适用对象: 是SQL Server 否Azure SQL 数据库 否Azure Synapse Analytics (SQL DW) 否并行数据仓库APPLIES TO: yesSQL Server noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

在日志传送配置中为主数据库存储一条记录。Stores one record for the primary database in a log shipping configuration. 该表存储在msdb数据库中。This table is stored in the msdb database.

列名称Column name 数据类型Data type 说明Description
primary_idprimary_id uniqueidentifieruniqueidentifier 日志传送配置的主数据库 ID。The ID of the primary database for the log shipping configuration.
primary_databaseprimary_database sysnamesysname 日志传送配置中主数据库的名称。The name of the primary database in the log shipping configuration.
backup_directorybackup_directory nvarchar (500)nvarchar(500) 存储主服务器的事务日志备份文件的目录。The directory where transaction log backup files from the primary server are stored.
backup_sharebackup_share nvarchar (500)nvarchar(500) 备份目录的网络或 UNC 路径。The network or UNC path to the backup directory.
backup_retention_periodbackup_retention_period intint 日志备份文件在删除之前保留在备份目录中的时间长度(分钟)。The length of time, in minutes, that a log backup file is retained in the backup directory before being deleted.
backup_job_idbackup_job_id uniqueidentifieruniqueidentifier 与主服务器上的备份作业相关联的 MicrosoftMicrosoft SQL ServerSQL Server 代理作业 ID。The MicrosoftMicrosoft SQL ServerSQL Server Agent job ID associated with the backup job on the primary server.
monitor_servermonitor_server sysnamesysname 在日志传送配置中用作监视服务器的 MicrosoftMicrosoft SQL Server 数据库引擎SQL Server Database Engine 实例的名称。The name of the instance of the MicrosoftMicrosoft SQL Server 数据库引擎SQL Server Database Engine being used as a monitor server in the log shipping configuration.
monitor_server_security_modemonitor_server_security_mode bitbit 用于连接到监视服务器的安全模式。The security mode used to connect to the monitor server.

1 = Windows 身份验证。1 = Windows Authentication.

0 = SQL ServerSQL Server身份验证。0 = SQL ServerSQL Server Authentication.
last_backup_filelast_backup_file nvarchar (500)nvarchar(500) 最近一次事务日志备份的绝对路径。The absolute path of the most recent transaction log backup.
last_backup_datelast_backup_date datetimedatetime 上一次日志备份操作的时间和日期。The time and date of the last log backup operation.
user_specified_monitoruser_specified_monitor bitbit 标识为仅供参考。Identified for informational purposes only. 不支持。Not supported. 不保证以后的兼容性。Future compatibility is not guaranteed.

sp_help_log_shipping_primary_databasesp_help_log_shipping_secondary_primary使用此列控制中SQL Server Management StudioSQL Server Management Studio的监视器设置的显示。sp_help_log_shipping_primary_database and sp_help_log_shipping_secondary_primary use this column to control the display of monitor settings in SQL Server Management StudioSQL Server Management Studio.

0 = 调用这两个存储过程中的任意一个时,用户未指定** @monitor_server**参数的显式值。0 = When invoking either of these two stored procedures, the user did not specify an explicit value for the @monitor_server parameter.

1 = 用户指定一个显式值。1 = An explicit value was specified by the user.
backup_compressionbackup_compression tinyinttinyint 指示日志传送配置是否覆盖服务器级的备份压缩行为。Indicates whether the log shipping configuration overrides the server-level backup compression behavior.

0 = 禁用。0 = Disabled. 永远不压缩日志备份,不管服务器配置的备份压缩设置是什么。Log backups are never compressed, regardless of the server-configured backup compression settings.

1 = 启用。1 = Enabled. 始终压缩日志备份,不管服务器配置的备份压缩设置是什么。Log backups are always compressed, regardless of the server-configured backup compression settings.

2 = 使用视图的服务器配置,或配置备份压缩默认服务器配置选项服务器-配置选项。2 = Uses the server configuration for the View or Configure the backup compression default Server Configuration Option server-configuration option. 这是默认值。This is the default value.

仅在 SQL ServerSQL Server 的 Enterprise 版本中支持备份压缩。Backup compression is supported only in the Enterprise edition of SQL ServerSQL Server.

另请参阅See Also

关于日志传送 (SQL Server) About Log Shipping (SQL Server)
sp_add_log_shipping_primary_database (Transact-sql) sp_add_log_shipping_primary_database (Transact-SQL)
sp_delete_log_shipping_primary_database (Transact-sql) sp_delete_log_shipping_primary_database (Transact-SQL)
sp_help_log_shipping_primary_database (Transact-sql) sp_help_log_shipping_primary_database (Transact-SQL)
系统表 (Transact-SQL)System Tables (Transact-SQL)