Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2007
    Posts
    28

    Arrow Unanswered: How do you create a table space? I granted all permissions but still can't create

    Hello everyone.

    So I almost got my DDL script to run in DB2 v8.2 but now i'm getting the following error:

    CREATE TABLE agent ( aIndMACAddress CHARVAR_32767, EventCorrelator CHARVAR_32767,
    .....
    ......


    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0286N A default table space could not be found with a page size of at
    least "16384" that authorization ID "CORY" is authorized to use.
    SQLSTATE=42727


    This is how I created the Database...

    I went into Control Center
    Under All databases I selected Create a new database->Standard.

    I then selected my machine name, and under instance DB2.

    I then just clicked all the defaults and granted all permissions on the database for user name, Cory

    Then I opend up Command Editor and pointed to the new database I connected to and clicked use Implicit Credentials (Only for local databases)

    And I get the following message:
    ------------------------------ Commands Entered ------------------------------
    connect to TEST2DB ;
    ------------------------------------------------------------------------------
    connect to TEST2DB

    Database Connection Information

    Database server = DB2/NT 8.2.0
    SQL authorization ID = CORY
    Local database alias = TEST2DB


    A JDBC connection to the target has succeeded.


    Now I run the query and I get:

    CREATE TABLE agent ( aIndMACAddress CHARVAR_32767, EventCorrelator CHARVAR_32767,
    .....
    ......


    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0286N A default table space could not be found with a page size of at
    least "16384" that authorization ID "CORY" is authorized to use.
    SQLSTATE=42727



    NOTE: I also tried to log in with the user name/password when I installed DB2 and it gave me the same error, just didn't user name.


    Any ideas what I'm doing wrong?


    Thanks!
    IBM: Tivoli zSeries Co-op

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    What the error message says is that there is not a tablespace that can accommodate the row size of the table AGENT. Tablespace page size must be big enough to fit all table columns, except large data columns.

    "db2 list tablespaces show detail" will show you all tablespaces along with their page sizes.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Aug 2007
    Posts
    28
    I created a new table space and made it 8k but I still get the same error, once I create a new table space do I have to do somthing special to make sure the user is assigned the table space? I made it avaiable to public and to the speicfic user, Cory.

    It says it has to be: 16384 bytes isn't 8kb big enough for this?
    IBM: Tivoli zSeries Co-op

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by mr_coffee
    It says it has to be: 16384 bytes isn't 8kb big enough for this?
    This is a joke, right?
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Aug 2007
    Posts
    28
    oops i need at least 16kb, i was thinking 16384 bits, not bytes :P
    16384bytes/1024 bytes = 16kb
    IBM: Tivoli zSeries Co-op

  6. #6
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    There is a conceptual difference between tables and tablespaces. A tablespace is a container for tables and represents the physical files on disk. It cannot be accessed in SQL statements. A table is an object in a tablespace and can be used in SQL statements.

    Note: everything in an RDBMS is a table (views, aliases, base tables, nicknames, temp tables, ...). So what I said above actually applies to "base tables" only.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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