zoukankan      html  css  js  c++  java
  • 导入50G文件到mysql,然后再倒入sqlserver

    --导入大文件50G文件到mysql
    1、修改配置
    innodb_flush_log_at_trx_commit=0

    2、导入时的注意事项
    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    source f://file.sql;

    3、过程中查看导入的数量
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;
    SELECT count(id) FROM TABLE_NAME ;
    COMMIT ;

    select table_schema,table_name,table_type,table_rows
    from information_schema.tables where table_name='tm_work_material'

    4、sqlserver 导入mysql
    https://docs.microsoft.com/zh-cn/sql/integration-services/import-export-data/connect-to-a-mysql-data-source-sql-server-import-and-export-wizard?view=sql-server-2017

    5、关键步骤


    6、超大文件处理EmEditor工具超级牛逼,可以免费试用1个月

    7、导入过程中,检查数据的编码和导入的数量
    use cdmp;

    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;
    SELECT * FROM tm_work_material limit 10;
    SELECT * FROM tm_workorder limit 10;
    SELECT * FROM tm_workorder_hour limit 10;
    COMMIT ;

    select table_schema,table_name,table_type,table_rows
    from information_schema.tables where table_name in('tm_work_material','tm_workorder','tm_workorder_hour');


    8、导入过程
    --------------------------------------21
    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    use cdmp;
    source f://tm_workorder_1.sql;

    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    use cdmp;
    source f://tm_work_material_1.sql;

    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    use cdmp;
    source f://tm_workorder_hour_1.sql;


    --------------------------------------22
    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    use cdmp;
    source f://tm_workorder_2.sql;

    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    use cdmp;
    source f://tm_work_material_2.sql;

    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    use cdmp;
    source f://tm_workorder_hour_2.sql;


    --------------------------------------25
    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    use cdmp;
    source e://tm_workorder_3.sql;

    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    use cdmp;
    source e://tm_work_material_3.sql;

    set autocommit=1;
    show variables like 'autocommit';
    set names utf8;
    use cdmp;
    source e://tm_workorder_hour_3.sql;

  • 相关阅读:
    【转】Oracle中的decode在mysql中的等价实现
    Perhaps you are running on a JRE rather than a JDK
    iisapp -a命令出现 :此脚本不能与WScript工作
    HDU 6070 线段树
    HDU 1853 MCMF
    Codeforces 7C 扩展欧几里得
    HDU 5675 智慧数
    Lucas 大组合数
    bzoj 2179 FFT
    POJ 1155 树形背包
  • 原文地址:https://www.cnblogs.com/kuailewangzi1212/p/11067695.html
Copyright © 2011-2022 走看看