Oracle
1Z0-888 · Question #21
1Z0-888 Question #21: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-888 to reveal the answer and full explanation for question #21. The question stem and answer options stay visible for context.
Replication
Question
A simple master-to-slave replication is currently being used. This information is extracted from the SHOW SLAVE STATUS output:
Last_SQL_Error: Error 'Duplicat entry '8' for key 'PRIMARY'' on query. Default database: 'mydb'. Query: 'insert into mytable VALUES ('8', 'George')'.
Skip_Counter: 0
Retrieved_Gtid_Set: 5da6b4f5-6f60-11e8-b2d6-0010e05f3e06:1-8
Executed_Gtid_Set: 5da6b4f5-6f60-11e8-b2d6-0010e05f3e06:1-7 62706329-6f60-11e8-b64f-0010e05f3e06:1
Auto-Position: 1
You execute a 'SHOW CREATE TABLE mytable' on the slave:
CREATE TABLE
mytable (
ID int(11) NOT NULL DEFAULT '0',
name char(10) DEFAULT NULL,
PRIMARY KEY (ID)
)
The table mytable on the slave contains:
+-----+--------+
| ID | name |
+-----+--------+
| 7 | Nancy |
| 8 | George |
+-----+--------+
You have issued a STOP SLAVE command. You have determined that it is safe to skip the transaction in this case. One or more statements are required before you can issue a START SLAVE command to resolve the duplicate key error. Which statement should be used?Options
- ASET GTID_NEXT="CONSISTENCY"; BEGIN; COMMIT;
- BSET GTID_NEXT="5da6b4f5-6f60-11e8-b2d6-0010e05f3e06:8"; BEGIN; COMMIT; SET GTID_NEXT="AUTOMATIC";
- CSET GLOBAL SQL_SKIP_SLAVE_COUNTER=1
- DSET GLOBAL enforce_gtid_consistency=ON
- ESET GTID_EXECUTED="5da6b4f5-6f60-11e8-b2d6-0010e05f3e06:8";
Unlock 1Z0-888 to see the answer
You've previewed enough free 1Z0-888 questions. Unlock 1Z0-888 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#GTID#Replication Error Handling#Duplicate Key Error#Slave Synchronization