云数据库 GaussDB-ALTER DATA SOURCE:示例

时间:2023-11-01 16:22:50

示例

 1 2 3 4 5 6 7 8 91011121314151617181920212223242526
--创建一个空Data Source对象。openGauss=# CREATE DATA SOURCE ds_test1;--修改名称。openGauss=# ALTER DATA SOURCE ds_test1 RENAME TO ds_test;--修改属主。openGauss=# CREATE USER user_test1 IDENTIFIED BY 'Gs@123456';openGauss=# ALTER USER user_test1 WITH SYSADMIN;openGauss=# ALTER DATA SOURCE ds_test OWNER TO user_test1;--修改TYPE和VERSION。openGauss=# ALTER DATA SOURCE ds_test TYPE 'MPPDB_TYPE' VERSION 'XXX';--添加字段。openGauss=# ALTER DATA SOURCE ds_test OPTIONS (add dsn 'mppdb', username 'test_user');--修改字段。openGauss=# ALTER DATA SOURCE ds_test OPTIONS (set dsn 'unknown');--删除字段。openGauss=# ALTER DATA SOURCE ds_test OPTIONS (drop username);--删除Data Source和user对象。openGauss=# DROP DATA SOURCE ds_test;openGauss=# DROP USER user_test1;
support.huaweicloud.com/distributed-devg-v2-opengauss/gaussdb-v5r2c10-0520.html