Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    36

    Unanswered: 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)"

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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).
    Last edited by Marcus_A; 06-15-04 at 00:37.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    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

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Posting Permissions

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