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 > Data Base Managed TableSpace

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-14-04, 22:12
prithvi_raj prithvi_raj is offline
Registered User
 
Join Date: Apr 2004
Posts: 36
Data Base Managed TableSpace

OS: Solaris 2.8
UDB 8.1 fp5


I have a raw device of 512MB size.
How do i create a tablespace of this much space

Does the following stmt work?

create tablespace ts1 managed by DMS using ('/dev/ 512MB)"
Reply With Quote
  #2 (permalink)  
Old 06-14-04, 23:34
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Here is an example of a tablespace I created on a Solaris raw device:

CREATE REGULAR TABLESPACE DATA20_TS
IN NODEGROUP IBMDEFAULTGROUP
PAGESIZE 4096
MANAGED BY DATABASE
USING (DEVICE '/dev/rdsk/data20' 128000)
EXTENTSIZE 16
PREFETCHSIZE 16
BUFFERPOOL BP_MEDIUM_4K
OVERHEAD 24.100000
TRANSFERRATE 0.900000;

Note that '/dev/rdsk/data20' was the name set up by my UNIX administrator for a specific raw logical volume on an array striped by the OS.

In the above example 128000 is the number of pages (4K page size in this tablespace). If you want to express it in MB use 512M. I prefer to specify in pages because I believe that is how it is displayed when you do a db2look, regardless of how it was input (IIRC).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 06-14-04 at 23:37.
Reply With Quote
  #3 (permalink)  
Old 06-14-04, 23:42
prithvi_raj prithvi_raj is offline
Registered User
 
Join Date: Apr 2004
Posts: 36
Marcus,

when i calculated , 512 MB came as 131076pages and i have created with those number pages.
How did you get 128000 pages.
Is taht a round figure?


thanks
Reply With Quote
  #4 (permalink)  
Old 06-14-04, 23:48
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
128000 X 4096 (page size) is 524,288,000 bytes. If there are 1,024,000 bytes per MB, that is 512MB. I am not sure if that is exactly right, so you can use 512M if you want to, and then do a db2look to see how many pages DB2 used.
__________________
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
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