Results 1 to 6 of 6
  1. #1
    Join Date
    May 2004
    Posts
    8

    Question Unanswered: specify index tablespace?

    Hello all,

    could anyone tell me if there is a way to specify the tablespace
    in which an index is created?

    I tried this already:

    CREATE UNIQUE INDEX IX_USR_ACCOUNT_1 ON USR_ACCOUNT ( NAME, DOMAIN ) IN USERSPACE8
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0104N An unexpected token "IN" was found following ")". Expected tokens
    may include: "". SQLSTATE=42601


    Thanks,
    Noel.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Noel,
    The only way to specify a different tablespace for indexes is when the table is created. Look at the CREATE TABLE ... INDEX IN Command in the SQL Reference.

    Andy

  3. #3
    Join Date
    May 2004
    Posts
    8
    Thanks for the reply Andy.

    It seems to be a strange way of doing things coming from an Oracle perspective.

    From what I can tell the indexes seem to default to the same tablespace
    as the table.

    Regards,
    Noel.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Noel,
    That is correct. The tablespace for the indexes will be the same as the table unless specified in the CREATE TABLE command.

    Andy

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    That is correct. The tablespace for the indexes will be the same as the table unless specified in the CREATE TABLE command.
    ... and you can specify an index tablespace only if the table and index tablespaces are both dms

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  6. #6
    Join Date
    May 2004
    Posts
    8

    Thumbs up

    Thanks Sathyaram.

Posting Permissions

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