1IBD2SDI(1) MySQL Database System IBD2SDI(1)
2
3
4
6 ibd2sdi - InnoDB utility for extracting serialized dictionary
7 information (SDI) from an InnoDB tablespace
8
10 ibd2sdi [options] file_name1 [file_name2 file_name3 ...]
11
13 ibd2sdi is a utility for extracting serialized dictionary information
14 (SDI) from InnoDB tablespace files. SDI data is present all persistent
15 InnoDB tablespace files.
16
17 ibd2sdi can be run on file-per-table tablespace files (*.ibd files),
18 general tablespace files (*.ibd files), system tablespace files
19 (ibdata* files), and the data dictionary tablespace (mysql.ibd). It is
20 not supported for use with temporary tablespaces or undo tablespaces.
21
22 ibd2sdi can be used at runtime or while the server is offline. During
23 DDL operations, ROLLBACK operations, and undo log purge operations
24 related to SDI, there may be a short interval of time when ibd2sdi
25 fails to read SDI data stored in the tablespace.
26
27 ibd2sdi performs an uncommitted read of SDI from the specified
28 tablespace. Redo logs and undo logs are not accessed.
29
30 Invoke the ibd2sdi utility like this:
31
32 shell> ibd2sdi [options] file_name1 [file_name2 file_name3 ...]
33
34 ibd2sdi supports multi-file tablespaces like the InnoDB system
35 tablespace, but it cannot be run on more than one tablespace at a time.
36 For multi-file tablespaces, specify each file:
37
38 shell> ibd2sdi ibdata1 ibdata2
39
40 The files of a multi-file tablespace must be specified in order of the
41 ascending page number. If two successive files have the same space ID,
42 the later file must start with the last page number of the previous
43 file + 1.
44
45 ibd2sdi outputs SDI (containing id, type, and data fields) in JSON
46 format. ibd2sdi Options
47
48 ibd2sdi supports the following options:
49
50 · --help, -h Displays command-line help.
51
52 shell> ibd2sdi --help
53 Usage: ./ibd2sdi [-v] [-c <strict-check>] [-d <dump file name>] [-n] filename1 [filenames]
54 See http://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html for usage hints.
55 -h, --help Display this help and exit.
56 -v, --version Display version information and exit.
57 -#, --debug[=name] Output debug log. See
58 http://dev.mysql.com/doc/refman/8.0/en/dbug-package.html
59 -d, --dump-file=name
60 Dump the tablespace SDI into the file passed by user.
61 Without the filename, it will default to stdout
62 -s, --skip-data Skip retrieving data from SDI records. Retrieve only id
63 and type.
64 -i, --id=# Retrieve the SDI record matching the id passed by user.
65 -t, --type=# Retrieve the SDI records matching the type passed by
66 user.
67 -c, --strict-check=name
68 Specify the strict checksum algorithm by the user.
69 Allowed values are innodb, crc32, none.
70 -n, --no-check Ignore the checksum verification.
71 -p, --pretty Pretty format the SDI output.If false, SDI would be not
72 human readable but it will be of less size
73 (Defaults to on; use --skip-pretty to disable.)
74 Variables (--variable-name=value)
75 and boolean options {FALSE|TRUE} Value (after reading options)
76 --------------------------------- ----------------------------------------
77 debug (No default value)
78 dump-file (No default value)
79 skip-data FALSE
80 id 0
81 type 0
82 strict-check crc32
83 no-check FALSE
84 pretty TRUE
85
86 · --version, -v Displays MySQL version information.
87
88 shell> ibd2sdi --version
89 ibd2sdi Ver 8.0.3-dmr for Linux on x86_64 (Source distribution)
90
91 · --debug[=debug_options], -# [debug_options] Prints a debug log. For
92 debug options, refer to Section 5.9.4, “The DBUG Package”.
93
94 shell> ibd2sdi --debug=d:t /tmp/ibd2sdi.trace
95
96 This option is available only if MySQL was built using WITH_DEBUG.
97 MySQL release binaries provided by Oracle are not built using this
98 option.
99
100 · --dump-file=, -d Dumps serialized dictionary information (SDI) into
101 the specified dump file. If a dump file is not specified, the
102 tablespace SDI is dumped to stdout.
103
104 shell> ibd2sdi --dump-file=file_name ../data/test/t1.ibd
105
106 · --skip-data, -s Skips retrieval of data field values from the
107 serialized dictionary information (SDI) and only retrieves the id
108 and type field values, which are primary keys for SDI records.
109
110 shell> ibd2sdi --skip-data ../data/test/t1.ibd
111 ["ibd2sdi"
112 ,
113 {
114 "type": 1,
115 "id": 330
116 }
117 ,
118 {
119 "type": 2,
120 "id": 7
121 }
122 ]
123
124 · --id=#, -i # Retrieves serialized dictionary information (SDI)
125 matching the specified table or tablespace object id. An object id
126 is unique to the object type. Table and tablespace object IDs are
127 also found in the id column of the mysql.tables and
128 mysql.tablespace data dictionary tables. For information about data
129 dictionary tables, see Section 14.1, “Data Dictionary Schema”.
130
131 shell> ibd2sdi --id=7 ../data/test/t1.ibd
132 ["ibd2sdi"
133 ,
134 {
135 "type": 2,
136 "id": 7,
137 "object":
138 {
139 "mysqld_version_id": 80003,
140 "dd_version": 80003,
141 "sdi_version": 1,
142 "dd_object_type": "Tablespace",
143 "dd_object": {
144 "name": "test/t1",
145 "comment": "",
146 "options": "",
147 "se_private_data": "flags=16417;id=2;server_version=80003;space_version=1;",
148 "engine": "InnoDB",
149 "files": [
150 {
151 "ordinal_position": 1,
152 "filename": "./test/t1.ibd",
153 "se_private_data": "id=2;"
154 }
155 ]
156 }
157 }
158 }
159 ]
160
161 · --type=#, -t # Retrieves serialized dictionary information (SDI)
162 matching the specified object type. SDI is provided for table
163 (type=1) and tablespace (type=2) objects.
164
165 shell> ibd2sdi --type=2 ../data/test/t1.ibd
166 ["ibd2sdi"
167 ,
168 {
169 "type": 2,
170 "id": 7,
171 "object":
172 {
173 "mysqld_version_id": 80003,
174 "dd_version": 80003,
175 "sdi_version": 1,
176 "dd_object_type": "Tablespace",
177 "dd_object": {
178 "name": "test/t1",
179 "comment": "",
180 "options": "",
181 "se_private_data": "flags=16417;id=2;server_version=80003;space_version=1;",
182 "engine": "InnoDB",
183 "files": [
184 {
185 "ordinal_position": 1,
186 "filename": "./test/t1.ibd",
187 "se_private_data": "id=2;"
188 }
189 ]
190 }
191 }
192 }
193 ]
194
195 · --strict-check, -c Specifies a strict checksum algorithm for
196 validating the checksum of pages that are read. Options include
197 innodb, crc32, and none.
198
199 In this example, the strict version of the innodb checksum
200 algorithm is specified:
201
202 shell> ibd2sdi --strict-check=innodb ../data/test/t1.ibd
203
204 In this example, the strict version of crc32 checksum algorithm is
205 specified:
206
207 shell> ibd2sdi -c crc32 ../data/test/t1.ibd
208
209 If you do not specify the --strict-check option, validation is
210 performed against non-strict innodb, crc32 and none checksums.
211
212 · --no-check, -n Skips checksum validation for pages that are read.
213
214 shell> ibd2sdi --no-check ../data/test/t1.ibd
215
216 · --pretty, -p Outputs SDI data in JSON pretty print format. Enabled
217 by default. If disabled, SDI is not human readable but is smaller
218 in size. Use --skip-pretty to disable.
219
220 shell> ibd2sdi --skip-pretty ../data/test/t1.ibd
221
223 Copyright © 1997, 2020, Oracle and/or its affiliates.
224
225 This documentation is free software; you can redistribute it and/or
226 modify it only under the terms of the GNU General Public License as
227 published by the Free Software Foundation; version 2 of the License.
228
229 This documentation is distributed in the hope that it will be useful,
230 but WITHOUT ANY WARRANTY; without even the implied warranty of
231 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
232 General Public License for more details.
233
234 You should have received a copy of the GNU General Public License along
235 with the program; if not, write to the Free Software Foundation, Inc.,
236 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
237 http://www.gnu.org/licenses/.
238
239
241 For more information, please refer to the MySQL Reference Manual, which
242 may already be installed locally and which is also available online at
243 http://dev.mysql.com/doc/.
244
246 Oracle Corporation (http://dev.mysql.com/).
247
248
249
250MySQL 8.0 11/26/2020 IBD2SDI(1)