文档首页> 数据库和应用迁移 UGO> 常见问题> 迁移项目> ctid,xc_node_id,tableoid在GaussDB中已存在。
更新时间:2024-06-11 GMT+08:00
分享

ctid,xc_node_id,tableoid在GaussDB中已存在。

问题现象:

异构数据库迁移至GaussDB需要手动修改ctid,xc_node_id,tableoid,ctrd等列名称。

问题原因

GaussDB中已存在系统的列名称ctid,xc_node_id,tableoid,ctrd,如果源库也存在列名称ctid,xc_node_id,tableoid,ctrd,迁移至GaussDB时需要手动修改创建表的列名称。

解决办法

  1. 执行以下命令,连接GaussDB目标库。

    gsql -U username -d database -p 4000 -W pwd

    “username”为数据库用户名;“database”为数据库名,“pwd”为用户名密码。

  2. 连接上数据库,执行以下SQL语句,完成列名称“ctid”“xc_node_id”“tableoid”“ctrd”的修改。

    create table test("CTRD" int);

    create table test("XC_NODE" int);

    create table test("TABLEO" int);

    create table test("CTRD" int);

分享:

迁移项目 所有常见问题

more