Computer three-level database fault management, backup and recovery (1), data backup (dump), transaction log backup, simple recovery model, system database, database backup content and backup time, static dump, dynamic dump, transaction log backup

1. Data dump, also known as data backup, is an important job for database administrators. The following statements about this work are correct:
A. When formulating a backup strategy, in addition to considering the amount of data lost when using backup to restore, it is also necessary to consider the time required for database backup
B. Checkpoint technology can greatly reduce database Dump time
C. Compared with incremental dump, differential dump is slower, but occupies less storage space
D. From the perspective of data recovery, differential dump has shorter recovery time than full dump The
reference answer is A

Analysis: When formulating a backup strategy, in addition to considering the amount of data lost when using backup to restore, it is also necessary to consider the time required for database backup. Checkpointing greatly reduces the amount of logging that must be performed when the database is fully recovered. Although static dumping ensures the validity of data, it is at the expense of reducing the availability of the database; although dynamic dumping improves the availability of the database, the validity of the data may not be guaranteed. Compared with incremental dump, differential dump is slower and occupies more space, but the recovery speed is faster than incremental dump. So the answer is A.

2. In SQL Server 2008, the following statements about the database backup device are correct:
A. The database backup device can be a tape or a disk
B. The database backup device must be established manually before the database backup operation can be performed.
C. Database backup The device can only be used locally and cannot directly use the remote network device
D. The T-SQL stored procedure for creating a backup device is sp_addevice The
reference answer is A

Analysis: The database backup device can be a tape or a disk, and the database backup device can be a local device or a remote network device. SQL Server supports two backup methods, one is to establish a backup device first, and then back up the database to the backup device, such a backup device is called a permanent backup device; the other is to directly back up the database to a physical file, so that The backup device is called a temporary backup device. The T-SQL stored procedure for creating a backup device is sp_addumpdevice. So the answer is A.

3. In SQL Server 2008, the following statements about transaction log backup are correct:
A. The tail log backup is generally performed after the pure log backup is completed, in order to speed up the log backup.
B. It can be used for large-capacity operation logs. Backups are restored by point in time
C. Tail log backups only include pure log records, not bulk operation log records
D. Pure log backups only include transaction logs within a certain time interval and do not include bulk operation log records
The reference answer is D

Analysis: The transaction log backup is only used in the full recovery model and the bulk log recovery model. It does not back up the database itself, only the log records, and only the log content that has changed since the last backup to the current backup time. However, point-in-time recovery of bulk operation log backups is not allowed. Tail-log backups are made in the event of a failure to prevent data loss and can include pure logging or bulk operation logging. So the answer is D.

4. Data dump, also known as data backup, is an important job for database administrators. The following statements about this work are correct:
A. The log file records the modification operations of each transaction to the database, which is mainly used to achieve data recovery
B. The recovery process of static dump must use the log file
C. Complete dump takes up space Large, but the dump speed is fast, and the recovery is simple
D. Dynamic dump allows the concurrent execution of dump operations and user transactions, and does not need to use log files when restoring data. The
reference answer is A

Analysis: Static dumping ensures the validity of data, but at the expense of reducing the availability of the database; while dynamic dumping improves the availability of the database, the validity of the data may not be guaranteed. In order to ensure the validity of the data without reducing the availability of the database, it is necessary to introduce a log file, use it to record the modification activity records of each transaction to the database during the dump, and then use the backup copy of the dynamic dump plus the log file. Restore the database to the correct state at a certain point in time. So option BD is wrong.
A complete dump is to dump all data in the database, which takes up a lot of time and space. The dump is not fast, option C is wrong.
So the answer is A.

5. In SQL Server 2008, the following statements about the database recovery model are wrong:
A. The bulk log recovery model only records the bulk operations at a minimum, and is generally only used as an additional mode of the
complete recovery model. B. The complete recovery model is completely Record all transactions and keep the transaction log until it is backed up
. C. Simple recovery model can minimize transaction log management overhead. It is generally recommended to use it in a production environment.
D. You can use the alter database statement to modify the database recovery model.
Reference The answer is C

Resolution: Generally, for user databases, the simple recovery model is only used for test and development databases, or for databases that contain mostly read-only data (such as data warehouses), this model is not suitable for production systems, because it is not suitable for production systems. , losing the latest changes is unacceptable. So the answer is C.

6. The following statement about SQLServer 2008 database recovery is wrong:
A. During the database recovery process, the data files can be recovered to different locations.
B. Before restoring the database, if the log file is not damaged, a tail log backup can be performed. Reduce data loss
C. SQL Server 2008 supports data recovery at three levels: database, data file, and data table
D. After using the with recovery option in the restore database statement, the database cannot be recovered using subsequent backups.
The reference answer is C

