1. Membuat LogFile Group
Format:
CREATE LOGFILE GROUP logfile_group
ADD UNDOFILE 'undo_file'
[INITIAL_SIZE [=] initial_size]
[UNDO_BUFFER_SIZE [=] undo_buffer_size]
[REDO_BUFFER_SIZE [=] redo_buffer_size]
[NODEGROUP [=] nodegroup_id]
[WAIT]
[COMMENT [=] comment_text]
ENGINE [=] engine_name
Contoh :
CREATE LOGFILE GROUP lgData
ADD UNDOFILE 'undo.dat' INITIAL_SIZE = 10M;
2. Mengubah LogFile Group
Format:
ALTER LOGFILE GROUP logfile_group
ADD UNDOFILE 'file_name'
[INITIAL_SIZE [=] size]
[WAIT]
ENGINE [=] engine_name
Contoh :
ALTER LOGFILE GROUP lgData
ADD UNDOFILE 'undo1.dat'
INITIAL_SIZE=32M
ENGINE=NDBCLUSTER;
3. Menghapus LogFile Group
Format:
DROP LOGFILE GROUP logfile_group
ENGINE [=] engine_name
Contoh :
DROP LOGFILE GROUP lgData;
4. Melihat list Logfile Group
SELECT LOGFILE_GROUP_NAME, LOGFILE_GROUP_NUMBER, EXTRA
FROM INFORMATION_SCHEMA.FILES
WHERE FILE_NAME = 'undo_10.dat';
5. Tablespace mengarah ke LogFile Group
CREATE TABLESPACE tsData
ADD DATAFILE 'data1.dat'
USE LOGFILE GROUP lgdata
INITIAL_SIZE 32M
ENGINE NDBCLUSTER;