MySQL 8.0 OCP 1Z0-908 191-200题

发布于:2025-05-22 ⋅ 阅读:(15) ⋅ 点赞:(0)

Q191.You must determine if your MySQL server sort_buffer_size parameter setting is appropriate for your
workload.
Which two commands will show the relevant systemwide counters?
A) SHOW STATUS;
B) SELECT * FROM performance_schema.global_status;
C) SELECT * FROM performance_schema.session_status;
D) SHOW ENGINE INNODB STATUS;
E) SELECT * FROM information_schema.innodb_metrics;
F) SHOW GLOBAL STATUS;
Answer:CE

Q192.Which two statements are true about general tablespaces?
A. A new table can be created explicitly in a general tablespace.
B. General tablespaces support temporary tables
C. A general tablespace can have multiple data files.
D. Dropping a table from a general tablespace releases the space back to the operating system.
E. An existing table can be moved into a general tablespace
Answer:CE

选项A:正确
选项B:用表空间是为用户表设计的,而临时表通常存储在独立的临时表空间中
选项C:通用表空间可以存储多个表的数据,一个用表空间对应一个单独的数据文件
选项D:对于 InnoDB 表,删除表时空间不会立即释放回操作系统,而是保留在表空间文件中供后续使用,除非启用了 innodb_file_per_table 且删除的是独立表空间文件。
选项E:正确

Q193.Examine this statement, which executes successfully:
Why does the file contain no visible statement events?
A. You must use the audit_1og_filter_set_filter() and audit_log_filter_set_user()
functions to specify what to log
B. You must add audit_log=ON to the MySQL configuration file and restart MysQL to log
statements.
C. You must use the audit_1og_read() and audit_log_read_bookmark() functions to read the
statement events.
D. You must wait for the audit log buffer to fill before it will flush to disk.
Answer:AB

选项A:如果审计日志的过滤器没有正确配置,相关的语句事件可能不会被记录
选项B:如果审计日志功能没有在配置文件中启用,即使语句执行成功,也不会记录任何事件
选项C:这个选项解释了如何读取审计日志事件,而不是为什么审计日志没有记录
选项D:这个也有可能,但是这个不是从数据库层面导致的(个人观点)


audit_1og_filter_set_filter 定义过滤器。和audit_log_filter_set_user过滤用户帐户。
基于规则的审计日志过滤不会为任何用户记录可审计事件。这与遗留审计日志行为不同,后者会为所有用户记录所有可审计事件(参见第 8.4.5.10 节 "遗留模式审计日志过滤")。如果你希望使用基于规则的过滤实现记录所有内容的行为,可以创建一个简单的过滤器来启用日志记录,并将其分配给默认账户:

Q194.Which statement is true about the my.ini file on a Windows platform while MySQL server is running?
A. MySQL server does not use the my.ini option file for server configuration options.
B. The option file is read by the MySQL server service only at start up
C. Using SET PERSIST will update the my.ini file.
D. Editing the file will immediately change the running server configuration.
Answer:B

选项A:在 Windows 上,MySQL 通常使用 my.ini 文件来配置服务器选项。
选项B:正确
选项C:SET PERSIST 用于将配置更改持久化到数据字典,而不是更新 my.ini 文件
选项D:大多数配置更改需要重启服务器才能生效。某些动态选项可以使用 SET 命令更改,但不会更新 my.ini文件

Q195.You have replication configured, which consists of one master and one slave on different hosts with an
asynchronous replication channel between them.
Your goal is to decrease the amount of data that is transferred between these two hosts.
It is confirmed that the slave instance does not need to have data from the example database.
Which replication filter contributes to your goal?
A. on master:–replicate-ignore-db=example
B. on slave: --binlog-ignore-db=example
C. on slave:–replicate-wild-ignore=example.%
D. on slave: --replicate-ignore-db-example
E. on master: --binlog-ignore-db=example
Answer:E

题目中要在复制中过滤掉example数据库,而且要减少传输的数据,所以是在主上进行过滤,尽量不要产生不用的数据。所以选择E
binlog_ignore_db:此参数表示不记录指定的数据库的二进制日志。所以需要在主节点上配置

Q196.Identify three functions of MysQL Enterprise Monitor.
A. Determine the availability of monitored MySQL servers.
B. Analyze query performance.
C. Centrally manage users.
D. Centrally manage server configurations.
E. Start and stop MySQL Server.
F. Start a logical backup.
G. Start a MySQL Enterprise backup.
H. Create customized alerts and provide notification alerts.
Answer:ABH

MySQL企业监控可以确定数据库可用性,分析性能,以及提供定制的告警和通知,没有CDEFG这些管理功能

Q197.Examine the command
shell# mysqldump --master-data=2 --all-databases > full_backup.sql
You want to make incremental backups every hour after the full backup.
Which log file would be used for incremental backups?
A. slow query log
B. error log
C. innodb redo log
D. binary log.
Answer:D

Q198.Which two are requirements for multiple MysQL servers started by systemd?
A. Each must have a unique socket file and TCP/IP port.
B. Each must have unique passwords
C. Each require separate server-id numbers
D. Each must have a unique data directory.
E. Each must have a unique server-uuid configured.
Answer:AD

同一主机安装多实例,需要不同的socket和端口,不同的数据路径

