IBD2SDI(1)

πŸ’… ibd2sdi(1) β€” InnoDB SDI extractor πŸ’…

okay bestie, welcome to the ibd2sdi(1) page from the MySQL Database System manual. this one is all about pulling serialized dictionary information out of InnoDB tablespaces, and it is lowkey iconic. ✨

🌸 NAME 🌸

ibd2sdi β€” InnoDB utility for extracting serialized dictionary information (SDI) from an InnoDB tablespace. 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

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

πŸ’– DESCRIPTION πŸ’–

ibd2sdi is a utility for extracting serialized dictionary information (SDI) from InnoDB tablespace files. SDI data is present in all persistent InnoDB tablespace files. slay.

ibd2sdi can be run on file-per-table tablespace files (*.ibd files), general tablespace files (*.ibd files), system tablespace files (ibdata* files), and the data dictionary tablespace (mysql.ibd). it is not supported for use with temporary tablespaces or undo tablespaces. periodt.

ibd2sdi can be used at runtime or while the server is offline. during DDL operations, ROLLBACK operations, and undo log purge operations related to SDI, there may be a short interval of time when ibd2sdi fails to read SDI data stored in the tablespace. iykyk.

ibd2sdi performs an uncommitted read of SDI from the specified tablespace. redo logs and undo logs are not accessed. no cap.

Invoke the ibd2sdi utility like this:

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

ibd2sdi supports multi-file tablespaces like the InnoDB system tablespace, but it cannot be run on more than one tablespace at a time. for multi-file tablespaces, specify each file:

ibd2sdi ibdata1 ibdata2

The files of a multi-file tablespace must be specified in order of the ascending page number. If two successive files have the same space ID, the later file must start with the last page number of the previous file + 1. write that down bestie.

ibd2sdi outputs SDI (containing id, type, and data fields) in JSON format.

πŸŽ€ ibd2sdi Options πŸŽ€

ibd2sdi supports the following options:

  • --help, -h β€” display a help message and exit. πŸ’…
    • Command-Line Format: --help
    • Type: Boolean
    • Default Value: false

For example:

Usage: ./ibd2sdi [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames]
See http://dev.mysql.com/doc/refman/8.4/en/ibd2sdi.html for usage hints.
  -h, --help          Display this help and exit.
  -v, --version       Display version information and exit.
  -#, --debug[=name]  Output debug log. See
                      http://dev.mysql.com/doc/refman/8.4/en/dbug-package.html
  -d, --dump-file=name
                      Dump the tablespace SDI into the file passed by user.
                      Without the filename, it will default to stdout
  -s, --skip-data     Skip retrieving data from SDI records. Retrieve only id
                      and type.
  -i, --id=#          Retrieve the SDI record matching the id passed by user.
  -t, --type=#        Retrieve the SDI records matching the type passed by
                      user.
  -c, --strict-check=name
                      Specify the strict checksum algorithm by the user.
                      Allowed values are innodb, crc32, none.
  -n, --no-check      Ignore the checksum verification.
  -p, --pretty        Pretty format the SDI output.If false, SDI would be not
                      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)
--------------------------------- ----------------------------------------
debug                             (No default value)
dump-file                         (No default value)
skip-data                         FALSE
id                                0
type                              0
strict-check                      crc32
no-check                          FALSE
pretty                            TRUE
  • --version, -v β€” display version information and exit. πŸ¦‹
    • Command-Line Format: --version
    • Type: Boolean
    • Default Value: false

For example:

ibd2sdi  Ver 8.4.8 for Linux on x86_64 (Source distribution)
  • --debug[=debug_options], -# [debug_options] β€” prints a debug log. for debug options, refer to Section 7.9.4, β€œThe DBUG Package”. πŸ›
    • Command-Line Format: --debug=options
    • Type: String
    • Default Value: [none]
ibd2sdi --debug=d:t /tmp/ibd2sdi.trace

This option is available only if MySQL was built using WITH_DEBUG. MySQL release binaries provided by Oracle are not built using this option. important.

  • --dump-file=, -d β€” dumps serialized dictionary information (SDI) into the specified dump file. if a dump file is not specified, the tablespace SDI is dumped to stdout. πŸŽ€
    • Command-Line Format: --dump-file=file
    • Type: File name
    • Default Value: [none]
ibd2sdi --dump-file=file_name ../data/test/t1.ibd
  • --skip-data, -s β€” skips retrieval of data field values from the serialized dictionary information (SDI) and only retrieves the id and type field values, which are primary keys for SDI records. less data, less drama.
    • Command-Line Format: --skip-data
    • Type: Boolean
    • Default Value: false
$> ibd2sdi --skip-data ../data/test/t1.ibd
["ibd2sdi"
,
{
     "type": 1,
     "id": 330
}
,
{
     "type": 2,
     "id": 7
}
]
  • --id=#, -i # β€” retrieves serialized dictionary information (SDI) matching the specified table or tablespace object id. an object id is unique to the object type. table and tablespace object IDs are also found in the id column of the mysql.tables and mysql.tablespace data dictionary tables. for information about data dictionary tables, see Section 16.1, β€œData Dictionary Schema”. 🌈
    • Command-Line Format: --id=#
    • Type: Integer
    • Default Value: 0
$> 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;"
                }
            ]
        }
    }
}
]
  • --type=#, -t # β€” tells ibd2sdi which kind of object you want the SDI for ✨

Here's the deets on that one:

  • Command-Line Format: --type=#
  • Type: Enumeration
  • Default Value: 0
  • Valid Values: 1, 2

So it grabs the serialized dictionary information (SDI) that matches the object type you asked for. SDI is only a thing for table objects (type=1) and tablespace objects (type=2), so those are your two moods πŸŽ€

