autolocate database add 参数:添加 dbspace 到 dbspace 列表(SQL 管理 API)

随同 admin()task() 函数,使用 autolocate database add 参数来添加 dbspace 到可用的 dbspace 列表,用于指定数据库的表的自动定位和分片。

语法

元素 描述 关键考虑
database_name 数据库的名称  
dbspace 要添加到 dbspace 名称列表的 dbspace 的名称,在这些 dbsapce 中数据库服务器可自动地创建分片。 dbspace 必须存在。

用法

AUTOLOCATE 配置参数或会话环境变量必须设置为一个正整数。

可用 dbspace 的列表存储在 sysautolocate 系统目录表中。

示例

下列命令添加 dbspace dbspace9 到可用 dbspace 的列表,用于在 customer 数据库中的表的自动定位和分片。

EXECUTE FUNCTION task("autolocate database add", "customer", "dbspace9");