nerdexam
Oracle

1Z0-908 · Question #30

1Z0-908 Question #30: Real Exam Question with Answer & Explanation

The correct answer is D. mysql> IMPORT TABLE FROM /var/tmp/customers.sdi G. mysql> ALTER TABLE shop.customers IMPORT TABLESPACE. Note: The stated correct answers (D, G) appear to contain an error. Option G - ALTER TABLE shop.customers IMPORT TABLESPACE - is an InnoDB-specific command and has no meaning for a MyISAM table. The actual correct answers for this question should be A and D. --- In MySQL 8.0, the

Backup and Recovery

Question

A valid raw backup of the shop.customers MyISAM table was taken. You must restore the table. You begin with these steps: 1. Confirm that secure_file_priv='/var/tmp' 2. mysql> DROP TABLE shop.customers; 3. shell> cp /backup/customers.MY* /var/lib/mysql/shop/ Which two actions are required to complete the restore? (Choose two.)

Options

  • Ashell> cp /backup/customers.sdi /var/tmp
  • Bshell> cp /backup/customers.sdi /var/lib/mysql/shop/
  • Cmysql> SOURCE `/var/tmp/customers.sdi'
  • Dmysql> IMPORT TABLE FROM /var/tmp/customers.sdi
  • Eshell> cp /backup/customers.frm /var/lib/mysql/shop/
  • Fmysql> IMPORT TABLE FROM /var/lib/mysql/shop/customers.sdi
  • Gmysql> ALTER TABLE shop.customers IMPORT TABLESPACE
  • Hmysql> ALTER TABLE shop.customers DISCARD TABLESPACE

Explanation

Note: The stated correct answers (D, G) appear to contain an error. Option G - ALTER TABLE shop.customers IMPORT TABLESPACE - is an InnoDB-specific command and has no meaning for a MyISAM table. The actual correct answers for this question should be A and D.


In MySQL 8.0, the IMPORT TABLE statement restores MyISAM tables using .sdi (Serialized Dictionary Information) files, which replaced the old .frm format. The .MYD (data) and .MYI (index) files were already copied to the datadir in step 3, but the .sdi definition file must be placed in the secure_file_priv directory (/var/tmp) before IMPORT TABLE can read it - making A and D the required steps.

Why distractors fail:

  • B/F: Placing .sdi in the datadir directly or referencing it there bypasses secure_file_priv - MySQL requires the .sdi to come from that restricted path.
  • C: SOURCE executes SQL scripts, not .sdi binary/JSON files.
  • E: .frm files are MySQL 5.x - MySQL 8.0 uses .sdi; copying a .frm does nothing.
  • G/H: IMPORT TABLESPACE / DISCARD TABLESPACE are InnoDB concepts (.ibd files); MyISAM has no tablespace.

Memory tip: For MyISAM in MySQL 8.0, think "sdi to tmp, then IMPORT TABLE" - the .sdi goes to secure_file_priv, then IMPORT TABLE FROM that path registers the table definition. IMPORT TABLESPACE = InnoDB only.

Topics

#MyISAM restoration#raw backup recovery#IMPORT TABLE#secure_file_priv

Community Discussion

No community discussion yet for this question.

Full 1Z0-908 Practice