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 > Containers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-07-11, 06:53
ssatish.81 ssatish.81 is offline
Registered User
 
Join Date: Mar 2011
Posts: 41
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
Reply With Quote
  #2 (permalink)  
Old 04-07-11, 07:06
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
Reply With Quote
  #3 (permalink)  
Old 04-07-11, 07:47
ssatish.81 ssatish.81 is offline
Registered User
 
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 .
Reply With Quote
  #4 (permalink)  
Old 04-07-11, 07:57
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
Reply With Quote
  #5 (permalink)  
Old 04-07-11, 08:01
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
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