Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How add a container to tablespace in db2?


System Details:SUSE Linux 11 ,DB2 9.1 fp12,ECC6.0 SR3,kernel 720, 70SWPM

I found that one of the table space fill 100%. So i am trying to add a new container to table space. In the process i tried through both application level and os level but i am unable to add a container to table space.

1. table space 100% Full .For reference see table space_full.jpg  in attachment

2. In application level i went to DBACOCKPIT-->SPACE-->CONTAINER--> add container. Here create option was disabled for reference see create container disable.jpg in attachment

3.AUTO RESIZE was enabled. For reference see table space_full.jpg  in attachment.

At OS level : connected to db2<SID> user then execute the command DB2 CONNECT TO <SID> then executing the following command

db2 alter table space <table space name>  add (FILE '<PATH OF CONTAINER>'  <SIZE>)

it throws the following error

            DB21034E  The command was processed as an SQL statement because it was not avalid Command Line Processor command.  During SQL processing it returned:SQL20318N  Table space "PR3#BTABD" of type "AUTOMATIC STORAGE" cannot bealtered using the "ADD" operation.  SQLSTATE=42858

Please find the below attachment for reference.

auto extent.jpg (237946 B)
tablespace_full.jpg (304430 B)

Hi Yashwanth ,

This would have already been done by your DB2 as you have already made your TB as automatic storage .

Believe you do not need to worry when the tablespace shows 100% in DBACOCKPIT and your tablespace is Automatic storage enabled  ( and you have space in your Filesystem )

The fact that db2 automatically  didnt increase is because there was no need to . When the next requirement comes to write something into that tablespace , DB2 would have already increased it by the extend size

Frank  ,

Kindly correct me if the above is wrong ?

This is just to make sure that nobody following this thread does something which is not required to do  ( if in case it is wrong )

Thanks ,


2 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question