简体   繁体   English

对日志发送数据库的限制

[英]Restrictions on a Log Shipped database

In SQL 2005, what are the things that you should not do to a database that has Log Shipping enabled (and that runs under the Full Recovery Model)? 2005年SQL,有什么事情,你应该做的已启用日志传送数据库(下完全恢复模型是运行)?

I gather that scheduling additional Transaction Log backups to a different location will break the log shipping (because the full log chain is no longer reaching the secondary server). 我认为将其他事务日志备份调度到其他位置会中断日志传送(因为完整的日志链不再到达辅助服务器)。

I also gather that Truncate Table is OK with log shipping (since Sql 2000). 我还收集到Truncate Table可以进行日志传送(自Sql 2000起)。

Are there any other activities/commands that should be avoided? 还有其他应避免的活动/命令吗?

edit: eg is database shrink or log shrink ok? 编辑:例如数据库收缩或日志收缩可以吗?

You are correct. 你是对的。 You should not define any other transaction log backups outside of the Log Shipping configuration, in order to ensure that you maintain the natural Log Sequence. 您不应在“日志传送”配置之外定义任何其他事务日志备份,以确保您维护自然的日志序列。

Should you however wish to perform an Ad-Hoc transaction Log Backup, heaven forbid because you are performing some live maintenance on the production database for example, then you can call the SQL Server Job that Log Shipping uses to perform your transaction log backups. 但是,如果您希望执行临时事务日志备份,则禁止这样做,因为例如您正在对生产数据库执行实时维护,那么您可以调用日志传送用来执行事务日志备份的SQL Server作业。 It is typically called LS_Backup. 通常称为LS_Backup。 This will maintain the LSN. 这将维持LSN。

To my understanding, no operational features of the database being Log Shipped are limited by using this availability technology. 据我了解,通过使用这种可用性技术,不受日志运送的数据库的操作功能受到任何限制。

Some things that can cause complications: 可能导致并发症的一些事情:

Encryption 加密

If you are log shipping to another server and are using SQL Server native encryption then you will not be able to access encrypted data within the log shipped database unless SQL Server is using the same service master key. 如果将日志传送到另一台服务器并使用SQL Server本机加密,则除非SQL Server使用相同的服务主密钥,否则您将无法访问日志传送的数据库中的加密数据。

Assemblies 装配体

You may experience difficulties accessing signed assemblies within a log shipped database, as you cannot enable the trustworthy property. 您可能会遇到访问日志传送的数据库中的已签名程序集的困难,因为您无法启用可信任属性。

Permissions 权限

If you intend to provide read access to the Log Shipped database then the SQL Server Logins will need to have the same SID as those from the source server in order for the logins to automatically map correctly. 如果您打算提供对Log Shipped数据库的读取访问权限,则SQL Server登录名将需要具有与源服务器相同的SID,以便登录名能够自动正确映射。

Hope this helps. 希望这可以帮助。 Cheers. 干杯。

Database/logs growths/shrinks are fine, they will get shipped over and the standby will grow/shink as well. 数据库/日志的增长/收缩很好,它们将被运送过来,备用数据库也将增长/收缩。 The only thing I'm aware of that will break things are: 我唯一知道会破坏的东西是:

BACKUP LOG WITH TRUNCATE_ONLY 使用TRUNCATE_ONLY的备份日志

Changing the recovery mode 更改恢复模式

Taking the primary database offline (not sure about this one, never tried it) 使主数据库脱机(对此不确定(从未尝试过))

Everything else is fine, but doing mass REINDEXES can make for some very large logs that are difficult to deal with on a large database. 其他一切都很好,但是进行大量REINDEXES可以生成一些非常大的日志,这些日志很难在大型数据库上处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM