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 > Remove table space or container

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-30-11, 02:29
leo_rw leo_rw is offline
Registered User
 
Join Date: Sep 2011
Posts: 2
Remove table space or container

Dear All,
I am new in DB2, so this is first time for me to handle DB2.
I have problem related to Table Spaces.
Suddenly my company application error : " Unable to allocate new pages in table space "TRAN" ".
I found article to solve this problem by increase the size of table space, and it works.

1. I want to know how to delete the table space and create from the beginning ? Because i my disk drive almost running out of space ? is it possible ?
2. if cannot remove the table space, is it possible to delete the old container and create new one ?
I see many tables in "show related object" and indexes. If delete table space or container, what will happen to application ?
Is there any safer way to delete table space or container ?

Thanks,
Reply With Quote
  #2 (permalink)  
Old 09-30-11, 03:08
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
so first thing todo is to find the doc
ALTER TABLESPACE
drop tablespace will also drop objects if allowed
alter tablespace - resize is possible - if space is available or use autoresize
you can add a container on a different filesystem - try to have similar size with existing and use rebalance if allowed
__________________
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
  #3 (permalink)  
Old 09-30-11, 03:13
leo_rw leo_rw is offline
Registered User
 
Join Date: Sep 2011
Posts: 2
can i remove the old one ?

when i want to add new container and use re balance, what actually happen to table space ? Can i remove the old container ? so there is only one new container with different file system.

Thanks,
Reply With Quote
  #4 (permalink)  
Old 09-30-11, 06:24
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
rebalance indicates - the both containers will be filled equaly
if you want to remove the old container
add large container (no rebalance) - delete old container : this will move all data from old to new container (can take some time if many pages)
or
export all tables from old tablespace - drop tablespace/tables - create ts with new container/tables - reload data
have a look at the doc - this is all explained in detail....
__________________
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
  #5 (permalink)  
Old 09-30-11, 10:17
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by przytula_guy View Post
export all tables from old tablespace - drop tablespace/tables - create ts with new container/tables - reload data
Another alternative could be a redirected restore.
Reply With Quote
Reply

Tags
container, table space, unable to allocate

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