参考mysql8.0官方文档 https://dev.mysql.com/doc/refman/8.0/en/ibd2sdi.html

ibd2sdi是一个实用程序,用于从表空间文件中提取 序列化的字典信息(SDI) InnoDB。SDI数据存在于所有持久性InnoDB表空间文件中。

ibd2sdi可以在 每个 表文件空间文件(*.ibd文件), 常规表空间文件(*.ibd文件), 系统表空间 文件(ibdata*文件)和数据字典表空间(mysql.ibd)上运行。不支持将其与临时表空间或撤消表空间一起使用。

ibd2sdi可以在运行时或服务器离线时使用。在 与SDI相关的DDL 操作, ROLLBACK操作和撤消日志清除操作期间, ibd2sdi 无法读取存储在表空间中的SDI数据的时间间隔可能很短。

ibd2sdi从指定的表空间执行未提交的SDI读取。无法访问重做日志和撤消日志。

像这样 调用ibd2sdi实用程序:

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

ibd2sdi支持像InnoDB系统表空间这样的多文件表空间,但是不能一次在多个表空间上运行。对于多文件表空间,请指定每个文件:

shell> ibd2sdi ibdata1 ibdata2

多文件表空间的文件必须按照升序页码的顺序指定。如果两个连续的文件具有相同的空间ID,则后一个文件必须以前一个文件的最后一页编号+ 1开头。

ibd2sdiJSON格式输出SDI(包含id,type和data字段)。

ibd2sdi选项

ibd2sdi支持以下选项:

  • --help, -h

    显示命令行帮助。

    shell> ibd2sdi --help
    Usage: ./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.
    -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.0/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

    显示MySQL版本信息。

    shell> ibd2sdi --version
    ibd2sdi Ver 8.0.3-dmr for Linux on x86_64 (Source distribution)
  • --debug[=debug_options], -# [debug_options]

    打印调试日志。有关调试选项,请参见 第29.5.4节“ DBUG软件包”

    shell> ibd2sdi --debug=d:t /tmp/ibd2sdi.trace
  • --dump-file=, -d

    将序列化的字典信息(SDI)转储到指定的转储文件中。如果未指定转储文件,则表空间SDI将转储到stdout

    shell> ibd2sdi --dump-file=file_name ../data/test/t1.ibd
  • --skip-data, -s

    跳过data从序列化字典信息(SDI)中检索字段值的操作,仅检索id和 type字段值,它们是SDI记录的主键。

    shell> ibd2sdi --skip-data ../data/test/t1.ibd
    ["ibd2sdi"
    ,
    {
    "type": 1,
    "id": 330
    }
    ,
    {
    "type": 2,
    "id": 7
    }
    ]
  • --id=#, -i #

    检索与指定表或表空间对象ID匹配的序列化字典信息(SDI)。对象ID对于对象类型是唯一的。表和表空间对象ID也在和 数据字典表的id列中 找到。有关数据字典表的信息,请参见 第14.1节“数据字典架构”。 mysql.tablesmysql.tablespace

    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;"
    }
    ]
    }
    }
    }
    ]
  • --type=#, -t #

    检索与指定对象类型匹配的序列化字典信息(SDI)。为表(类型= 1)和表空间(类型= 2)对象提供了SDI。

    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;"
    }
    ]
    }
    }
    }
    ]
  • --strict-check, -c

    指定严格的校验和算法,以验证读取的页面的校验和。选项包括 innodbcrc32,和 none

    在此示例中,innodb指定了校验和算法的严格版本 :

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

    在此示例中,crc32指定了校验和算法的严格版本 :

    shell> ibd2sdi -c crc32 ../data/test/t1.ibd

    如果不指定 --strict-check选项,验证对不严格执行 innodbcrc32并 none校验。

  • --no-check, -n

    跳过读取页面的校验和验证。

    shell> ibd2sdi --no-check ../data/test/t1.ibd
  • --pretty, -p

    以JSON漂亮打印格式输出SDI数据。默认启用。如果禁用,则SDI不可读,但尺寸较小。使用--skip-pretty到禁用。

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

