Outdated Version
You are viewing an older version of this section. View current production version.
REPAIR DATABASE
Brings a database that has failed to recover (due to a log corruption) back into the online state.
Info
MemSQL versions 4 and higher automatically repair databases as needed.
Syntax
REPAIR DATABASE db_name
Remarks
db_name
is the name of a MemSQL database.- The database must be in an
offline
state (see Database States). REPAIR DATABASE
recovers as much data as possible from the corrupted log.- See Using Durability and Recovery for more information on database recovery and associated errors.
- This command can be run on any MemSQL node (see Node Requirements for MemSQL Commands).
Example
memsql> REPAIR DATABASE test;