One of the most important roles of a database administrator is to constantly protect the integrity of the databases and maintain the ability to recover quickly in case of a failure. In light of this, it’s critically important to have a backup-and-recovery strategy in place in order to be ready for an emergency.
数据库管理员最重要的角色之一是不断保护数据库的完整性,并保持在发生故障时快速恢复的能力。 鉴于此,至关重要的是,要有适当的备份和恢复策略,以便为紧急情况做好准备。
A key responsibility of a database administrator is to ensure that a database is available whenever it’s needed, and prepare for various scenarios wherein the availability or the performance is impacted. Therefore, if a database, for whatever reason, gets corrupted, gets dropped, gets accidentally deleted, or goes into an unusable state, it is a database administrator’s responsibility to bring the database back up in a working state with little to no loss as per the defined service level agreements or government policies.
数据库管理员的主要职责是确保在需要时可以使用数据库,并为影响可用性或性能的各种情况做准备。 因此,如果数据库由于某种原因而损坏,掉落,意外删除或进入不可用状态,则数据库管理员有责任使数据库恢复到正常工作状态,而造成的损失很小甚至没有损失。定义的服务水平协议或政府政策。
Database administrators must be prepared to deal with disaster recovery scenarios. One way of doing that is by testing SQL Server backup and restore strategies at regular intervals. This ensures seamless recovery of data. And seamless recovery means quick recovery of systems with minimal or no data loss. Of course, a database administrator’s responsibility is also to safeguard data from the various data failures.
数据库管理员必须准备好应对灾难恢复方案。 一种方法是定期测试SQL Server备份和还原策略。 这样可确保无缝恢复数据。 无缝恢复意味着快速恢复系统,而数据丢失最少或没有。 当然,数据库管理员的职责还在于保护数据免受各种数据故障的影响。
While designing the backup and restore plan, we need to consider the disaster recovery planning with reference to specific needs of business and the environment. For example, how do we recover from a case of multiple data failures across three prime locations in the environment? How long would it take to recover the data and how long would the system be down? What amount of data loss can the organization tolerate?
在设计备份和还原计划时,我们需要参考业务和环境的特定需求来考虑灾难恢复计划。 例如,如何从环境中三个主要位置的多个数据故障中恢复? 恢复数据需要多长时间,系统将关闭多长时间? 组织可以容忍多少数据丢失?
Another important point that database administrators have to concentrate on is the nature of the storage of data. This directly impacts the usefulness as well as the efficiency of the backup-and-restore process.
数据库管理员必须关注的另一个重要点是数据存储的性质。 这直接影响备份和还原过程的有用性和效率。
There are plenty of advanced techniques available such as Clustering, AlwaysOn, LogShipping and Mirroring that help ensure higher availability but still disaster recovery is all about having a well-defined and tested backup-and-restore process.
群集,AlwaysOn,LogShipping和镜像等大量高级技术可以帮助确保更高的可用性,但是灾难恢复仍然需要具有定义良好且经过测试的备份和还原过程。
Points to consider defining good backup strategy including the:
考虑定义好的备份策略的要点包括:
- frequency at which data changes 数据更改的频率
- online transaction processing 网上交易处理
- frequency of the schema changes 模式更改的频率
- frequency of change in the database configuration 数据库配置的更改频率
- data loading patterns 数据加载方式
- nature of the data itself 数据本身的性质
In this article, we will touch upon the aforementioned points, and take a look at the requirements as well, based on attributes such as the size of the databases, their internal details, and the frequency of changes. Let us now go ahead and look at the considerations that are important to building a solid backup strategy.
在本文中,我们将基于数据库的大小,其内部详细信息和更改频率等属性,着眼于上述几点,并研究需求。 现在让我们继续研究对于构建可靠的备份策略至关重要的注意事项。
SQL Server backups include all database objects: tables, indexes, stored procedures and triggers. These backups are commonly used to migrate databases between different SQL Server instances running on-premises or in the cloud. They can be used for data ingestion, disaster recovery, and so forth as well, though. Native backups simplify the process of importing data and schemas from on-premises SQL Server instances, and they will be easy for SQL Server administrators to understand and use. We use backups to:
SQL Server备份包括所有数据库对象:表,索引,存储过程和触发器。 这些备份通常用于在本地或云中运行的不同SQL Server实例之间迁移数据库。 但是,它们也可以用于数据提取,灾难恢复等。 本机备份简化了从本地SQL Server实例导入数据和架构的过程,并且SQL Server管理员可以轻松理解和使用它们。 我们使用备份来:
- migrate databases 迁移数据库
- refresh development environments 刷新开发环境
- recover from accidental deletes 从意外删除中恢复
- move a database to a different drive 将数据库移动到其他驱动器
- import and export data 导入导出数据
- offload reporting needs using high-availability Log Shipping 使用高可用性日志传送来减轻报告需求
- Handle single or multiple database instances 处理单个或多个数据库实例
- create database copies for testing, training