Results 1 to 5 of 5

Thread: Containers

  1. #1
    Join Date
    Mar 2011
    Posts
    41

    Unanswered: Containers

    Hello All,

    I have the below file system for this db

    /dev/fslv03 10485760 6749688 36% 352 1% /db2/db2inst
    /dev/fslv04 10485760 4385236 59% 8967 1% /db2/IBM
    /dev/fslv05 78643200 78630832 1% 7 1% /db2/db2inst/data1
    /dev/fslv06 78643200 78630864 1% 4 1% /db2/db2inst/data2
    /dev/fslv07 20971520 20967108 1% 12 1% /db2/db2inst/log1
    /dev/fslv08 20971520 20967992 1% 4 1% /db2/db2inst/log2

    I want 6 tables and its corresponding containers to be created in (db2/db2inst/data1 , db2/db2inst/data2) which is a vanilla filesystem .

    Home directory of DB - db2/db2inst

    I tried several syntax and no luck ..

    db2 "create large tablespace userspace3 add (FILE '/db2/db2inst/data1' 100M)" .

    Really appreciate your quick response .

    Regards
    Sam

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    DB2 Universal Database

    Your syntax seems to be wrong ... Have a look in the above link.

    What version of db2 are you on? You may want to consider using automatic storage with two storage paths as above ..
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Mar 2011
    Posts
    41
    Hi Sathya,

    I'm able to create the TbSp with container with the different location with the

    db2 "CREATE LARGE TABLESPACE tablespace3 MANAGED BY DATABASE USING (file '/db2/db2rep/data1/container33' 10000)"
    DB20000I The SQL command completed successfully.

    and got te below in db2pd -d macin -tab

    0x070000004368E1C0 1 0 Path 1 1 0 0 /db2/db2inst/db2inst/NODE0000/MACIN/T0000001/C0000000.TMP
    0x070000004368F920 2 0 File 8192 8160 0 0 /db2/db2inst/db2inst/NODE0000/MACIN/T0000002/C0000000.LRG
    0x070000004368FBC0 3 0 File 8192 8188 0 0 /db2/db2inst/db2inst/NODE0000/MACIN/T0000003/C0000000.LRG
    0x07000000935190A0 4 0 File 10000 9952 - 0 /db2/db2inst/data1/container2
    0x07000000933FDCE0 5 0 File 10000 9952 - 0 /db2/db2inst/data1/container33
    0x07000000935132C0 6 0 File 10000 9952 - 0 /db2/db2inst/data1/container3
    0x0700000093515EA0 7 0 File 10000 9952 - 0 /db2/db2inst/data1/container4

    As you can see above container are created in with the naming convention container 1/2/3/ ... but it's doesn't seems to have any extensions like .LRG or something which created during the installation . pls clarify and apologies for my ignorance .

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    The ones created during installation appear to be automatic storage tablespaces - the container names are standard ones (using a specific format).

    You are creating non-automatic dms tablespaces - and you have the choice to name the container ... if you want it to be called container2.lrg or container2.LRG or container2.xyz, mention it in the create tablespace statement.
    Code:
    db2 "CREATE LARGE TABLESPACE tablespace3 MANAGED BY DATABASE USING (file '/db2/db2rep/data1/container33.LRG' 10000)"
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    If you want to use automatic storage with data1 and data2, then when creating the database mention the paths in ON.

    You can also alter the database and add/remove storage paths.

    Have a look at the documentation for your version to see which of the above operations are supported (automatic storage was introduced in 8.2.2 with more features/flexibility added over time)
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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