MogDB
Ecological Tools
Documentation:stable
Supported Versions:

mtk check-table-data

Check the table data for exception data.

Synopsis

Check the table data for exception data.

  1. date/datetime type contains zero data data

    • MySQL

      select * from table where (col_date >= '0000-00-00' and col_date < '0001-01-01')
  2. varchar/varchar2/char/text type contains char(0),chr(0),\0,0x00,x'00'

    • MySQL

      select * from table where (col_varchar like CONCAT('%', char(0),'%')
    • DB2

      select * from table where (col_varchar like '%'||x'00'||'%')
    • Oracle

      select * from table where (col_varchar like '%'||chr(0)||'%')
  3. Character set encoding

    • Oracle

      converts the column data to the encoding of the data character set, and then compares the length with the original data

      select * from table where ( LENGTHB(col_gbk_n) != LENGTHB(convert(col_gbk_n,'UTF8')) )
mtk check-table-data [flags]

Options

  -h, --help   help for check-table-data

Options inherited from parent commands

  -c, --config string          Set mtk config file. Support json,yaml. [env MTK_CONFIG] (default "mtk.json")
  -d, --debug                  Set the debug mode.
                               Not necessary for the normal usage. [env MTK_DEBUG]
      --disableIgnoreCase      Disables ignoring case queries
      --disableSelectPart      Disable the select by partition
      --file                   export to file
      --fileType string        Indicates the type of a file when data is to be exported to a file. csv,sql (default "csv")
      --noTerminalReport       The terminal does not print an overview of the migration report
      --path string            Indicates the directory of a file to which data is to be exported (default "./data")
      --preRun                 preRun check.
      --schemas string         the Migrate schema,Separated by commas.(schema1,schema2,db1)
      --seqLastNumAddNum int   The last value of the sequence is increased.
      --tables string          the Migrate tables,Separated by commas.(tab1,schema1.tab1)

SEE ALSO

  • mtk - Database Migration Toolkit
Database
A commercial database developed by ENMOTECH based on openGauss open source database.
About
Yunhe EnmoCommunity
MogDBContact Us
Management Tools
High Availability
Graphical Management
Migrate to MogDB Solution
Database Migration Toolkit
MogDB Data Bridge
SQL Compatibility Analyzer
MogDB Verify Data