ibd2sdi — InnoDB表空间SDI提取实用程序的更多相关文章

  1. Innodb 表空间传输迁移数据

    在mysql5.5之前,mysql实例中innodb引擎表的迁移是个头疼的问题,要么使用mysqldump导出,要么使用物理备份的方法,但是在mysql5.6之后的版本中,可以使用一个新特性,方便地迁 ...

  2. MySQL Innodb表空间不足的处理方法

    官方给出的解决方案: 添加和删除 InnoDB 数据和日志文件 这一节描述在InnoDB表空间耗尽空间之时,或者你想要改变日志文件大小之时,你可以做的一些事情. 最简单的,增加InnoDB表空间大小的 ...

  3. 10. InnoDB表空间加密

    10. InnoDB表空间加密 InnoDB支持存储在单独表空间中的表的数据加密 .此功能为物理表空间数据文件提供静态加密. 详细信息见官方文档

  4. MySQL InnoDB表空间加密

    从 MySQL5.7.11开始,MySQL对InnoDB支持存储在单独表空间中的表的数据加密 .此功能为物理表空间数据文件提供静态加密.该加密是在引擎内部数据页级别的加密手段,在数据页写入文件系统时加 ...

  5. Innodb 表空间卸载、迁移、装载

    从MySQL的Innodb特性中我们知道,Inndob的表空间有共享和独享的特点,如果是共享的.则默认会把表空间存放在一个文件中(ibdata1),当开启独享表空间参数Innodb_file_per_ ...

  6. InnoDB表空间、段、区

    1. 表空间是InnoDB存储引擎逻辑结构的最高层,所有的数据都存放在表空间中.默认,InnoDB存储引擎只有一个表空间ibdata1,即所有数据都存放在这个表空间内.如果用户启用了参数innodb_ ...

  7. Innodb表空间

    Innodb有两种管理表空间的方法 独立表空间:每一张表都会生成独立的文件来进行存储,每一张表都有一个.frm表描述文件,和一个.ibd文件.其中ibd文件包括了单独一个表的数据内容和索引内容. 共享 ...

  8. 019:InnoDB 表空间内部组织结构

    一. 表空间内部组织结构 表空间 内部有多个段对象(Segment) 组成 每个段(Segment)由区(Extent) 组成 每个区(Extent)由页(Page)组成 每个页里面报存数据 (或者叫 ...

  9. Innodb表空间迁移过程

    1.大致流程 将a实例的表的数据迁移到b实例上. 1.在目标实例b上创建一个相同的表 2.在目标库b上执行ALTER TABLE t DISCARD TABLESPACE; 3.在源库a上执行FLUS ...

随机推荐

  1. 无数据库模式kong/kong-ingress-controller

    apiVersion: v1kind: Namespacemetadata:  name: kong---apiVersion: apiextensions.k8s.io/v1beta1kind: C ...

  2. 解决前端项目启动时报错:Use // eslint-disable-next-line to ignore the next line.

    首先说一下这个问题产生的原因: 项目创建时设置了使用 eslint 进行代码规范检查. 解决办法: 找到webpack.base.conf.js文件,并且将下满这行代码注释掉. ...(config. ...

  3. WLC-WLC升级(以2504为例)

    1.WLC升级需要按照升级路径来操作,低版本到高版本的跨度太大,往往需要升级到中间版本,有时候还涉及到FUS. 2.我们升级,一般使用的笔记本上运行的TFTP/FTP  server. 需要注意:笔记 ...

  4. ES2.3.5版本的数据类型

    1,最近使用了2.3.5版本的ES,发现在创建索引的时候出了以下错误. (1)例: POST 192.168.11.166:9200/article3/article/_mapping { " ...

  5. Linux kali安装chromium

    打开终端,输入以下命令 apt-get install chromium chromium-l10n

  6. uniGUI之uniEdit(23)

    主要新加属性: a]EmptyText在没有文本里显示的背景文本. b]作为其他控件的编辑输入控件. c]ClearButton清空按钮 d]左边显示文本 e]回车触发事件CharEOL:=#13 f ...

  7. 第二周之Hadoop学习(二)

    这篇博客根据http://dblab.xmu.edu.cn/blog/install-hadoop-in-centos/中的教程进行学习: 首先按照教程的操作的第一步的时候,电脑直接蓝屏了. 但是依然 ...

  8. Spark以yarn方式运行时抛出异常

    Spark以yarn方式运行时抛出异常: cluster.YarnClientSchedulerBackend: Yarn application has already exited with st ...

  9. 九 AOP的概述

    AOP : 面向切面编程,解决OOP(面向对象编程)开发遇到的问题,是oop的延伸和扩展 AOP的优点:不修改源码的情况下,对程序进行校验,日志记录,性能控制,事务控制 SpringAOP底层的实现原 ...

  10. 吴裕雄 Bootstrap 前端框架开发——Bootstrap 排版:设定小文本

    <!DOCTYPE html> <html> <head> <title>菜鸟教程(runoob.com)</title> <meta ...