DB2-Getting A default table space could not be found with a page size of at least “8192";该授权ID“***";被授权使用 [英] DB2- Getting A default table space could not be found with a page size of at least "8192" that authorization ID "***" is authorized to use

查看:21
本文介绍了DB2-Getting A default table space could not be found with a page size of at least “8192";该授权ID“***";被授权使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 db2 新手,请帮助我.

I'm new for db2 and overall databases pls help me.

我正在现有数据库中创建一个表,但在执行 create 语句后,我收到以下错误消息,

I'm creating a table within an existing database, but after executing the create statement i got below error msg,

SQL0286N 找不到页大小为 at 的缺省表空间授权 IDDB2ADMIN"至少可以使用8192".
SQLSTATE=42727

SQL0286N A default table space could not be found with a page size of at least "8192" that authorization ID "DB2ADMIN" is authorized to use.
SQLSTATE=42727

SQL0286N 找不到页面大小至少为8192"且授权标识DB2ADMIN"有权使用的缺省表空间.

SQL0286N A default table space could not be found with a page size of at least "8192" that authorization ID "DB2ADMIN" is authorized to use.

解释:

CREATE TABLE、CREATE GLOBAL TEMPORARY TABLE 或 DECLARE GLOBALTEMPORARY TABLE 语句没有指定表空间,而表正确类型的空间(用于创建的临时表的 USER TEMPORARY 或声明的临时表)具有足够的页面大小(至少""), 授权 ID "" 有 USE权限,找不到.

The CREATE TABLE, CREATE GLOBAL TEMPORARY TABLE, or DECLARE GLOBAL TEMPORARY TABLE statement did not specify a table space, and a table space of the right type (USER TEMPORARY for created temporary table or declared temporary table) with sufficient page size (at least ""), over which authorization ID "" has USE privilege, could not be found.

表的足够页大小由字节数决定行数或列数.

Sufficient page size for a table is determined by either the byte count of the row or the number of columns.

因此我创建了一个表空间

Hence I created a tablespace

创建大表空间大数据最大尺寸 512 M

CREATE LARGE TABLESPACE LARGEDATA MAXSIZE 512 M

并使用这个空间来创建我的表,比如

and used this space to create my table, like

在LARGEDATA中创建表table_name(*);

create table table_name(*) in LARGEDATA;

我认为 512M 应该足以容纳大约 15 列的表格,但我得到以下例外:

I thought 512M should be enough for table with some 15 columns, but I get below exceptions:

SQL0670N 表的行长度超过了4005"字节的限制.(表空间LARGEDATA

SQL0670N The row length of the table exceeded a limit of "4005" bytes. (Table space "LARGEDATA

请帮忙...

提前感谢您的帮助和时间.:)

Thanks in advance for help and time. :)

推荐答案

你正在创建的表的行超过了现有表空间的页面大小.

The row of the table you are creating exceeds the page size of the existent tablespaces.

很可能,您有一个默认页面大小为 4KB 的数据库,并且 userspace1 表空间具有相同的页面大小.

Probably, you have a database with a default page size of 4KB, and the userspace1 tablespace has the same page size.

当您创建大表空间时,您只需将行 ID 大小从 1 字节(常规)更改为 2 字节(大).但是页面大小还是一样的.

When you created the Large tablespace, you are only changing the Row ID size from 1 byte (regular) to 2 bytes (large). However the page size is still the same.

您应该创建一个至少 8KB 页大小的缓冲池,然后创建一个使用该缓冲池的表空间.

You should create a bufferpool of at least 8KB page size, and then a tablespace that uses that bufferpool.

db2 create bufferpool bp8k pagesize 8K
db2 create tablespace data pagesize 8K bufferpool bp8K

这篇关于DB2-Getting A default table space could not be found with a page size of at least “8192";该授权ID“***";被授权使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