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 > resize tablespace with automatic storage

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-02-08, 02:49
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
resize tablespace with automatic storage

Hi all,
i have next problem:
i need shrink tablespace size. this tablespace is managed by database and uses automatic storage option. By documentation i have not control over tablespace containers, database manager can increase automatically container size, when is full. but how to shrink container?
some ideas ?
thanks advance.



LUW 9.1, linux

db2 alter tablespace USERSPACE1 resize (all containers 1024 M)

DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL20318N Table space "USERSPACE1" of type "AUTOMATIC STORAGE" cannot bealtered using the "RESIZE" operation. SQLSTATE=42858
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #2 (permalink)  
Old 10-02-08, 10:38
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
as the message indicates, ts containers with automatic storage can not be resized - I am checking if any other option.
__________________
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 10-02-08, 10:58
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
przytula_guy: thanks for interest
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #4 (permalink)  
Old 10-03-08, 02:31
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
resize

this is only possible in 9.5 with reduce option...
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #5 (permalink)  
Old 10-03-08, 02:43
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
guyprzytula: thanks for info. so i need drop/recreate db/tablespace without this incredible feature.
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #6 (permalink)  
Old 10-03-08, 02:59
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
in 9.5 same error
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #7 (permalink)  
Old 10-04-08, 03:19
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
have you used the reduce option in 9.5
look at syntax :
http://publib.boulder.ibm.com/infoce...c/r0000890.htm
__________________
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
  #8 (permalink)  
Old 10-04-08, 04:26
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I think he is saying that command will not work with automatic storage. I was noticing that there are some severe limitations of automatic storage in terms of manual configuration, and I decided against it. Automatic sizing is sufficient for most people's needs.
__________________
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
  #9 (permalink)  
Old 10-04-08, 04:54
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
yes it will in 9.5 you can reduce the size even with automatic storage
__________________
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
  #10 (permalink)  
Old 12-22-11, 17:01
phocas phocas is offline
Registered User
 
Join Date: Dec 2011
Posts: 3
Quote:
Originally Posted by przytula_guy View Post
yes it will in 9.5 you can reduce the size even with automatic storage
would anyone care to elaborate on this?

for whatever reason, our db2 v9.5.5 on win 2008-64 refuses to accept "reduce" as a valid command...

am i missing somthing?

trying... alter tabelspace userspace1 (all 50 percent)

forgive my ignorance, this is a bit of a new realm for me.
Reply With Quote
  #11 (permalink)  
Old 12-22-11, 17:28
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by phocas View Post

forgive my ignorance, this is a bit of a new realm for me.
In that case it might be a good idea to start reading the manuals. You would be able to learn, for example, that "for automatic storage table spaces, the REDUCE clause must not be followed by a database-container-clause, an all-containers-clause, or an on-db-partitions-clause."

ALTER TABLESPACE
Reply With Quote
  #12 (permalink)  
Old 12-22-11, 17:30
phocas phocas is offline
Registered User
 
Join Date: Dec 2011
Posts: 3
thanks n_i... have been doing quite a bit of reading on this... and nobody is particularly clear on reduce... indeed there is a lot of contradictory information.


Quote:
Originally Posted by n_i View Post
In that case it might be a good idea to start reading the manuals. You would be able to learn, for example, that "for automatic storage table spaces, the REDUCE clause must not be followed by a database-container-clause, an all-containers-clause, or an on-db-partitions-clause."

ALTER TABLESPACE

Last edited by phocas; 12-22-11 at 17:43. Reason: some typos and such
Reply With Quote
  #13 (permalink)  
Old 12-28-11, 12:16
phocas phocas is offline
Registered User
 
Join Date: Dec 2011
Posts: 3
since not everyone is an expert...

this worked for us...

ALTER TABLESPACE USERSPACE1 REDUCE;

IBM DB2 9.7 for Linux, UNIX and Windows Information Center

change: 17 GB of free space went to 107 GB free space

Last edited by phocas; 12-28-11 at 12:30. Reason: more info
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