存储池创建 dbspace(SQL 管理 API)
随同 admin() 或 task() 函数,使用 create dbspace from storagepool 参数来从存储
池中的一个条目创建永久 dbspace。
GBase 8s 管理员参考
南大通用数据技术股份有限公司 - 713 -
语法
元素
描述
关键考虑
dbspace
要创建的 dbspace 名。
在 dbspace 名称中必须是唯一
的,且不可超过 128 字节。名
称必须以一个字母或下划线开
头,且仅可包括字母、数字、下
环线(_)符或 $ 字符。
first_extent
tblspace tblspace 的第一个
extent 的大小,
以 KB 为单位。
请参阅 admin() 和 task() 参数
大小规范。
initial_chunk_size
新 dbspace 的初始 chunk 大
小。
请参阅 admin() 和 task() 参数
大小规范。
mirroring_flag
二者之一:
•
1 = 镜像
•
0 = 无镜像
镜像标志是可选的。如果未指
定,则缺省是无镜像的
dbspace。
next_extent
tblspace tblspace 中下一个
extent 的大小,
以 KB 为单位。
请参阅 admin() 和 task() 参数
大小规范。
page_size
新 dbspace 的非缺省页大小,
以 KB 为单位。
页大小是可选的。
然而,
如果您
指定 mirroring 为 1,则还必
须指定页大小。
有效的页大小依
赖于计算机的缺省页大小:
l 2
KB 缺省页大小:
2、
4、
6、
8、
10、
12 或 16
KB
l 4
KB 缺省页大小:
4、
8、
12 或 16 KB
要了解创建临时 dbspace 的 admin() 或 task() 语法,请参阅 create tempdbspace 参
数:创建临时 dbspace(SQL 管理 API)。
示例
GBase 8s 管理员参考
南大通用数据技术股份有限公司 - 714 -
下列命令创建名为 dbspace3 的镜像的 dbspace。
新 dbspace 的大小为 1
GB,
页大小为 6
KB,tblspace 第一个 extent 大小为 200 KB,且下一个 extent 大小为 400 KB。
EXECUTE FUNCTION task("create dbspace from storagepool",
"dbspace3", "1 GB", "6", "1", "200", "400");
下列命令创建名为 dbspace8 的无镜像的 dbspace。新 dbspace 的大小为 50
MB。因为未
指定页大小,所以新 dbspace 为缺省页大小。
EXECUTE FUNCTION task("create dbspace from storagepool",
"dbspace8", "50000");