将SQL Server数据库备份到多个文件或从多个文件还原

介绍: ( Introduction: )

The SQL Server backup provides an important solution for protecting critical data that is stored in SQL databases. And in order to minimize the risk of data loss, you need to make sure that you back up your databases regularly taking into consideration the changes applied to your data. It is a best practice to test your backups by restoring random backup files to a test environment and check that the backup files are not corrupted.

SQL Server备份为保护存储在SQL数据库中的关键数据提供了重要的解决方案。 为了最大程度地减少数据丢失的风险,您需要确保定期备份数据库,同时考虑应用于数据的更改。 最佳做法是通过将随机备份文件还原到测试环境来测试备份,并检查备份文件是否未损坏。

In addition to the normal disaster of data loss, the DBA can benefits from the backups if there is a media failure in one of the disks or any hardware damage, an accidental drop or delete applied by one of the users or usually copy the data from one server to another one for purposes such as setting up mirroring site or Always On Availability Groups.

除了正常的数据丢失灾难之外,如果其中一个磁盘发生介质故障或任何硬件损坏,用户之一意外地删除或删除数据库或通常从数据库复制数据,则DBA可以从备份中受益。从一台服务器到另一台服务器,例如用于设置镜像站点或始终可用组。

Before scheduling the backup job, you need to have an estimation of how much disk space will be used by the database full backup. Also, you need to have an initial estimation of the database size increment, because when the database size increases, the full database backups will require more storage space.

在计划备份作业之前,您需要估计数据库完全备份将使用多少磁盘空间。 另外,您还需要对数据库大小的增量进行初步估算,因为当数据库大小增加时,完整的数据库备份将需要更多的存储空间。

It is better first to estimate how much disk space requires for your database full database backup. The backup operation copies the data in the database to the backup file, this contains only the used data space only in your database and not any unused one. Which is usually smaller than the database size. In order to estimate the size of the database full backup you can use the sp_spaceused system stored procedure, that will display the number of rows, disk space reserved, and disk space used by a table, indexed view, or displays the disk space reserved and used by the database depending on the parameters.

最好首先估计数据库完整数据库备份需要多少磁盘空间。 备份操作将数据库中的数据复制到备份文件,该文件仅包含数据库中已使用的数据空间,而不包含任何未使用的数据空间。 通常小于数据库的大小。 为了估计数据库完全备份的大小,可以使用sp_spaceused系统存储过程,该过程将显示行数,保留的磁盘空间以及表,索引视图使用的磁盘空间,或者显示保留的磁盘空间和由数据库使用,具体取决于参数。

SQL Server offers many backup types, which depends on the recovery model of the database – that controls how the transaction log is managed in your database: Full backups, Differential backup

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值