4 Replies Latest reply: Feb 6, 2007 7:55 AM by 442199 RSS

    DBMS_RLMGR.ADD_ELEMENTARY_ATTRIBUTE fails if user name or table name long

    16109
      The following output shows that if the account name and table name are too long, ADD_ELEMENTARY_ATTRIBUTE fails. I've reported this on MetaLink, but I haven't heard anything back yet. Any configurations that I can change to make this work the way it should?

      Thanks,
      -Ken

      SQL> @BUG_REPORT
      SQL> connect system/******@dev as sysdba;
      Connected.
      SQL>
      SQL> REM ---------------------------------
      REM Note the user name is DBMS_RLMGR_DEMO
      SQL> REM ---------------------------------
      >
      SQL> create user dbms_rlmgr_demo identified by dbms_rlmgr_demo;

      User created.

      SQL> grant connect, resource to dbms_rlmgr_demo;

      Grant succeeded.

      SQL> grant create view to dbms_rlmgr_demo;

      Grant succeeded.

      SQL> grant execute on dbms_lock to dbms_rlmgr_demo;

      Grant succeeded.

      SQL>
      SQL> connect dbms_rlmgr_demo/dbms_rlmgr_demo;
      Connected.
      SQL>
      SQL> REM ---------------------------------
      REM Note the table name is only 14 characters long
      SQL> REM ---------------------------------
      >
      SQL> create table PurchaseOrders
      2 (orderId NUMBER,
      3      custId     NUMBER,
      4      itemId     NUMBER,
      5      itemType VARCHAR2(30),
      6      quantity NUMBER,
      7      shipBy     DATE);

      Table created.

      SQL>
      SQL> begin
      2 DBMS_RLMGR.CREATE_EVENT_STRUCT (event_struct => 'OrderMgmt');
      3 end;
      4 /

      PL/SQL procedure successfully completed.

      SQL>
      SQL> begin
      2 DBMS_RLMGR.ADD_ELEMENTARY_ATTRIBUTE(
      3           event_struct => 'OrderMgmt',
      4           attr_name => 'po',
      5           tab_alias => RLM$TABLE_ALIAS('PurchaseOrders'));
      6 end;
      7 /
      begin
      *
      ERROR at line 1:
      ORA-12899: value too large for column "EXFSYS"."EXF$ATTRLIST"."ATTRTPTAB"
      (actual: 34, maximum: 32)
      ORA-06512: at "EXFSYS.DBMS_EXPFIL_DR", line 477
      ORA-06512: at "EXFSYS.DBMS_EXPFIL", line 964
      ORA-06512: at "EXFSYS.DBMS_RLMGR", line 1219
      ORA-06512: at line 2



      SQL>
      SQL> REM ---------------------------------
      REM Note the table name is now 12 characters long
      SQL> REM ---------------------------------
      >
      SQL> create table PurchaseOrde
      2 (orderId NUMBER,
      3      custId     NUMBER,
      4      itemId     NUMBER,
      5      itemType VARCHAR2(30),
      6      quantity NUMBER,
      7      shipBy     DATE);

      Table created.

      SQL>
      SQL> begin
      2 DBMS_RLMGR.DROP_EVENT_STRUCT (event_struct => 'OrderMgmt');
      3 DBMS_RLMGR.CREATE_EVENT_STRUCT (event_struct => 'OrderMgmt');
      4 end;
      5 /

      PL/SQL procedure successfully completed.

      SQL>
      SQL> begin
      2 DBMS_RLMGR.ADD_ELEMENTARY_ATTRIBUTE(
      3           event_struct => 'OrderMgmt',
      4           attr_name => 'po',
      5           tab_alias => RLM$TABLE_ALIAS('PurchaseOrde'));
      6 end;
      7 /

      PL/SQL procedure successfully completed.

      REM -------------------------------------------
      REM So, with a shorter table name, things work OK
      REM Now we'll try with a shorter account name

      REM -------------------------------------------


      SQL>
      SQL> connect system/******@dev as sysdba;
      Connected.
      SQL>
      SQL> REM ---------------------------------
      REM Note the user name is RULDEMO
      SQL> REM ---------------------------------
      >
      SQL> create user ruldemo identified by ruldemo;

      User created.

      SQL> grant connect, resource to ruldemo;

      Grant succeeded.

      SQL> grant create view to ruldemo;

      Grant succeeded.

      SQL> grant execute on dbms_lock to ruldemo;

      Grant succeeded.

      SQL>
      SQL> connect ruldemo/ruldemo;
      Connected.
      SQL> create table PurchaseOrders
      2 (orderId NUMBER,
      3      custId     NUMBER,
      4      itemId     NUMBER,
      5      itemType VARCHAR2(30),
      6      quantity NUMBER,
      7      shipBy     DATE);

      Table created.

      SQL>
      SQL>
      SQL> begin
      2 DBMS_RLMGR.CREATE_EVENT_STRUCT (event_struct => 'OrderMgmt');
      3 end;
      4 /

      PL/SQL procedure successfully completed.

      SQL>
      SQL> begin
      2 DBMS_RLMGR.ADD_ELEMENTARY_ATTRIBUTE(
      3           event_struct => 'OrderMgmt',
      4           attr_name => 'po',
      5           tab_alias => RLM$TABLE_ALIAS('PurchaseOrders'));
      6 end;
      7 /

      PL/SQL procedure successfully completed.

      REM -------------------------------------------
      REM So, with a shorter user name, things work OK
      REM -------------------------------------------


      SQL>
      SQL> connect system/******@dev as sysdba;
      Connected.
      SQL> drop user dbms_rlmgr_demo cascade;

      User dropped.

      SQL> drop user ruldemo cascade;

      User dropped.

      SQL>
      SQL> SPOOL OFF