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

随同 admin()task() 函数,使用 autolocate database anywhere 参数来指定数据库服务器可使用任何非关键 dbspace,用于指定数据库的表的自动定位和分片。

语法

元素 描述 关键考虑
database_name 数据库的名称 不可是 tenant 数据库的名称。

用法

这个命令以一个所有可用 dbspace 的列表取代任何之前的 dbspace 列表。用于 tenant 数据库的 dbspace 不可用。可用 dbspace 的列表存储在 sysautolocate 系统目录表中。

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

示例

下列命令将所有非关键 dbspace 添加到可用 dbspace 的列表,用于 potential_cust 数据库中表的自动定位和分片:

EXECUTE FUNCTION task("autolocate database anywhere", "potential_cust");