Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

205

积分

19

好友

29

主题
1#
发表于 2016-7-20 11:40:01 | 查看: 2148| 回复: 0
【dbdao.com MySQL OCP认证专题】- MySQL 5.6 - OCP 考题讲解

11.

You are using replication and the binary log files on your master server consume a lot of disk space.
Which two steps should you perform to safely remove some of the older binary log files?

A. Ensure that none of the attached slaves are using any of the binary logs you want to delete.
B. Use the command PURGE BINARY LOGS and specify a binary log file name or a date and time to remove unused files.
C. Execute the PURGE BINARY LOGE NOT USED command.
D. Remove all of the binary log files that have a modification date earlier than today.
E. Edit the .index file to remove the files you want to delete.

---------------------------------------------------------------------------

答案:AB

分析:
A是必须要保证的,你的删除的肯定不能正被slave使用啦。
PURGE LOGS语法所做操作会对.index文件进行自动更新。因此B正确,E错:
  1. PURGE { BINARY | MASTER } LOGS { TO 'log_name' | BEFORE datetime_expr }
复制代码
C错,无此语法。
D错,具体清理到什么位置需要按照SHOW SLAVE STATUS来查看,而不是武断地确定删除早于今天的binary log文件。

参考:
http://dev.mysql.com/doc/refman/5.7/en/purge-binary-logs.html
您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-5-7 21:46 , Processed in 0.072164 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569