How to tell if a MQT is maintained by USER or SYSTEM

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fan Ruo Xin

    How to tell if a MQT is maintained by USER or SYSTEM


    Please don't tell me using DB2LOOK.
    I only found the following difference when I checked the SYSCAT.TABLES.
    tabname TYPE STATUS PROPERTY
    -------- ---- ------ --------------------------------
    USRMQT S N Y
    SYSMQT S N
    2 record(s) selected.
    PROPERTY VARCHAR(32) Properties for the table. A single blank indicates
    that the table has no properties.
    But from the explanation for the PROPERTY, I am not sure if I can depend
    on this.

    Thanks,
    FRX


  • Bob [IBM]

    #2
    Re: How to tell if a MQT is maintained by USER or SYSTEM

    I am curious, what does the CONST_CHECKED column in SYSCAT.TABLES tell you? Is it different or does it say anything?

    CONST_CHECKED CHAR(32) Byte 1 represents foreign key constraints.

    Byte 5 represents materialized query table.

    Encodes constraint information on checking. Values:

    Y = Checked by system

    U = Checked by user

    F = In byte 5, the materialized query table cannot be refreshed incrementally.

    --

    Bob
    Consulting I/T Specialist
    IBM Toronto Lab
    IBM Software Services for Data Management
    [My comments are solely my own and are not meant to represent an official IBM position - ask my cat!]

    "Fan Ruo Xin" <fanruox@sbcglo bal.net> wrote in message news:3F972C60.A 39323AB@sbcglob al.net...

    Please don't tell me using DB2LOOK.
    I only found the following difference when I checked the SYSCAT.TABLES.
    tabname TYPE STATUS PROPERTY
    -------- ---- ------ --------------------------------
    USRMQT S N Y
    SYSMQT S N
    2 record(s) selected.
    PROPERTY VARCHAR(32) Properties for the table. A single blank indicates
    that the table has no properties.
    But from the explanation for the PROPERTY, I am not sure if I can depend
    on this.

    Thanks,
    FRX


    Comment

    • Fan Ruo Xin

      #3
      Re: How to tell if a MQT is maintained by USER or SYSTEM

      Thanks, Bob,
      I will check tomorrow.


      "Bob [IBM]" wrote:
      [color=blue]
      > I am curious, what does the CONST_CHECKED column in SYSCAT.TABLES tell
      > you? Is it different or does it say anything? CONST_CHECKED CHAR(32)
      > Byte 1 represents foreign key constraints.
      >
      > Byte 5 represents materialized query table.
      >
      > Encodes constraint information on checking. Values:
      >
      > Y = Checked by system
      >
      > U = Checked by user
      >
      > F = In byte 5, the materialized query table cannot be refreshed
      > incrementally.
      >
      > --
      >
      > Bob
      > Consulting I/T Specialist
      > IBM Toronto Lab
      > IBM Software Services for Data Management
      > [My comments are solely my own and are not meant to represent an
      > official IBM position - ask my cat!]
      >
      > "Fan Ruo Xin" <fanruox@sbcglo bal.net> wrote in message
      > news:3F972C60.A 39323AB@sbcglob al.net...
      >
      >
      > Please don't tell me using DB2LOOK.
      > I only found the following difference when I checked the
      > SYSCAT.TABLES.
      > tabname TYPE STATUS PROPERTY
      > -------- ---- ------ --------------------------------
      > USRMQT S N Y
      > SYSMQT S N
      > 2 record(s) selected.
      > PROPERTY VARCHAR(32) Properties for the table. A single
      > blank indicates
      > that the table has no properties.
      > But from the explanation for the PROPERTY, I am not sure if
      > I can depend
      > on this.
      >
      > Thanks,
      > FRX
      >
      >[/color]

      Comment

      • Fan Ruo Xin

        #4
        Re: How to tell if a MQT is maintained by USER or SYSTEM

        Thanks for your answer.
        I did some tests today. I can't depend on the CONST_CHECKED (Byte 5).
        The value of this byte for a MQT which REFRESH IMMEIDATE can also be set
        as 'U' (U = Checked by user).
        Regards,
        FRX


        "Bob [IBM]" wrote:
        [color=blue]
        > I am curious, what does the CONST_CHECKED column in SYSCAT.TABLES tell
        > you? Is it different or does it say anything? CONST_CHECKED CHAR(32)
        > Byte 1 represents foreign key constraints.
        >
        > Byte 5 represents materialized query table.
        >
        > Encodes constraint information on checking. Values:
        >
        > Y = Checked by system
        >
        > U = Checked by user
        >
        > F = In byte 5, the materialized query table cannot be refreshed
        > incrementally.
        >
        > --
        >
        > Bob
        > Consulting I/T Specialist
        > IBM Toronto Lab
        > IBM Software Services for Data Management
        > [My comments are solely my own and are not meant to represent an
        > official IBM position - ask my cat!]
        >
        > "Fan Ruo Xin" <fanruox@sbcglo bal.net> wrote in message
        > news:3F972C60.A 39323AB@sbcglob al.net...
        >
        >
        > Please don't tell me using DB2LOOK.
        > I only found the following difference when I checked the
        > SYSCAT.TABLES.
        > tabname TYPE STATUS PROPERTY
        > -------- ---- ------ --------------------------------
        > USRMQT S N Y
        > SYSMQT S N
        > 2 record(s) selected.
        > PROPERTY VARCHAR(32) Properties for the table. A single
        > blank indicates
        > that the table has no properties.
        > But from the explanation for the PROPERTY, I am not sure if
        > I can depend
        > on this.
        >
        > Thanks,
        > FRX
        >
        >[/color]

        Comment

        • Bob [IBM]

          #5
          Re: How to tell if a MQT is maintained by USER or SYSTEM

          Oh well - worth a try I guess :)

          --

          Bob
          Consulting I/T Specialist
          IBM Toronto Lab
          IBM Software Services for Data Management
          [My comments are solely my own and are not meant to represent an official IBM position - ask my cat!]
          "Fan Ruo Xin" <fanruox@sbcglo bal.net> wrote in message news:3F9886D4.2 E2F8ED3@sbcglob al.net...
          Thanks for your answer.
          I did some tests today. I can't depend on the CONST_CHECKED (Byte 5).
          The value of this byte for a MQT which REFRESH IMMEIDATE can also be set
          as 'U' (U = Checked by user).
          Regards,
          FRX


          "Bob [IBM]" wrote:
          [color=blue]
          > I am curious, what does the CONST_CHECKED column in SYSCAT.TABLES tell
          > you? Is it different or does it say anything? CONST_CHECKED CHAR(32)
          > Byte 1 represents foreign key constraints.
          >
          > Byte 5 represents materialized query table.
          >
          > Encodes constraint information on checking. Values:
          >
          > Y = Checked by system
          >
          > U = Checked by user
          >
          > F = In byte 5, the materialized query table cannot be refreshed
          > incrementally.
          >
          > --
          >
          > Bob
          > Consulting I/T Specialist
          > IBM Toronto Lab
          > IBM Software Services for Data Management
          > [My comments are solely my own and are not meant to represent an
          > official IBM position - ask my cat!]
          >
          > "Fan Ruo Xin" <fanruox@sbcglo bal.net> wrote in message
          > news:3F972C60.A 39323AB@sbcglob al.net...
          >
          >
          > Please don't tell me using DB2LOOK.
          > I only found the following difference when I checked the
          > SYSCAT.TABLES.
          > tabname TYPE STATUS PROPERTY
          > -------- ---- ------ --------------------------------
          > USRMQT S N Y
          > SYSMQT S N
          > 2 record(s) selected.
          > PROPERTY VARCHAR(32) Properties for the table. A single
          > blank indicates
          > that the table has no properties.
          > But from the explanation for the PROPERTY, I am not sure if
          > I can depend
          > on this.
          >
          > Thanks,
          > FRX
          >
          >[/color]

          Comment

          • temporary_10@hotmail.com

            #6
            Re: How to tell if a MQT is maintained by USER or SYSTEM

            Yes, Byte 1 of the property column will indicate what you want.

            Fan Ruo Xin wrote:
            [color=blue]
            > Please don't tell me using DB2LOOK.
            > I only found the following difference when I checked the SYSCAT.TABLES.
            > tabname TYPE STATUS PROPERTY
            > -------- ---- ------ --------------------------------
            > USRMQT S N Y
            > SYSMQT S N
            > 2 record(s) selected.
            > PROPERTY VARCHAR(32) Properties for the table. A single blank indicates
            > that the table has no properties.
            > But from the explanation for the PROPERTY, I am not sure if I can depend
            > on this.
            >
            > Thanks,
            > FRX[/color]

            Comment

            • Fan Ruo Xin

              #7
              Re: How to tell if a MQT is maintained by USER or SYSTEM

              Thank you.
              Regards,
              FRX

              temporary_10@ho tmail.com wrote:
              [color=blue]
              > Yes, Byte 1 of the property column will indicate what you want.
              >
              > Fan Ruo Xin wrote:
              >[color=green]
              > > Please don't tell me using DB2LOOK.
              > > I only found the following difference when I checked the SYSCAT.TABLES.
              > > tabname TYPE STATUS PROPERTY
              > > -------- ---- ------ --------------------------------
              > > USRMQT S N Y
              > > SYSMQT S N
              > > 2 record(s) selected.
              > > PROPERTY VARCHAR(32) Properties for the table. A single blank indicates
              > > that the table has no properties.
              > > But from the explanation for the PROPERTY, I am not sure if I can depend
              > > on this.
              > >
              > > Thanks,
              > > FRX[/color][/color]

              Comment

              Working...