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

守給你的承諾、 提交于 2019-12-10 12:19:35

问题


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

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

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 A default table space could not be found with a page size of at least "8192" that authorization ID "DB2ADMIN" is authorized to use.

Explanation:

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

CREATE LARGE TABLESPACE LARGEDATA MAXSIZE 512 M

and used this space to create my table, like

create table table_name(*) in LARGEDATA;

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

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

Please help...

Thanks in advance for help and time. :)


回答1:


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

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

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.

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


来源:https://stackoverflow.com/questions/17418952/db2-getting-a-default-table-space-could-not-be-found-with-a-page-size-of-at-lea

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!