find default tablespace

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kw.housing

    find default tablespace

    is there a way to tell the current tablespace for tables i create without IN
    clause?

    i know i can do that by create a table and select its tablespaceid from
    syscat

    any better solutions?


  • Pierre StJ

    #2
    Re: find default tablespace

    On Mar 28, 2:14 pm, "kw.housing " <kw.hous...@gma il.comwrote:
    is there a way to tell the current tablespace for tables i create without IN
    clause?
    >
    i know i can do that by create a table and select its tablespaceid from
    syscat
    >
    any better solutions?
    Yes. The default tablespace is:
    A) The first tablespace your id has created.
    B) If A) does not exist then it is the first tablespace where you have
    the USE priviloege.
    C) If neither A) nor B) exist then it is USERSPACE1
    Regards, Pierre.

    Comment

    • Joachim Klassen

      #3
      Re: find default tablespace

      On 29 Mrz., 02:28, Pierre StJ <p.stjacq...@vi deotron.cawrote :
      On Mar 28, 2:14 pm, "kw.housing " <kw.hous...@gma il.comwrote:
      >
      is there a way to tell the current tablespace for tables i create without IN
      clause?
      >
      i know i can do that by create a table and select its tablespaceid from
      syscat
      >
      any better solutions?
      >
      Yes. The default tablespace is:
      A) The first tablespace your id has created.
      B) If A) does not exist then it is the first tablespace where you have
      the USE priviloege.
      C) If neither A) nor B) exist then it is USERSPACE1
      Regards, Pierre.
      IIRC correctly:

      if a tablespace called IBMDEFAULTGROUP exists (with appropriate USE
      privileges) DB2 will choose that one first.

      HTH
      Joachim

      Comment

      Working...