navicat教程之--数据转换

本文介绍了数据转换的一般设定和高级设定,包括数据源、目标选择、日志记录、错误处理等特性,并详细阐述了如何配置表选项,如创建表、索引、外键等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

数据转换

General Settings for Data Transfer

一.一般设定

下列指示将引导您完成的过程中建立一个数据转换。请根据您的需要自定义选项。 (见拖放drag and drop

Source

数据源

默认选中所有的数据库对象。如果您不想要数据转换,取消勾选。

所有勾选的数据库将被数据转换。但是,如果您在创建了转换文件后再新增数据库,新的数据库将不会被转换,除非您重新手动修改目标文件。

如果你希望所有的物体被转移到目标数据库,包括所有新增加的对象,而不用重新修改目标文件。请选择此选项,

Target

目标

Transfer directly to server

勾选此项,直接将数据转入其他数据库。

Transfer to file

勾选此项,数据转入文件

Setting Advanced Data Transfer Properties

二.高级设定

General Options

一般选项

Log to file:(日志文件)

在数据转换过程中,记录每个错误的详细信息(标示成功或错误)。

注意:每次数据转换,此文档都会被覆盖写入。

相关话题:

日志文件Log Files

Continue on errors(错误时继续)

勾选此项,转换时忽略遇到的错误。

Drop tables before create(生成表之前先删除)

勾选此项,转换时如遇已经存在同名数据库/表,先删除旧数据库/表,再创建新的数据库/表。

Create database if not exist(不存在时新建)

只有指定的数据库/表未存在时,才会创建。

Server Options

服务选项

Lock tables before read(读表之前锁定)

在数据转换过程中,读表之前先锁定源数据库所有表,在此数据转换操作结束之前,任何update操作不允许。

Flush log files before starting Data Transfer (数据转换前删掉日志文件)

数据转换之前在转换源端运行FLUSH LOGS语法

您可以参考:Flush

Table Options

表选项

Create tables(创建表)
Creates tables in the target database with this option is on.

勾选此选项,将在目标数据库创建表。

假如此选项未被勾选,而目标数据库又存在此表,那么所有记录会附加到目标数据库表中。

Use DDL from SHOW CREATE TABLE
If this option is on, DDL will be used from show create table.

Create indexes(创建索引)

勾选此选项,将在目标数据库表创建索引。

Include foreign keys(包含外键)

勾选此选项,外键信息也被转换输出。

Include engine/table type(包含引擎类型)
Includes table type with this option is on.

勾选此选项,引擎类型信息也被转换输出。

Include character set(包含字符集设置)

勾选此选项,字符集设置信息也被转换输出。

Include auto increment(包含自动增量)
Includes auto increment in the table with this option is on.

勾选此选项,自动增量信息也被转换输出。

Create triggers(包含触发器信息)
Creates triggers in the target database with this option is on.

勾选此选项,触发器也被转换输出。

Create records(包含所有记录)
Check this option if you require all records to be transferred to the destination database.

勾选此选项,所有记录也被转换输出至目标数据库。

Use complete insert statements(使用完整的insert语法)
Inserts records using complete insert syntax.

勾选此选项,插入数据时采用使用完整的insert语法。如:


INSERT INTO 'users' ('ID Number', 'User Name', 'User Age') VALUES ('1', 'Peter McKindsy', '23');
INSERT INTO 'users' ('ID Number', 'User Name', 'User Age') VALUES ('2', 'Johnson Ryne', '56');
INSERT INTO 'users' ('ID Number', 'User Name', 'User Age') VALUES ('0', 'katherine', '23');

Use extended insert statements(使用延伸的insert语法)
勾选此选项,插入数据时采用使用延伸的insert语法。如:


INSERT INTO 'users' VALUES ('1', 'Peter McKindsy', '23'), ('2', 'Johnson Ryne', '56'), ('0', 'Katherine', '23');

Use delayed insert(延时插入)

勾选此选项,插入数据时采用使用延时插入的insert语法。如:


INSERT DELAYED INTO 'users' VALUES ('1', 'Peter McKindsy', '23');
INSERT DELAYED INTO 'users' VALUES ('2', 'Johnson Ryne', '56');
INSERT DELAYED INTO 'users' VALUES ('0', 'katherine', '23');

Add locks when inserting records(数据插入表前锁定)

数据插入表前锁定目标数据库。

Use hexadecimal format for BLOB
Inserts BLOB data as hexadecimal format.

Message Log

日志信息

The Message Log tab allows you to view the running process indicating success or failure. The messages can be saved as text file.

日志信心标签允许您查看数据转换过程中成功或失败的标示。

此信息可保存至文本文档。

 

参考:http://www.navicat.com/win_manual/index.html

 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值