The first thing you should do when you get an error is to see what the
error has to say. From the CLP, issue the following.
db2 ? SQL0286N
The output is
SQL0286N A default table space could not be found with a
pagesize of at least "<pagesize>" that authorization ID
"<user-name>" is authorized to use.
Explanation:
The CREATE TABLE or DECLARE GLOBAL TEMPORARY TABLE statement did
not specify a table space, and a table space of the right type
(USER TEMPORARY for declared temporary table) with sufficient
page size (at least "<pagesize>"), over which authorization ID
"<user-name>" 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.
User Response:
Ensure the existence of a table space of the correct type
(REGULAR or USER TEMPORARY) with a page size of at least
"<pagesize>" and that authorization ID "<user-name>" has USE
privilege on this table space.
sqlcode : -286
sqlstate : 42727
From that i'd gather that maybe the tablespace has not been specified
correctly in the declare temp table stmt.
Regards,
______________________________
Anand Kaushal
Software Engineer - Database
Lionbridge
5th Floor, Spectra Building,
Hiranandani Business Park,
Powai, Mumbai - 400 076
+91-22-55567000x7079 (office)
+91-9819210090 (mobile)
www.lionbridge.com
-----Original Message-----
From: NG YUNE CHONG
[mailto:db2udbdba-ezmlmshield-x97254180.[Email address protected]
<mailto:db2udbdba-ezmlmshield-x97254180.[Email address protected] ]
Sent: Monday, July 31, 2006 5:02 PM
To: LazyDBA Discussion
Subject: sql error
Hi,
How to solve below sql error :-
SQL0286N A default table space could not be found with a page size of at
least "4096" that authorization ID "DB2ADMIN" is authorized to use.
SQLSTATE=42727.
The problem is when I run stored procedure until DECLARE GLOBAL
TEMPORARY TABLE.
Thanks,
Ng
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com <http://www.LazyDBA.com>
To unsubscribe: http://www.lazydba.com/unsubscribe.html
<http://www.lazydba.com/unsubscribe.html>
DB2 & UDB email list listserv db2-l LazyDBA home page