Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2002
    Posts
    1

    Unanswered: how to create a table whose row length is greater that 4005 bytes

    Hi all,

    We are trying to create a table which has about 6 varchar fields with a length of 8192. The maximum allowed is 4000. There is a longvarchar which allows upto 32700. So, using longvarchar could resolve the problem.

    But, the default tablespace allows a row length of only 4005 bytes.We tried creating a new tablespace with a page size of 32 KB but we got an error which said that the page size of the table space and the buffer pool had to be the same and we were using the default buffer pool provided which had a page size of 4KB.

    We created a new buffer pool with a page size of 32 KB and tried to use that for the table space but got an error that said that the buffer pool needed to be activated.This we could not figure out.

    Basically, is there a simpler way to create a table whose row length is greater that 4005 bytes? If not, are we on the right track trying to create a new table space and buffer pool ? How then, do we activate the buffer pool?

    Thanks in advance

    Abhilesh

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

    Re: how to create a table whose row length is greater that 4005 bytes

    To activate a Buffer Pool, you need to disconnect all applications from the database and DEACTIVATE database (if you have done ACTIVATE database) ... Then the first connection to the database will activate the new bufferpool ...

    Additional bit of info, From V8 , bufferpools can be created, dropped or altered online ...


    Cheers

    Sathyaram

    Originally posted by khatriabhilesh
    Hi all,

    We are trying to create a table which has about 6 varchar fields with a length of 8192. The maximum allowed is 4000. There is a longvarchar which allows upto 32700. So, using longvarchar could resolve the problem.

    But, the default tablespace allows a row length of only 4005 bytes.We tried creating a new tablespace with a page size of 32 KB but we got an error which said that the page size of the table space and the buffer pool had to be the same and we were using the default buffer pool provided which had a page size of 4KB.

    We created a new buffer pool with a page size of 32 KB and tried to use that for the table space but got an error that said that the buffer pool needed to be activated.This we could not figure out.

    Basically, is there a simpler way to create a table whose row length is greater that 4005 bytes? If not, are we on the right track trying to create a new table space and buffer pool ? How then, do we activate the buffer pool?

    Thanks in advance

    Abhilesh

  3. #3
    Join Date
    Sep 2002
    Posts
    456

    Re: how to create a table whose row length is greater that 4005 bytes

    Basically you have to do the following:

    >> Create a bufferpool with size 8kb or 16kb or 32 kb
    >> Create a tablespace with the same size as above and in the bufferpool clauase specify the bufferpool created in the first step
    >> Assign the above created tablespace in your create table statement

    Paul Pabla

    Originally posted by khatriabhilesh
    Hi all,

    We are trying to create a table which has about 6 varchar fields with a length of 8192. The maximum allowed is 4000. There is a longvarchar which allows upto 32700. So, using longvarchar could resolve the problem.

    But, the default tablespace allows a row length of only 4005 bytes.We tried creating a new tablespace with a page size of 32 KB but we got an error which said that the page size of the table space and the buffer pool had to be the same and we were using the default buffer pool provided which had a page size of 4KB.

    We created a new buffer pool with a page size of 32 KB and tried to use that for the table space but got an error that said that the buffer pool needed to be activated.This we could not figure out.

    Basically, is there a simpler way to create a table whose row length is greater that 4005 bytes? If not, are we on the right track trying to create a new table space and buffer pool ? How then, do we activate the buffer pool?

    Thanks in advance

    Abhilesh

  4. #4
    Join Date
    Jul 2002
    Posts
    86

    Re: how to create a table whose row length is greater that 4005 bytes

    Originally posted by dollar489
    Basically you have to do the following:

    >> Create a bufferpool with size 8kb or 16kb or 32 kb
    >> Create a tablespace with the same size as above and in the bufferpool clauase specify the bufferpool created in the first step
    >> Assign the above created tablespace in your create table statement

    Paul Pabla
    I think you should create temporary tablespace with that pagesize(8k,16k,...) and asign that bufferpool to it as well.
    Thanks

Posting Permissions

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