connormcd / audit_utility

Automatic generator for the typical audit triggers we have on Oracle tables with lots of options
51 stars 19 forks source link

Changed data type to clob for longer code generation in generate_audi… #9

Closed faggion closed 2 years ago

faggion commented 2 years ago

Hi Connor,

I had an issue enabling audit support with "generate_audit_support" for some tables with more than 50 columns. I had to change the varchar2 to clob for code generation, here is what I did.

The error was as below.

Erro a partir da linha : 1 no comando -
begin
    SCM_AUDIT_SOO.audit_util.generate_audit_support(
        p_owner => 'SCM_DATA_SOO', 
        p_table_name => 'SOO_CATEGORIA_MMMMAMMM', 
        p_action => 'EXECUTE',
        p_partitioning => 'Y',
        p_inserts_audited => 'Y',
        p_audit_lobs_on_update_always => 'N'
    );
end;
Relatório de erros -
ORA-06502: PL/SQL: erro: buffer de string de caracteres pequeno demais numérico ou de valor
ORA-06512: em "SCM_AUDIT_SOO.AUDIT_UTIL", line 733
ORA-06512: em "SCM_AUDIT_SOO.AUDIT_UTIL", line 1009
ORA-06512: em "SCM_AUDIT_SOO.AUDIT_UTIL", line 1523
ORA-06512: em line 2
06502. 00000 -  "PL/SQL: numeric or value error%s"
*Cause:    An arithmetic, numeric, string, conversion, or constraint error
           occurred. For example, this error occurs if an attempt is made to
           assign the value NULL to a variable declared NOT NULL, or if an
           attempt is made to assign an integer larger than 99 to a variable
           declared NUMBER(2).
*Action:   Change the data, how it is manipulated, or how it is declared so
           that values do not violate constraints.