log_shipping_secondary_databases (Transact-SQL)log_shipping_secondary_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 per secondary database in a log shipping configuration. 该表存储在msdb数据库中。This table is stored in the msdb database.

列名称Column name 数据类型Data type 说明Description
secondary_databasesecondary_database sysnamesysname 日志传送配置中辅助数据库的名称。The name of the secondary database in the log shipping configuration.
secondary_idsecondary_id uniqueidentifieruniqueidentifier 日志传送配置中辅助服务器的 ID。The ID for the secondary server in the log shipping configuration.
restore_delayrestore_delay intint 辅助服务器在还原给定备份文件之前要等待的时间,以分钟为单位。The amount of time, in minutes, that the secondary server will wait before restoring a given backup file. 默认为 0 分钟。The default is 0 minutes.
restore_allrestore_all bitbit 如果设置为 1,则辅助服务器将在还原作业运行时还原所有可用的事务日志备份。If set to 1, the secondary server will restore all available transaction log backups when the restore job runs. 否则,在原还了一个文件之后它将停止。Otherwise, it stops after one file has been restored.
restore_moderestore_mode bitbit 辅助数据库的还原模式。The restore mode for the secondary database.

0 = 用 NORECOVERY 还原日志。0 = Restore log with NORECOVERY.

1 = 使用 STANDBY 还原日志。1 = Restore log with STANDBY.
disconnect_usersdisconnect_users bitbit 如果设置为 1,则当执行还原操作时,将断开用户与辅助数据库的连接。If set to 1, users will be disconnected from the secondary database when a restore operation is performed. 默认值为0。The default = 0.
block_sizeblock_size intint 用作备份设备的块大小(字节)。The size, in bytes, that is used as the block size for the backup device.
buffer_countbuffer_count intint 备份或还原操作使用的缓冲区总数。The total number of buffers used by the backup or restore operation.
max_transfer_sizemax_transfer_size intint MicrosoftMicrosoft SQL ServerSQL Server 向备份设备发出的最大输入或输出请求的大小(字节)。The size, in bytes, of the maximum input or output request which is issued by MicrosoftMicrosoft SQL ServerSQL Server to the backup device.
last_restored_filelast_restored_file nvarchar (500)nvarchar(500) 上次还原到辅助数据库的备份文件的文件名。The filename of the last backup file restored to the secondary database.
last_restored_datelast_restored_date datetimedatetime 上次对辅助数据库执行还原操作的时间和日期。The time and date of the last restore operation on the secondary database.

另请参阅See Also

关于 (SQL Server 的日志传送) About Log Shipping (SQL Server)
sp_add_log_shipping_secondary_database (Transact-sql) sp_add_log_shipping_secondary_database (Transact-SQL)
sp_delete_log_shipping_secondary_database (Transact-sql) sp_delete_log_shipping_secondary_database (Transact-SQL)
sp_help_log_shipping_secondary_database (Transact-sql) sp_help_log_shipping_secondary_database (Transact-SQL)
log_shipping_secondary (Transact-sql) log_shipping_secondary (Transact-SQL)
系统表 (Transact-SQL)System Tables (Transact-SQL)