Analysis: SQL Server 2008 supports data recovery at two levels of database and data files. So the answer is C.

7. The following statements about data backup (dump) work are wrong:
A. In order to ensure data consistency, static dump should be used
B. When formulating a backup strategy, factors such as backup space and time need to be considered
C. Incremental Compared with differential dump, dump is faster and occupies less storage space.
D. From the perspective of data recovery, the recovery time of full dump is shorter than that of incremental dump. The
reference answer is A.

Analysis: Static dump can ensure the validity of the data, but it reduces the availability of the database. Dynamic dump can improve the availability of the database, but the validity of the data cannot be guaranteed. To ensure data consistency, log files and dynamic dumps should be used in combination. When formulating a backup strategy, factors such as backup space and time need to be considered.
A complete dump is to dump all data in the database, which takes up a lot of time and space.
A differential dump is a dump of database changes that have occurred since the last full database dump. Compared with full dump, differential dump is faster and occupies less space; compared with incremental dump, differential dump is slower and occupies more space, but the recovery speed is fast.
Incremental dumps only copy files or data blocks that have changed since the last dump. The time and space required for incremental dumps are relatively short, but the data from incremental dumps can only be recovered in conjunction with full dumps. Incremental dumps have longer recovery times than full dumps. So the answer is A.

8. In SQL Server 2008, the following statements about database backup content and backup time are wrong:
A, the model database needs to be backed up
B, the msdb database needs to be backed up
C, the master database does not need to be backed up
D, the tempdb database does not need to be backed up
The reference answer is C

Analysis: In the SQL Server 2008 system database, only the tempdb database does not need to be backed up, and all others need to be backed up. tempdb is just a temporary database, and the tempdb database is recreated every time SQL Server starts. So the answer is C.

9. In SQL Server 2008, the following statements about transaction log backup are wrong.
A. Transaction log backup will incrementally back up database data in addition to backup logs.
B. Transaction log backup needs to ensure that the log chain is complete.
C. The simple recovery model does not support transaction log backups
D. The tail log backup is the last backup in the recovery plan. The
reference answer is A

Analysis: Transaction log backup does not back up the database itself, it only backs up log records, and only backs up log content that has changed since the last backup to the current backup time. So the answer is A.

10. The following statements about database failures and solutions are wrong.
A. Unexpected transaction internal failures generally require administrators to manually intervene in
the recovery process. B. Expected transaction internal failures can be rolled back to make the database consistent
C. UNDO and IREDO need to be performed after a soft failure occurs in the database system D.
The use of hardware fault tolerance can reduce the impact of media failures The
reference answer is A

Analysis: For an unexpected internal failure of a transaction, under the condition that the transaction has no effect on other transactions, the log file is used to undo its modification to the database, so that the database can be restored to the state before the transaction was run. The recovery of transaction failure is done automatically by the system and is transparent to the user. So the answer is A.

11. In SQL Server 2008, the following statements about database backup types are wrong:
A. Only using differential database backup cannot restore database data
B. The database recovery time of the "full database backup + log backup" strategy is longer
C. " The backup and recovery speed of the full database backup + differential database backup + log backup strategy is relatively fast
D. The full database backup is suitable for the situation where the database changes frequently and the impact of data loss is relatively large. The
reference answer is D

Resolution: For large databases, differential backups are usually performed at shorter intervals than full database backups, which reduces the risk of data loss. So the answer is D.

12. There is an existing commodity sales system database based on SQL Server 2008. If any sales data is not allowed to be lost, the following recovery modes that should be set for the database are the most appropriate:
A, large-capacity log recovery mode
B, complete recovery mode
C, simple Recovery mode
D, critical log recovery mode
Reference answer is B

Analysis: The full recovery model records all transactions completely, and retains transaction log records until they are backed up, so the answer is B.

13. The log file plays a very important role in the database backup and recovery process. The following statements about log files are wrong:
A. Log files must be used during static dump recovery.
B. Log files must be used during dynamic dump recovery.
C. Log files must be used during transaction failure recovery.
D. System failure recovery Log files must be used in the process
Reference answer is A

Analysis: Static dumping ensures the validity of data, but at the expense of reducing the availability of the database; while dynamic dumping improves the availability of the database, the validity of the data may not be guaranteed. In order to ensure the validity of the data without reducing the availability of the database, it is necessary to introduce a log file, use it to record the modification activity records of each transaction to the database during the dump, and then use the backup copy of the dynamic dump plus the log file. Restore the database to the correct state at a certain point in time. So the answer is A.

