无法启用 db2gse 空间命令

Failed to enable db2gse spatial commands

我创建了一个名为 mapdata 的数据库,我将在其中创建一个名为 school 的 table。其中一列的数据类型之一是 db2gse.ST_Point。我尝试使用具有该数据类型的列创建 table school 但它给了我一个错误,说 db2gse.ST_Point 是一个未定义的名称。所以我想我必须使用以下语句启用空间命令:

db2se enable_db mapdata

但这也给我错误。它说无法创建临时 table space,因为没有可用的系统临时 table space 具有兼容的页面大小。

我该如何解决这个问题?

如果您查看 db2se enable_db page in the manual,您可能会注意到这一点,其中包括:

Usage notes

Ensure that you have a system temporary table space with a page size of 8 KB or larger and with a minimum size of 500 pages. This is a requirement to run the db2se enable_db command successfully.

错误信息告诉你没有这样的表空间。我怀疑您的数据库也没有匹配的缓冲池。

要创建系统临时表空间,您可以使用以下命令(假设您的数据库配置了自动存储):

db2 "create bufferpool bp8k pagesize 8 k" 
db2 "create system temporary tablespace tmpsys8k pagesize 8 k bufferpool bp8k"