sp_delete_log_shipping_secondary_database (Transact-SQL)sp_delete_log_shipping_secondary_database (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

此存储过程删除辅助数据库、本地历史记录和远程历史记录。This stored procedure removes a secondary database and removes the local history and remote history.

主题链接图标 Transact-SQL 语法约定Topic link icon Transact-SQL Syntax Conventions

语法Syntax

  
sp_delete_log_shipping_secondary_database  
[ @secondary_database = ] 'secondary_database'  

参数Arguments

[ @secondary_database = ] 'secondary_database'辅助数据库的名称。[ @secondary_database = ] 'secondary_database' Is the name of the secondary database. secondary_database sysname,无默认值。secondary_database is sysname, with no default.

返回代码值Return Code Values

0(成功)或 1(失败)0 (success) or 1 (failure)

结果集Result Sets

无。None.

备注Remarks

必须从辅助服务器上的master数据库运行sp_delete_log_shipping_secondary_databasesp_delete_log_shipping_secondary_database must be run from the master database on the secondary server.

权限Permissions

只有sysadmin固定服务器角色的成员才能运行此过程。Only members of the sysadmin fixed server role can run this procedure.

另请参阅See Also

关于日志传送 (SQL Server) About Log Shipping (SQL Server)
系统存储过程 (Transact-SQL)System Stored Procedures (Transact-SQL)