14. In SQL Server 2008, the following statements about database backup content and backup time are wrong:
A. After creating the database, the model database needs to be backed up immediately.
B. After clearing the transaction log, it is recommended to back up the user database.
C. After deleting the user database, there is no need to back up the tempdb database
D. After creating a new database user, it is recommended to back up the master database.
The reference answer is A

Analysis: For the system database of SQL Server (excluding tempdb data), it is generally appropriate to make a backup immediately after modification. For example, the backup of the master database is usually performed after the operation of creating, modifying or deleting the database, or changing the configuration of the server or database, establishing or changing the login account, etc., it should be backed up. So option CD is correct.
The user database should be backed up periodically. How often to back up is related to the frequency of data changes and the amount of data loss that the user can allow. However, after the following operations are performed, it is best to back up the user database immediately:
(1) After creating the database, or after batch loading data in the database.
(2) After creating the index.
(3) After performing the operation of cleaning up the transaction log.
(4) After performing a large-capacity data operation.
So option B is correct, so the answer is A.

15. The following statements about database backup strategies are wrong:
A. The type and frequency of backups belong to the content of the backup strategy.
B. The backup test method generally does not belong to the content of the backup strategy.
C. The backup strategy should consider the storage location and storage equipment of the backup.
D. The backup strategy generally does not consider the arrangement of backup personnel.
The reference answer is B.

Analysis: The formulation of a backup strategy includes defining the type and frequency of backups, the characteristics and speed of the hardware required for the backup, the testing method for the backup, and the storage location and method of the backup media. So the answer is B.

16. The following statements about database failures and solutions are correct:
A. The use of hardware RAIDO can avoid the impact of media failures
B. After a soft failure of the database system, only UNDO operations are required
C. Unexpected internal transaction failures Generally, administrators are required to manually intervene in the recovery process
D. For predictable internal transaction failures, the database can reach a consistent state by rolling back the transaction. The
reference answer is D

Analysis: The knowledge points examined in this question are: Fault management
RAID1 can avoid the impact of media failure, but RAID0 cannot.
After a soft failure occurs, you need to undo all uncommitted transactions and redo all committed transactions after restarting the system.
Unexpected transaction internal failures cannot be handled by the transaction program.
Predictable internal transaction failures can bring the database back to a consistent state by rolling back the transaction and undoing its modifications to the database.
So the answer is D.

17. In SQL Server, the following system databases do not require database backup:
A, tempdb
B, master
C, model
D, msdb
The reference answer is A

Analysis: The knowledge points examined in this question are: The backup database
tempdb is a temporary database, used to save temporary objects or intermediate result sets, and to provide a temporary workspace for data sorting and other operations. The tempdb database is recreated every time SQL Server is started, so there is no need to back up the tempdb database, so the answer is A.

18. The following statements about SQL Server transaction log backup are correct:
A. Transaction log backup can be performed in simple recovery mode
B. In addition to backup log, transaction log backup will also perform database incremental backup
C. Transaction log backup is not required The log chain is complete
D, the tail log backup is the last backup in the recovery plan The
reference answer is D

Analysis: The knowledge points examined in this question are: SQL Server backup and recovery mechanism
Simple recovery mode can minimize transaction log management overhead, because this mode does not back up transaction logs.
Transaction log backup is only used in the full recovery model and the bulk-logged recovery model. It does not back up the database itself, only the log records, and only the log contents that have changed since the last backup to the current backup time.
A continuous sequence of log backups is called a "log chain". The log chain starts with a full backup of the database. Typically, a new log chain is started only after the first full database backup, or after switching the database recovery model from simple to full or bulk-logged.
A tail-log backup is the last relevant backup in a recovery plan.
So the answer is D.

19. The following statements about data backup (dump) work are correct:
A. Incremental dumps are faster than differential dumps and occupy less storage space.
B. From the perspective of database recovery, complete dumps are faster than differential dumps. C. In order to
ensure data consistency, only static dumps can be used
D. When formulating a backup strategy, the backup space factor is mainly considered, and other factors can be ignored
The reference answer is A

Analysis: full backup occupies the largest space, the slowest backup speed but the fastest recovery speed; incremental backup occupies the smallest space, the fastest backup speed but the slowest recovery speed; the parameters of differential backup are between the first two backup methods . So A is right and B is wrong.
Although the textbook said that static dumping can ensure data consistency, and dynamic dumping cannot guarantee data consistency, it also said that "log files" are used to solve the problem of consistency in dynamic dumping, so C is wrong.
Any strategy must be considered comprehensively, and it is impossible to ignore other factors, at least the speed of backup and recovery, so D is wrong.

Supongo que te gusta

Origin blog.csdn.net/Redamancy06/article/details/127027039
Recomendado
Clasificación