Linux "ibd2sdi" Command Line Options and Examples
InnoDB utility for extracting serialized dictionary information

ibd2sdi is a utility for extracting serialized dictionary information (SDI) from InnoDB tablespace files. SDI data is present all persistent InnoDB tablespace files. ibd2sdi can be run on file-per-table tablespace files (*.


Usage:

ibd2sdi [options] file_name1 [file_name2 file_name3 ...]




Command Line Options:

--help
Displays command-line help.shell> ibd2sdi --helpUsage: ./ibd2sdi [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames]See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints.
ibd2sdi --help ...
-h
--help Display this help and exit.
ibd2sdi -h ...
-v
--version Display version information and exit.
ibd2sdi -v ...
-#
http://dev.mysql.com/doc/refman/8.0/en/dbug-package.html
ibd2sdi -# ...
-d
Dump the tablespace SDI into the file passed by user.Without the filename, it will default to stdout
ibd2sdi -d ...
-i
--id=# Retrieve the SDI record matching the id passed by user.
ibd2sdi -i ...
-c
Specify the strict checksum algorithm by the user.Allowed values are innodb, crc32, none.
ibd2sdi -c ...
-n
--no-check Ignore the checksum verification.
ibd2sdi -n ...
-p
human readable but it will be of less size(Defaults to on; use --skip-pretty to disable.)Variables (--variable-name=value)and boolean options {FALSE|TRUE} Value (after reading options)
ibd2sdi -p ...
--version
Displays MySQL version information.shell> ibd2sdi --versionibd2sdi Ver 8.0.3-dmr for Linux on x86_64 (Source distribution)
ibd2sdi --version ...
--debug[
Prints a debug log. For debug options, refer to Section 29.5.4, “The DBUG Package”.shell> ibd2sdi --debug=d:t /tmp/ibd2sdi.trace
ibd2sdi --debug[ ...
--dump-file
Dumps serialized dictionary information (SDI) into the specified dump file. If a dump file is not specified, the tablespace SDIis dumped to stdout.shell> ibd2sdi --dump-file=file_name ../data/test/t1.ibd
ibd2sdi --dump-file ...
--skip-data
Skips retrieval of data field values from the serialized dictionary information (SDI) and only retrieves the id and type fieldvalues, which are primary keys for SDI records.shell> ibd2sdi --skip-data ../data/test/t1.ibd["ibd2sdi",{"type": 1,"id": 330},{"type": 2,"id": 7}]
ibd2sdi --skip-data ...
--id
Retrieves serialized dictionary information (SDI) matching the specified table or tablespace object id. An object id is unique tothe object type. Table and tablespace object IDs are also found in the id column of the mysql.tables and mysql.tablespace datadictionary tables. For information about data dictionary tables, see Section 14.1, “Data Dictionary Schema”.shell> ibd2sdi --id=7 ../data/test/t1.ibd["ibd2sdi",{"type": 2,"id": 7,"object":{"mysqld_version_id": 80003,"dd_version": 80003,"sdi_version": 1,"dd_object_type": "Tablespace","dd_object": {"name": "test/t1","comment": "","options": "","se_private_data": "flags=16417;id=2;server_version=80003;space_version=1;","engine": "InnoDB","files": [{"ordinal_position": 1,"filename": "./test/t1.ibd","se_private_data": "id=2;"}]}}}]
ibd2sdi --id ...
--type
Retrieves serialized dictionary information (SDI) matching the specified object type. SDI is provided for table (type=1) andtablespace (type=2) objects.shell> ibd2sdi --type=2 ../data/test/t1.ibd["ibd2sdi",{"type": 2,"id": 7,"object":{"mysqld_version_id": 80003,"dd_version": 80003,"sdi_version": 1,"dd_object_type": "Tablespace","dd_object": {"name": "test/t1","comment": "","options": "","se_private_data": "flags=16417;id=2;server_version=80003;space_version=1;","engine": "InnoDB","files": [{"ordinal_position": 1,"filename": "./test/t1.ibd","se_private_data": "id=2;"}]}}}]
ibd2sdi --type ...
--strict-check
Specifies a strict checksum algorithm for validating the checksum of pages that are read. Options include innodb, crc32, andnone.In this example, the strict version of the innodb checksum algorithm is specified:shell> ibd2sdi --strict-check=innodb ../data/test/t1.ibdIn this example, the strict version of crc32 checksum algorithm is specified:shell> ibd2sdi -c crc32 ../data/test/t1.ibdIf you do not specify the --strict-check option, validation is performed against non-strict innodb, crc32 and none checksums.
ibd2sdi --strict-check ...
--no-check
Skips checksum validation for pages that are read.shell> ibd2sdi --no-check ../data/test/t1.ibd
ibd2sdi --no-check ...
--pretty
Outputs SDI data in JSON pretty print format. Enabled by default. If disabled, SDI is not human readable but is smaller in size.Use --skip-pretty to disable.shell> ibd2sdi --skip-pretty ../data/test/t1.ibdCOPYRIGHTCopyright © 1997, 2019, Oracle and/or its affiliates. All rights reserved.This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public Licenseas published by the Free Software Foundation; version 2 of the License.This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with the program; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
ibd2sdi --pretty ...