CREATE_STAT_TABLE - HowTo?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: CREATE_STAT_TABLE - HowTo?

  1. #1
    Join Date
    May 2001
    Location
    Sydney Australia
    Posts
    44

    CREATE_STAT_TABLE - HowTo?

    I'd like to create the stats table from the DBMS_STATS package, but I'm doing something wrong...

    I tried the following:

    CREATE_STAT_TABLE (
    'sys',
    'stats',
    'system');

    I thought this would create the stats table, as user 'sys', with the name 'stats', in the 'system' tablespace, but I get:

    ORA-00900: invalid SQL statement

    I also tried using DBMS_STATS.CREATE_STAT_TABLE ( .... ); but no go.

    As I'm going blind reading through all the documentation (which isn't helping unfortunately), would someone kindly point out what I'm doing wrong?

    MTIA, Max Hugen
    Max Hugen
    Hugen Enterprises Pty Ltd
    www.hugen.com.au

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    Code:
    SQL> exec DBMS_STATS.CREATE_STAT_TABLE('lsc','dbms_stats_table','users')
    
    PL/SQL procedure successfully completed.
    
    SQL> desc dbms_stats_table
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     STATID                                             VARCHAR2(30)
     TYPE                                               CHAR(1)
     VERSION                                            NUMBER
     FLAGS                                              NUMBER
     C1                                                 VARCHAR2(30)
     C2                                                 VARCHAR2(30)
     C3                                                 VARCHAR2(30)
     C4                                                 VARCHAR2(30)
     C5                                                 VARCHAR2(30)
     N1                                                 NUMBER
     N2                                                 NUMBER
     N3                                                 NUMBER
     N4                                                 NUMBER
     N5                                                 NUMBER
     N6                                                 NUMBER
     N7                                                 NUMBER
     N8                                                 NUMBER
     N9                                                 NUMBER
     N10                                                NUMBER
     N11                                                NUMBER
     N12                                                NUMBER
     D1                                                 DATE
     R1                                                 RAW(32)
     R2                                                 RAW(32)
     CH1                                                VARCHAR2(1000)

Posting Permissions

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



Click Here to Expand Forum to Full Width