CodeSmith Community
Your Code. Your Way. Faster!

Table XXX does not have a primary key, it will not be generated. (oracle 9.2i)

Latest post 03-27-2007 2:54 AM by timafyozzi. 1 replies.
  • 03-22-2007 7:19 AM

    Table XXX does not have a primary key, it will not be generated. (oracle 9.2i)

    While generating code using NetTiers template-set for oracle 9.2i schema, i recieved a message: "Table TRATE does not have a primary key, it will not be generated."

    Then i've read a post about the same situation under MS SQL server and implemented the same schema under Oracle, here is it's sql code:

     

    -- Create table
    create table TRATE
    (
    IDRATE NUMBER not null
    )
    tablespace SYSTEM
    pctfree
    10
    pctused
    40
    initrans
    1
    maxtrans
    255
    storage
    (
    initial
    64K
    minextents
    1
    maxextents unlimited
    );
    -- Create/Recreate primary, unique and foreign key constraints
    alter table TRATE
    add constraint PK_TRATE primary key (IDRATE)
    using index
    tablespace SYSTEM
    pctfree
    10
    initrans
    2
    maxtrans
    255
    storage
    (
    initial
    64K
    minextents
    1
    maxextents unlimited
    );

    -- Create table
    create table TURL_ROW
    (
    IDURL NUMBER not null
    )
    tablespace SYSTEM
    pctfree
    10
    pctused
    40
    initrans
    1
    maxtrans
    255
    storage
    (
    initial
    64K
    minextents
    1
    maxextents unlimited
    );
    -- Create/Recreate primary, unique and foreign key constraints
    alter table TURL_ROW
    add constraint PK_TURL_ROW primary key (IDURL)
    using index
    tablespace SYSTEM
    pctfree
    10
    initrans
    2
    maxtrans
    255
    storage
    (
    initial
    64K
    minextents
    1
    maxextents unlimited
    );

    -- Create table
    create table TURLRATE_RAW
    (
    IDRATE NUMBER not null,
    IDURL NUMBER not null
    )
    tablespace SYSTEM
    pctfree
    10
    pctused
    40
    initrans
    1
    maxtrans
    255
    storage
    (
    initial
    64K
    minextents
    1
    maxextents unlimited
    );
    -- Create/Recreate primary, unique and foreign key constraints
    alter table TURLRATE_RAW
    add constraint PK_TURLRATE_RAW primary key (IDRATE,IDURL)
    using index
    tablespace SYSTEM
    pctfree
    10
    initrans
    2
    maxtrans
    255
    storage
    (
    initial
    64K
    minextents
    1
    maxextents unlimited
    );
    alter table TURLRATE_RAW
    add constraint FK_TURLRATE_RAW_TRATE foreign key (IDRATE)
    references TRATE (IDRATE);
    alter table TURLRATE_RAW
    add constraint FK_TURLRATE_RAW_TURL_RAW foreign key (IDURL)
    references TURL_ROW (IDURL);

    But the problem remained.

    It seems to me, that problem is in "OracleNativeSchemaProvider"

    Filed under: , ,
    • Post Points: 5
  • 03-27-2007 2:54 AM In reply to

    Re: Table XXX does not have a primary key, it will not be generated. (oracle 9.2i)

    Reply |Contact |Answer

    The problem solved after Creating Extended Properties Table

    That's good i thought.

    But another exception was thrown.

    • Post Points: 5
Page 1 of 1 (2 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems