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.PP ibd2sdi supports the following options:
47
48 · --help, -h
49
50 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
87
88 Displays MySQL version information.
89
90 shell> ibd2sdi --version
91 ibd2sdi Ver 8.0.3-dmr for Linux on x86_64 (Source distribution)
92
93 · --debug[=debug_options], -# [debug_options]
94
95 Prints a debug log. For debug options, refer to Section 29.5.3,
96 “The DBUG Package”.
97
98 shell> ibd2sdi --debug=d:t /tmp/ibd2sdi.trace
99
100 · --dump-file=, -d
101
102 Dumps serialized dictionary information (SDI) into the specified
103 dump file. If a dump file is not specified, the tablespace SDI is
104 dumped to stdout.
105
106 shell> ibd2sdi --dump-file=file_name ../data/test/t1.ibd
107
108 · --skip-data, -s
109
110 Skips retrieval of data field values from the serialized dictionary
111 information (SDI) and only retrieves the id and type field values,
112 which are primary keys for SDI records.
113
114 shell> ibd2sdi --skip-data ../data/test/t1.ibd
115 ["ibd2sdi"
116 ,
117 {
118 "type": 1,
119 "id": 330
120 }
121 ,
122 {
123 "type": 2,
124 "id": 7
125 }
126 ]
127
128 · --id=#, -i #
129
130 Retrieves serialized dictionary information (SDI) matching the
131 specified table or tablespace object id. An object id is unique to
132 the object type. Table and tablespace object IDs are also found in
133 the id column of the mysql.tables and mysql.tablespace data
134 dictionary tables. For information about data dictionary tables,
135 see Section 14.1, “Data Dictionary Schema”.
136
137 shell> ibd2sdi --id=7 ../data/test/t1.ibd
138 ["ibd2sdi"
139 ,
140 {
141 "type": 2,
142 "id": 7,
143 "object":
144 {
145 "mysqld_version_id": 80003,
146 "dd_version": 80003,
147 "sdi_version": 1,
148 "dd_object_type": "Tablespace",
149 "dd_object": {
150 "name": "test/t1",
151 "comment": "",
152 "options": "",
153 "se_private_data": "flags=16417;id=2;server_version=80003;space_version=1;",
154 "engine": "InnoDB",
155 "files": [
156 {
157 "ordinal_position": 1,
158 "filename": "./test/t1.ibd",
159 "se_private_data": "id=2;"
160 }
161 ]
162 }
163 }
164 }
165 ]
166
167 · --type=#, -t #
168
169 Retrieves serialized dictionary information (SDI) matching the
170 specified object type. SDI is provided for table (type=1) and
171 tablespace (type=2) objects.
172
173 shell> ibd2sdi --type=2 ../data/test/t1.ibd
174 ["ibd2sdi"
175 ,
176 {
177 "type": 2,
178 "id": 7,
179 "object":
180 {
181 "mysqld_version_id": 80003,
182 "dd_version": 80003,
183 "sdi_version": 1,
184 "dd_object_type": "Tablespace",
185 "dd_object": {
186 "name": "test/t1",
187 "comment": "",
188 "options": "",
189 "se_private_data": "flags=16417;id=2;server_version=80003;space_version=1;",
190 "engine": "InnoDB",
191 "files": [
192 {
193 "ordinal_position": 1,
194 "filename": "./test/t1.ibd",
195 "se_private_data": "id=2;"
196 }
197 ]
198 }
199 }
200 }
201 ]
202
203 · --strict-check, -c
204
205 Specifies a strict checksum algorithm for validating the checksum
206 of pages that are read. Options include innodb, crc32, and none.
207
208 In this example, the strict version of the innodb checksum
209 algorithm is specified:
210
211 shell> ibd2sdi --strict-check=innodb ../data/test/t1.ibd
212
213 In this example, the strict version of crc32 checksum algorithm is
214 specified:
215
216 shell> ibd2sdi -c crc32 ../data/test/t1.ibd
217
218 If you do not specify the --strict-check option, validation is
219 performed against non-strict innodb, crc32 and none checksums.
220
221 · --no-check, -n
222
223 Skips checksum validation for pages that are read.
224
225 shell> ibd2sdi --no-check ../data/test/t1.ibd
226
227 · --pretty, -p
228
229 Outputs SDI data in JSON pretty print format. Enabled by default.
230 If disabled, SDI is not human readable but is smaller in size. Use
231 --skip-pretty to disable.
232
233 shell> ibd2sdi --skip-pretty ../data/test/t1.ibd
234
236 Copyright © 1997, 2019, Oracle and/or its affiliates. All rights
237 reserved.
238
239 This documentation is free software; you can redistribute it and/or
240 modify it only under the terms of the GNU General Public License as
241 published by the Free Software Foundation; version 2 of the License.
242
243 This documentation is distributed in the hope that it will be useful,
244 but WITHOUT ANY WARRANTY; without even the implied warranty of
245 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
246 General Public License for more details.
247
248 You should have received a copy of the GNU General Public License along
249 with the program; if not, write to the Free Software Foundation, Inc.,
250 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
251 http://www.gnu.org/licenses/.
252
253
255 For more information, please refer to the MySQL Reference Manual, which
256 may already be installed locally and which is also available online at
257 http://dev.mysql.com/doc/.
258
260 Oracle Corporation (http://dev.mysql.com/).
261
262
263
264MySQL 8.0 02/20/2019 IBD2SDI(1)