Bestie, check it β€” this is what the output looks like for a tablespace called ts1 in the test database:

$> ibd2sdi --type=2 ../data/test/ts1.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/ts1",
                "comment": "",
                "options": "",
                "se_private_data": "flags=16417;id=2;server_version=80003;space_version=1;",
                "engine": "InnoDB",
                "files": [
                    {
                        "ordinal_position": 1,
                        "filename": "./test/ts1.ibd",
                        "se_private_data": "id=2;"
                    }
                ]
            }
        }
        }
        ]
okay so this next bit is a tiny little lore drop you need before you panic πŸ™ˆ Because of how InnoDB handles default value metadata, a default value can show up present and non-empty in the ibd2sdi output for a given table column even if it wasn't defined using DEFAULT. So don't come for me when you see it.

Take these two tables, both created in a database named i:

CREATE TABLE t1 (c VARCHAR(16) NOT NULL);
CREATE TABLE t2 (c VARCHAR(16) NOT NULL DEFAULT "Sakila");

Run ibd2sdi and you'll see the default_value for column c is nonempty and, like, literally padded to length in both tables. Obsessed with the consistency:

$> ibd2sdi ../data/i/t1.ibd  | grep -m1 '\"default_value\"' | cut -b34- | sed -e s/,//
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAA="
$> ibd2sdi ../data/i/t2.ibd  | grep -m1 '\"default_value\"' | cut -b34- | sed -e s/,//
"BlNha2lsYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAA="

Ngl, reading ibd2sdi output is way easier with a JSON-aware utility like jq, like this:

$> ibd2sdi ../data/i/t1.ibd  | jq '.[1]["object"]["dd_object"]["columns"][0]["default_value"]'
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAA="
$> ibd2sdi ../data/i/t2.ibd  | jq '.[1]["object"]["dd_object"]["columns"][0]["default_value"]'
"BlNha2lsYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAA="

Want more? Peep the MySQL Internals documentation (link's in the NOTES, bestie πŸ’…).

  • --strict-check, -c β€” picks a strict checksum algorithm to validate the checksum of pages that are read πŸ”₯
    • Command-Line Format: --strict-check=algorithm
    • Type: Enumeration
    • Default Value: crc32
    • Valid Values: crc32, innodb, none

Your options are innodb, crc32, and none. That's the whole menu, no substitutions ✨

In this example, the strict version of the innodb checksum algorithm is what we're specifying:

ibd2sdi --strict-check=innodb ../data/test/t1.ibd

And here, it's the strict version of the crc32 checksum algorithm:

ibd2sdi -c crc32 ../data/test/t1.ibd
Heads up 🫢 if you don't specify the --strict-check option, validation gets performed against non-strict innodb, crc32, and none checksums instead. Different vibe, different rules.
  • --no-check, -n β€” skips checksum validation for the pages that are read πŸ’€
    • Command-Line Format: --no-check
    • Type: Boolean
    • Default Value: false
ibd2sdi --no-check ../data/test/t1.ibd
  • --pretty, -p β€” outputs SDI data in JSON pretty print format 🌸
    • Command-Line Format: --pretty
    • Type: Boolean
    • Default Value: false

It's enabled by default (iconic behaviour, honestly). If you disable it, the SDI is not human readable but it is smaller in size. Use --skip-pretty to disable it πŸŽ€

ibd2sdi --skip-pretty ../data/test/t1.ibd

Copyright Β© 1997, 2026, Oracle and/or its affiliates.

This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as 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 of MERCHANTABILITY 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 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.


πŸ¦‹ NOTES πŸ¦‹

  1. jq β€” https://stedolan.github.io/jq/
  2. MySQL Internals documentation β€” https://dev.mysql.com/doc/dev/mysql-server/latest/

πŸ‘‘ SEE ALSO πŸ‘‘

For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/.


πŸ’– AUTHOR πŸ’–

Oracle Corporation (http://dev.mysql.com/).


That's the whole page, bestie β€” no cap, you're now an ibd2sdi main character 🌈 This edition is MySQL 8.4, dated 03/23/2026, filed under IBD2SDI(1). Slay, go read some dictionary info πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from
  • centos-stream 9: mysql-server 8.4.9-1.module_el9+1367+fdf01435 Β· GPL-2.0-only AND ( GPL-2.0-only WITH Universal-FOSS-exception-1.0 ) AND GPL-2.0-or-later AND ( LGPL-2.0-only WITH Universal-FOSS-exception-1.0 ) AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND ( GPL-2.0-only OR BSD-2-Clause ) AND BSD-2-Clause AND BSL-1.0 AND Apache-2.0 AND MIT
  • fedora 43: mysql-server 8.4.10-1.fc43 Β· GPL-2.0-only AND ( GPL-2.0-only WITH Universal-FOSS-exception-1.0 ) AND GPL-2.0-or-later AND ( LGPL-2.0-only WITH Universal-FOSS-exception-1.0 ) AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND ( GPL-2.0-only OR BSD-2-Clause ) AND BSD-2-Clause AND BSL-1.0 AND Apache-2.0 AND MIT
  • fedora 44: mysql-server 8.4.10-1.fc44 Β· GPL-2.0-only AND ( GPL-2.0-only WITH Universal-FOSS-exception-1.0 ) AND GPL-2.0-or-later AND ( LGPL-2.0-only WITH Universal-FOSS-exception-1.0 ) AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND ( GPL-2.0-only OR BSD-2-Clause ) AND BSD-2-Clause AND BSL-1.0 AND Apache-2.0 AND MIT
  • nixos 26.05: percona-server 8.4.10-10
  • ubuntu questing: mysql-server-core 8.4.10-0ubuntu0.25.10.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms