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 > Why tables are created with the available table spaces, than the one I specified

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-03-11, 06:24
mathewhai mathewhai is offline
Registered User
 
Join Date: Nov 2011
Posts: 1
Why tables are created with the available table spaces, than the one I specified

Hi,
I created a database, connected to that and specified the table space to be 32k
Code:
CONNECT TO myDB;

CREATE BUFFERPOOL my_32k SIZE 250 PAGESIZE 32 K;

CREATE TABLESPACE my_32k  PAGESIZE 32 K MANAGED BY SYSTEM USING ('my_32k') BUFFERPOOL my_32k  ;

CREATE TEMPORARY TABLESPACE my_temp_32k PAGESIZE 32 K MANAGED BY SYSTEM USING ('my_temp_32k ') BUFFERPOOL my_32k;

CONNECT RESET;
If I have a table column with varchar more than 3000, the table is created with my_32k page size. However a table with all columns less than varchar 1000 , the page size corresponds to USERSPACE1.

How I can make all the tables to use the default table space of 32k i.e. my_32k

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 11-03-11, 07:09
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
whenever creating a table : ALWAYS specify the tablespace(s) to use for this
in that case you are not depending on any defaults....
you could use : grant use on tablespace ...
in that case the users are only allowed to use that tablespace
see :GRANT (Table Space Privileges)
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
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