Q199.MySQL Enterprise Monitor Query Analyzer is confiqured to monitor an instance.
Which statement is true?
A. An agent must be installed locally on the instance to use the Query Analyzer.
B. The Query Response Time index (QRTi) is fixed to 100ms and cannot be customized.
C. The slow query log must be enabled on the monitored server to collect information for the Query
Analyzer.
D. The Query Analyzer can monitor an unlimited number of normalized statements
E. Enabling the events_statements_history_long consumer allows tracking the longest running
query.
Answer:E

选项A:Query Analyzer 支持代理模式和无代理模式,不一定需要本地安装代理。
选项B:Query Analyzer 的 QRTi 可以根据需要进行调整。是可以定制的
选项C:虽然启用慢查询日志有助于收集信息,但 Query Analyzer 还可以利用其他信息源。
选项D:实际监控能力受限于系统资源和配置,不可能“无限
选项E:events_statements_history_long 是 Performance Schema 中的一个消费者,用于记录详细的语句历史信息。启用它可以保留更长的历史记录,从而帮助识别长时间运行的查询。

Q200.Which two methods can be used to determine whether a query uses the hash join algorithm?
A. EXPLAIN FORMAT=TREE
B. EXPLAIN FORMAT=JSON
C. EXPIAIN ANALYZE
D. EXPLAIN FORMAT=TRADIRIONAL
E. EXPIAIN without any formatting argument
Answer:CE

使用explain和explain analyze都可以查看,通过执行计划可以确定是否使用join的算法

Q201.Which two statements are true about using backups of the binary log?
A. Multiple binary logs can be used to restore data.
B. They allow for point-in-time recovery of the data
C. Binary logs can always be used to unapply unwanted schema changes.
D. Binary logs are relatively small, and therefore, excellent for long-term storage and disaster recovery.
E. Multiple binary logs can be applied in parallel for faster data restoration.
Answer:AB

选项AB:binlog可以被用来恢复数据,可以执行基于时间点的恢复都是正确的
选项C:binlog总是可以用于回滚不想要的schema变更,binlog不是用来回滚的
选项D:binlog相对较小,因此可以用来长期存储和灾难恢复,错误,因为binlog的大小取决于增删改的业务量大小
选项E:binlog只能按照顺序进行恢复

Q202.Which statement is true about cold backups?
A) They are backups taken from snapshots of a running database.
B) They are good to use when many users are online accessing the database.
C) They are good to use if only data structures must be backed up but not log files.
D) They are backups taken from OS copy commands
Answer:D

选项A:冷备份是在数据库关闭时进行的备份,而不是从运行中的数据库快照获取。
选项B:冷备份需要数据库关闭,因此不适合在用户在线访问时使用
选项C:冷备份通常备份所有数据库文件,包括数据文件和日志文件,以确保数据一致性
选项D:冷备份通常在数据库关闭后,使用操作系统的文件复制命令(如 cp、rsync)来复制数据文件

Q203.Your MYSQL server was upgraded from an earlier major version.
The sales database contains three tables, one of which is the transactions table, which has 4 million rows.

You are running low on disk space on the datadir partition and begin to investigate.
Examine these commands and output:

mysql> show global variables like ‘innodb_file%’;
±-------------------------±----------+
| Variable_name | Value |
±-------------------------±----------+
| innodb_file_per_table | ON |
±-------------------------±----------+
ls -l|grep ib
-rw-r----- 1 mysql mysql 3287 Dec 12 07:54 ib_buffer_pool
-rw-r----- 1 mysql mysql 125827192912 Dec 12 09:50 ibdata1
-rw-r----- 1 mysql mysql 50331648 Dec 12 09:50 ib_logfile0
-rw-r----- 1 mysql mysql 50331648 Dec 11 14:05 ib_logfile1
-rw-r----- 1 mysql mysql 25165824 Dec 12 08:05 ibtmp1
-rw-r----- 1 mysql mysql 25165824 Dec 12 09:50 mysql.ibd

ls -l sales/
total 544
-rw-r----- 1 mysql mysql 47550136 Dec 12 09:50 sales.ibd
-rw-r----- 1 mysql mysql 114688 Dec 11 14:33 leads.ibd

Which two statements are true?
A.Truncating the transactions table will free up the most disk space.
B.Executing SET GLOBAL innodb_row_format=COMPRESSED and then ALTER TABLE transactions
will free up disk space
C.Truncating the sales and leads table will free up disk space
D.Executing ALTER TABLE transactions will enable you to free up disk space
E. The transactions table was created with innodb_file_per_table=OFF.
Answer:CE

这个题的答案没搞清楚,后续有时间了再看下

Q204.Examine this statement, which executes successfully:
Why does the file contain no visible statement events?
A. You must wait for the audit loa buffer to fill before it will flush to disk.
B. You must read the audit log statements through the Performance Schema.
C. You must add audit_log = ON to the MySQL confiquration file and restart MySQL to log
statements.
D. You must use the audit_log_filter_set_filter() and audit_log_filter_set_user()
functions to specify what to loq.
E. You must use the audit_log_read() and audit_log_read_bookmark() functions to read the
statement events.
Answer:D

上面有个一样的题选D和C,如果只选一个的话就选D,选两个就选CD吧

网站公告

今日签到

点亮在社区的每一天
去签到