If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Moving user temporary tablespace to new bufferpool and partition group

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-12-10, 15:59
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
Moving user temporary tablespace to new bufferpool and partition group

Hi,

I have a user temporary table space --

CREATE USER TEMPORARY TABLESPACE USERTMP_TBLSP IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 4096 MANAGED BY SYSTEM
USING ('/path1/path2')
EXTENTSIZE 32
PREFETCHSIZE 32
BUFFERPOOL IBMDEFAULTBP
OVERHEAD 12.670000
TRANSFERRATE 0.180000
FILE SYSTEM CACHING
DROPPED TABLE RECOVERY OFF;



I would like USERTMP_TBLSP to be associated with a partition group USERGROUP and bufferpool USERTMP_BP :

CREATE DATABASE PARTITION GROUP "USERGROUP" ON DBPARTITIONNUMS
(0);


CREATE BUFFERPOOL "USERTMP_BP" DATABASE PARTITION GROUP "USERGROUP" SIZE 2000 PAGESIZE 8192 NOT EXTENDED STORAGE;

so basically USERTMP_TBLSP should have this definition :

CREATE USER TEMPORARY TABLESPACE USERTMP_TBLSP IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 8192 MANAGED BY SYSTEM
USING ('/path1/path2')
EXTENTSIZE 32
PREFETCHSIZE 32
BUFFERPOOL USERTMP_BP
OVERHEAD 12.670000
TRANSFERRATE 0.180000
NO FILE SYSTEM CACHING
DROPPED TABLE RECOVERY OFF;


Is there a simple way to achieve this with the ALTER TABLESPACE command? ( Need to update the partition group, bufferpool and pagesize)


I tried to drop and recreate the tablespace but for some reason it keeps giving me this error even though the temp tables hadn't been declared at the time of execution.. so not sure why it's complaining.


db2 "drop tablespace USERTMP_TBLSP"
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0290N Table space access is not allowed. SQLSTATE=55039
Reply With Quote
  #2 (permalink)  
Old 10-12-10, 16:20
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Do a list tablespaces and find out the status of the tablespace. There is a hex number you will have to look up to tell you why access is not allowed.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 10-12-10, 16:37
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
thanks, will check it out!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On