Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2012
    Location
    Ukraine
    Posts
    24

    Unanswered: Tablespace size after table moving

    Hello Everyone,

    I needed to move all tables from one tablespace to other ones, e.g. from USERSPACE1 to MYTS_REG, MYTS_INDX, MYTS_LOB. I used "ADMIN_MOVE_TABLE" for this and tables moved fine however I see that the size of USERSPACE1 has not decreased (verified via db2pd -db mydb -tablespaces). All tablespaces are managed by automatic storage.
    How can I shrink the tablespace size to fit the size of actual data in it?

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    as version is not indicated : link is for 9.7
    ALTER TABLESPACE - IBM DB2 9.7 for Linux, UNIX, and Windows
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Dec 2012
    Location
    Ukraine
    Posts
    24
    Version is 10.1 with Purescale.
    Yes I saw that, but what option should I use for alter tablespace? Is it resize, if yes, how do I calculate the effective data size that has remained in the USERSPACE1?

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    db2 alter tablespace xxxxxxxxx reduce max
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Dec 2012
    Location
    Ukraine
    Posts
    24
    Reduce is not supported for automatic storage according to infocenter. And I've got the following output for it:

    [db2sdin1@cf1 ~]$ db2 alter tablespace USERSPACE1 reduce max
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL1419N The statement, clause, command, API, or function is not supported in
    a DB2 pureScale environment. Reason code = "11". SQLSTATE=56038
    [db2sdin1@cf1 ~]$

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •