Version 3.1 fault - ORA-06502 error when creating SQL Report Region/Page

I usually perfect my query in SQL*PLUS before I create a new report region.
Consequently, I copy the code into the region wizard to create the new page. However, since we have upgraded to Version 3.1, virtually every report I have tried to create has created the following error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
It would appear that a maximum of 960 characters can be used to create the region/page. Perversely, once the page/region has been created, I can then edit the source and include as much code as I want (so far I've not run up against a limit)
As it's just annoying, but not stopping me doing what I wanted to do, I've not got around to mentioning this error previously, but it occurred to me that I should (so I am!)
David

Hi David,
Thank you for reporting this. Unfortunately, this was a regression introduced in Application Express 3.1. The workaround is to edit the region, as you suggested. This has been filed as Bug 6956070 and will be corrected in the forthcoming Application Express 3.1.1 patch set.
Joel

Similar Messages

  • ORA-06502 Error When Calling Function

    Hi,
    We have upgraded Oracle Database Server 9i to 11.1.0.7 and we are now using ODP.NET version 2.112.2.0 instead of 9.2.0.4 dll.
    After the migration, we encountered ORA-06502 problem when we are calling a function from .NET application. We investigated and found that we have to set the parameter size for the return value parameter (varchar2). But there is a strange case that how do we guess the return value size, it can be 5 characters or 5.000 characters. Before 11g Oracle.DataAccess, we do not have that such problem. We were setting the parameter size 225 by default, but ODP.NET was returning 500 characters without any error.
    The question is that how do we guess or know the actual parameter size when we are passing a Return Value parameter to the function?
    Or is there a solution for this behaviour of ODP.NET?
    Thanks.

    Is there a reason you can not set it to the default maximum size for a varchar2 of 32k?
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Oracle.DataAccess.Client;
    using System.Data;
    namespace test_function2
    class Program
    static void Main(string[] args)
    OracleConnection con = new OracleConnection("Data Source=UTF8;User ID=scott;Password=tiger");
    OracleCommand cmd = new OracleCommand("test_return", con);
    cmd.CommandType = CommandType.StoredProcedure;
    OracleParameter test_return = new OracleParameter("test_return", OracleDbType.Varchar2, 32000);
    test_return.Direction = ParameterDirection.ReturnValue;
    cmd.Parameters.Add(test_return);
    OracleParameter test_input = new OracleParameter("test_input", OracleDbType.Varchar2);
    test_input.Direction = ParameterDirection.Input;
    test_input.Value = "blah";
    cmd.Parameters.Add(test_input);
    try
    con.Open();
    cmd.ExecuteNonQuery();
    con.Close();
    Console.WriteLine("{0}", test_return.Value);
    Console.WriteLine("Press Enter to Continue");
    Console.ReadLine();
    catch (OracleException e)
    Console.WriteLine(e.Number);
    Console.WriteLine(e.Message);
    Console.WriteLine("test failed\nPress Enter to Continue");
    Console.ReadLine();
    create or replace function test_return(in_var in varchar2)
    return varchar2 is
    begin
    return lpad(in_var, 4000, 'TEST test') || lpad(in_var, 4000, 'DONE done');
    end test_return;
    /

  • ORA-06502 error when clicked on Lines tab in Oracle Service Contracts

    When i query for some contracts and click on Lines Tab,i get ORA-06502 error.
    This is not happenning with all contracts.My ICX: Numeric Characters profile is set to 10.000,00 but the user who created the contracts which were showing error message has ICX: Numeric Characters profile set to 10,000.00.
    If i change my profile option to this users profile option,then i am not getting error in these contracts but getting error when trying to view the contracts which were created by other users who's ICX: Numeric Characters profile is different from mine.
    Plz let me know how can i resolve this issue.
    Looking for your suggessions.
    Thanks,
    Ravi

    CRS Home is indicative of having Oracle clusterware installed. Is this a RAC cluster? Are you running on ASM? How many nodes? etc.
    Please fill in the blanks.

  • ORA-20001 error when creating Tabular Form or Form and Report

    Whenever I try and add a Tabular Form or Form and Report to my application i am getting the following error at the end of the Wizard.
    ORA-20001: Unable to create updateable report. ORA-20001: Error creating shortcut id="" ORA-00001: unique constraint (APEX_030200.WWV_FLOW_SHORTCUT_IDX1) violatedIt's not a problem I have seen when building other apps and clearly I have managed to corrupt this application somehow.
    I have loaded the problem onto apex.oracle.com for those that have access. The application number is 20325.
    Any help would be very much appreciated.
    Cheers Shunt

    Thanks! Never thought of that.
    --Andy                                                                                                                                                                                                                       

  • Error when creating interactive report

    Hi everyone,
    I get the following error when creating any kind or interactive report, one might say is was a huge amount of data, however it hapens whether is is a small or big reporrt.
    ORA-20001: Unable to create modules. ORA-20001: create_table error: ORA-20001: Excel load run ddl error: ORA-01658: unable to create INITIAL extent for segment in tablespace APEX_1241314296468143
    I hope that I find help
    best,

    Hi,
    This might help
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21678/aadm_request.htm#sthref51
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • ORA-06502: error when inserting into table via db link with long datatype

    Folks,
    I am getting the following error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
    This occurs when an insert is done via a database link into a table that has a LONG data type for one of the columns, and the string contains some carriage returns and or line feeds.
    I have checked by removing the db link, and inserting into a local table with identical column data types, where there is no error.
    So this might be another db link bug?
    So I need to remove the carriage returns and/or line feeds
    in my pl/sql block in the page process. I have tried
    l_text := REPLACE(l_text, CHR(10), ' ');
    l_text := REPLACE(l_text, CHR(13), NULL);
    but still getting the ORA-06502. Would really appreciate some advice here, please.
    Cheers
    KIM

    Scott,
    Time to 'fess up':
    My fault sorry, the error was coming from another page process where I had allowed insufficient string length for one of the variables, and my error message did not identify the page process clearly.
    This leads me to make a request for future releases, could the system error messages state which page process caused the problem?
    One other thing I notice, and this might be a feature not a fault, the page processes are numbered: "Page Process:      3 of 5". However process 3 is not the 3rd one to be processed, and probably refers to the order in which they are created. Should the number reflect the process order?
    Cheers
    KIM

  • ORA-06502 - Error when running "Ask The Expert 0.9"

    Hi ,
    I successfully installed "Ask the Expert" package with Apex 3.0 on Oracle 10g Database 10.2.0.1.0. No error ocurred during the import in my Apex environment.
    Besides that, i'm having problems when i tried to run the "Aks the Expert". It always shows the following message errors:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Error Unable to write activity log.
    I think it was a problem with APEX instalation, but i could run the Sample Application of Apex without any problem.
    I opened an SR in Metalink, but to my surprise, the analist of support don't know what's wrong with the demo "Ask de Expert".
    The debug function of the application show the following commands before the error ocurrs:
    0.01:
    0.01: S H O W: application="103" page="1" workspace="" request="" session="6648566035252817"
    0.01: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us
    0.01: alter session set nls_language="AMERICAN"
    0.01: alter session set nls_territory="AMERICA"
    0.01: NLS: CSV charset=WE8MSWIN1252
    0.01: ...NLS: Set Decimal separator="."
    0.01: ...NLS: Set NLS Group separator=","
    0.02: ...NLS: Set date format="DD-MON-RR"
    0.02: ...Setting session time_zone to -03:00
    0.02: NLS: Language=en-us
    0.02: Application 103, Authentication: CUSTOM2, Page Template: 667896385843019243
    0.02: ...Determine if user "N3COUTINHO" workspace "951808960237899" can develop application "103" in workspace "951808960237899"
    0.02: ...ok to reuse builder session for user:nobody
    0.03: ...Application session: 6648566035252817, user=nobody
    0.03: ...Determine if user "N3COUTINHO" workspace "951808960237899" can develop application "103" in workspace "951808960237899"
    0.03: Session: Fetch session header information
    0.03: ...Metadata: Fetch page attributes for application 103, page 1
    0.03: Fetch session state from database
    0.03: Branch point: BEFORE_HEADER
    0.03: Fetch application meta data
    0.04: Computation point: BEFORE_HEADER
    0.04: ...Perform computation of item: P1_CLEAN_CRITERIA, type=FUNCTION_BODY
    0.04: ...Performing function body computation
    0.06: ...Session State: Save "P1_CLEAN_CRITERIA" - saving same value: ""
    0.06: Processing point: BEFORE_HEADER
    0.06: ...Process "Read and Write Activity Cookie": PLSQL (BEFORE_HEADER) declare l_cookie_id number; begin owa_util.mime_header('text/html', FALSE); -- ate_api.read_activity_cookie; l_cookie_id := ate_api.fetch_activity_cookie_val( 'COOKIE_ID' ); -- if l_cookie_id is null then l_cookie_id :=
    Content-type: text/html; charset=ISO-8859-1 Set-Cookie: activity_ask_expert=1|2400346189796; expires=Wed, 01-Jan-2020 08:00:00 GMT; path=/;
    0.06: Encountered unhandled exception in process type PLSQL
    0.06: Show ERROR page...
    0.06: Performing rollback...
    Please, could any one help me to solve this problem ? Metalink couldn't help me diagnosing what's wrong.
    Thanks,
    Sergio Coutinho

    Hi,
    I don´t know if it help the analisis, but i collect some informations about my environment:
    1) HTML DB version
    3.0.1
    2) Database version
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    3) Database server operating system (as well, if 32-bit or 64-bit)
    Solaris 5.9 - 64 bits
    4) Database Parameters:
    PARAMETER VALUE
    NLS_CALENDAR GREGORIAN
    NLS_CHARACTERSET WE8ISO8859P1
    NLS_COMP BINARY
    NLS_CURRENCY $
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_DUAL_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_LANGUAGE AMERICAN
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NUMERIC_CHARACTERS .,
    NLS_RDBMS_VERSION 10.2.0.1.0
    NLS_SORT BINARY
    NLS_TERRITORY AMERICA
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    Could it explain why ASK THE EXPERT is running on hosted apex site and it´s
    generating error when running in my environment?
    Thanks for the help !
    Sergio

  • Very weird ORA-06502 error while creating procedure

    Hi All,
    i try to create the following procedure (on a 10.2 database):
    create or replace procedure audit_report
    as
    cursor c_audit_user (b_start_date date, b_end_date date)
    is
    select user_id
    , os_user
    , session_id
    , host
    , last_program
    , last_action
    , last_module
    , to_char(logon_day,'dd-mm-yyyy') logon_day
    , logon_time
    , to_char(logoff_day,'dd-mm-yyyy') logoff_day
    , logoff_time
    , elapsed_minutes
    from audit_user
    where logon_day >= b_start_date
    and logon_day < b_end_date
    order by logon_day desc
    cursor c_audit_ddl (b_start_date in date, b_end_date in date)
    is
    select user_name
    , to_char(ddl_date,'dd-mm-yyyy hh24:mi:ss') ddl_date
    , ddl_type
    , object_type
    , owner
    , object_name
    , sql_text
    from audit_ddl
    where ddl_date >= b_start_date
    and ddl_date < b_end_date
    order by ddl_date desc
    cursor c_audit_trail (b_start_date in date, b_end_date in date)
    is
    select os_username
    , username
    , to_char(timestamp,'dd-mm-yyyy hh24:mi:ss') timestamp
    , owner
    , obj_name
    , to_char(action) action
    , action_name
    , decode(ses_actions,'---S------------','DELETE',
    '------S---------','INSERT',
    '---------S------','SELECT',
    '----------S-----','UPDATE',
    '---S--S--S------','DELETE/INSERT/SELECT',
    '---S--S--SS-----','DELETE/INSERT/SELECT/UPDATE',
    '------S--S------','INSERT/SELECT',
    '------S--SS-----','INSERT/SELECT/UPDATE',
    '---------SS-----','SELECT/UPDATE',
    'DDL ACTION') ses_actions
    , priv_used
    from dba_audit_Trail
    where username <> 'DBSNMP'
    and timestamp >= b_start_date
    and timestamp < b_end_date
    order by timestamp desc
    v_header_user varchar2(255);
    v_sep_user varchar2(255);
    v_header_ddl varchar2(255);
    v_sep_ddl varchar2(255);
    v_header_dml varchar2(255);
    v_sep_dml varchar2(255);
    v_record_user varchar2(255);
    v_record_ddl varchar2(255);
    v_record_dml varchar2(255);
    v_report utl_file.file_type;
    v_file_dir varchar2(255);
    v_file_name varchar2(255);
    v_start_date date;
    v_end_date date;
    v_db_name varchar2(255);
    begin
    -- Find start and end date of previous week (Sunday to Monday)
    if to_char(sysdate,'DAY') = 'MONDAY' then
    v_start_date := trunc(sysdate-8);
    v_end_date := trunc(sysdate-1);
    elsif
    to_char(sysdate,'DAY') = 'TUESDAY' then
    v_start_date := trunc(sysdate-9);
    v_end_date := trunc(sysdate-2);
    elsif
    to_char(sysdate,'DAY') = 'WEDNESDAY' then
    v_start_date := trunc(sysdate-10);
    v_end_date := trunc(sysdate-3);
    elsif
    to_char(sysdate,'DAY') = 'THURSDAY' then
    v_start_date := trunc(sysdate-11);
    v_end_date := trunc(sysdate-4);
    elsif
    to_char(sysdate,'DAY') = 'FRIDAY' then
    v_start_date := trunc(sysdate-12);
    v_end_date := trunc(sysdate-5);
    elsif
    to_char(sysdate,'DAY') = 'SATURDAY' then
    v_start_date := trunc(sysdate-13);
    v_end_date := trunc(sysdate-6);
    elsif
    to_char(sysdate,'DAY') = 'SUNDAY' then
    v_start_date := trunc(sysdate-14);
    v_end_date := trunc(sysdate-7);
    end if;
    --Fill headers
    v_header_user := 'USER_ID OS_USER SESSION_ID HOST LAST_PROGR'||
    ' LAST_ACTION LAST_MODULE LOGON_DAY'||
    ' LOGON_TI LOGOFF_DAY LOGOFF_T ELAPSED_MINUTES';
    v_sep_user := '---------- --------- ---------- -------- ----------'||
    '-------------------- ----------- ----------- ---------'||
    v_header_ddl := 'USER_NAME DDL_DATE DDL_TYPE OBJECT_TYPE'||
    ' OWNER OBJECT_NAME SQL_TEXT';
    v_sep_ddl := '---------- --------------------- ---------- -----------'||
    '--------- ---------- -------------------- -------------'||
    v_header_dml := 'OS_USERNAME USERNAME TIMESTAMP OWNER'||
    ' OBJ_NAME ACTION ACTION_NAME SES_ACTIONS'||
    ' PRIV_USED';
    v_sep_dml := '----------- ---------- --------------------- ---------- '||
    '--------------- ------ --------------- ------------------'||
    --Create audit report file
    v_file_dir := 'AUDIT_REPORT_DIR';
    select name
    into v_db_name
    from v$database;
    v_file_name := 'audit_report_'||v_db_name||'_'||to_char(v_start_date,'yyyymmdd')||'-'||to_char(v_end_date-1,'yyyymmdd')||'.log';
    v_report := utl_file.fopen(v_file_dir, v_file_name, 'w');
    --Report Header
    utl_file.put_line(v_report,'AUDIT REPORT');
    utl_file.put_line(v_report,'------------');
    utl_file.put_line(v_report,'Database: '||v_db_name);
    utl_file.put_line(v_report,'From : '||to_char(trunc(v_start_date),'dd-mm-yyyy'));
    utl_file.put_line(v_report,'To : '||to_char(trunc(v_end_date),'dd-mm-yyyy'));
    utl_file.put_line(v_report,'Created : '||to_char(sysdate,'dd-mm-yyyy hh24:mi:ss'));
    utl_file.new_line(v_report);
    --Report Detail records
    utl_file.put_line(v_report,v_header_user);
    utl_file.put_line(v_report,v_sep_user);
    for r_audit_user in c_audit_user(v_start_date,v_end_date) loop
    v_record_user := rpad(r_audit_user.user_id,11,' ')||
    rpad(r_audit_user.os_user,11,' ')||
    rpad(r_audit_user.session_id,11,' ')||
    rpad(r_audit_user.host,9,' ')||
    rpad(r_audit_user.last_program,31,' ')||
    rpad(r_audit_user.last_action,12,' ')||
    rpad(r_audit_user.last_module,12,' ')||
    rpad(r_audit_user.logon_day,11,' ')||
    rpad(r_audit_user.logon_time,9,' ')||
    rpad(r_audit_user.logoff_day,11,' ')||
    rpad(r_audit_user.logoff_time,9,' ')||
    lpad(r_audit_user.elapsed_minutes,15,' ');
    utl_file.put_line(v_report,v_record_user);
    end loop;
    utl_file.new_line(v_report);
    utl_file.put_line(v_report,v_header_ddl);
    utl_file.put_line(v_report,v_sep_ddl);
    for r_audit_ddl in c_audit_ddl(v_start_date,v_end_date) loop
    v_record_ddl := rpad(r_audit_ddl.user_name,11,' ')||
    rpad(r_audit_ddl.ddl_date,22,' ')||
    rpad(r_audit_ddl.ddl_type,11,' ')||
    rpad(r_audit_ddl.object_type,21,' ')||
    rpad(r_audit_ddl.owner,11,' ')||
    rpad(r_audit_ddl.object_name,21,' ')||
    rpad(r_audit_ddl.sql_text,100,' ');
    utl_file.put_line(v_report,v_record_ddl);
    end loop;
    utl_file.new_line(v_report);
    utl_file.put_line(v_report,v_header_dml);
    utl_file.put_line(v_report,v_sep_dml);
    for r_audit_trail in c_audit_trail(v_start_date,v_end_date) loop
    v_record_dml := rpad(r_audit_trail.os_username,12,' ')||
    rpad(r_audit_trail.username,11,' ')||
    rpad(r_audit_trail.timestamp,22,' ')||
    rpad(r_audit_trail.owner,11,' ')||
    rpad(r_audit_trail.obj_name,16,' ')||
    rpad(r_audit_trail.action,7,' ')||
    rpad(r_audit_trail.action_name,16,' ')||
    rpad(r_audit_trail.ses_actions,19,' ')||
    rpad(r_audit_trail.priv_used,20,' ');
    utl_file.put_line(v_report,v_record_dml);
    end loop;
    utl_file.new_line(v_report);
    utl_file.put_line(v_report, '*** End of report ***');
    utl_file.fclose(v_report);
    end;
    This gives me the following error:
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 8
    When i try to create the procedure as this, i get the same error:
    create or replace procedure audit_report
    as
    /*cursor c_audit_user (b_start_date date, b_end_date date)
    is
    select user_id
    , os_user
    , session_id
    , host
    , last_program
    , last_action
    , last_module
    , to_char(logon_day,'dd-mm-yyyy') logon_day
    , logon_time
    , to_char(logoff_day,'dd-mm-yyyy') logoff_day
    , logoff_time
    , elapsed_minutes
    from audit_user
    where logon_day >= b_start_date
    and logon_day < b_end_date
    order by logon_day desc
    cursor c_audit_ddl (b_start_date in date, b_end_date in date)
    is
    select user_name
    , to_char(ddl_date,'dd-mm-yyyy hh24:mi:ss') ddl_date
    , ddl_type
    , object_type
    , owner
    , object_name
    , sql_text
    from audit_ddl
    where ddl_date >= b_start_date
    and ddl_date < b_end_date
    order by ddl_date desc
    cursor c_audit_trail (b_start_date in date, b_end_date in date)
    is
    select os_username
    , username
    , to_char(timestamp,'dd-mm-yyyy hh24:mi:ss') timestamp
    , owner
    , obj_name
    , to_char(action) action
    , action_name
    , decode(ses_actions,'---S------------','DELETE',
    '------S---------','INSERT',
    '---------S------','SELECT',
    '----------S-----','UPDATE',
    '---S--S--S------','DELETE/INSERT/SELECT',
    '---S--S--SS-----','DELETE/INSERT/SELECT/UPDATE',
    '------S--S------','INSERT/SELECT',
    '------S--SS-----','INSERT/SELECT/UPDATE',
    '---------SS-----','SELECT/UPDATE',
    'DDL ACTION') ses_actions
    , priv_used
    from dba_audit_Trail
    where username <> 'DBSNMP'
    and timestamp >= b_start_date
    and timestamp < b_end_date
    order by timestamp desc
    v_header_user varchar2(255);
    v_sep_user varchar2(255);
    v_header_ddl varchar2(255);
    v_sep_ddl varchar2(255);
    v_header_dml varchar2(255);
    v_sep_dml varchar2(255);
    v_record_user varchar2(255);
    v_record_ddl varchar2(255);
    v_record_dml varchar2(255);
    v_report utl_file.file_type;
    v_file_dir varchar2(255);
    v_file_name varchar2(255);
    v_start_date date;
    v_end_date date;*/
    v_db_name varchar2(255);
    begin
    /*-- Find start and end date of previous week (Sunday to Monday)
    if to_char(sysdate,'DAY') = 'MONDAY' then
    v_start_date := trunc(sysdate-8);
    v_end_date := trunc(sysdate-1);
    elsif
    to_char(sysdate,'DAY') = 'TUESDAY' then
    v_start_date := trunc(sysdate-9);
    v_end_date := trunc(sysdate-2);
    elsif
    to_char(sysdate,'DAY') = 'WEDNESDAY' then
    v_start_date := trunc(sysdate-10);
    v_end_date := trunc(sysdate-3);
    elsif
    to_char(sysdate,'DAY') = 'THURSDAY' then
    v_start_date := trunc(sysdate-11);
    v_end_date := trunc(sysdate-4);
    elsif
    to_char(sysdate,'DAY') = 'FRIDAY' then
    v_start_date := trunc(sysdate-12);
    v_end_date := trunc(sysdate-5);
    elsif
    to_char(sysdate,'DAY') = 'SATURDAY' then
    v_start_date := trunc(sysdate-13);
    v_end_date := trunc(sysdate-6);
    elsif
    to_char(sysdate,'DAY') = 'SUNDAY' then
    v_start_date := trunc(sysdate-14);
    v_end_date := trunc(sysdate-7);
    end if;
    --Fill headers
    v_header_user := 'USER_ID OS_USER SESSION_ID HOST LAST_PROGR'||
    ' LAST_ACTION LAST_MODULE LOGON_DAY'||
    ' LOGON_TI LOGOFF_DAY LOGOFF_T ELAPSED_MINUTES';
    v_sep_user := '---------- --------- ---------- -------- ----------'||
    '-------------------- ----------- ----------- ---------'||
    v_header_ddl := 'USER_NAME DDL_DATE DDL_TYPE OBJECT_TYPE'||
    ' OWNER OBJECT_NAME SQL_TEXT';
    v_sep_ddl := '---------- --------------------- ---------- -----------'||
    '--------- ---------- -------------------- -------------'||
    v_header_dml := 'OS_USERNAME USERNAME TIMESTAMP OWNER'||
    ' OBJ_NAME ACTION ACTION_NAME SES_ACTIONS'||
    ' PRIV_USED';
    v_sep_dml := '----------- ---------- --------------------- ---------- '||
    '--------------- ------ --------------- ------------------'||
    --Create audit report file
    v_file_dir := 'AUDIT_REPORT_DIR';
    select name
    into v_db_name
    from v$database;
    v_file_name := 'audit_report_'||v_db_name||'_'||to_char(v_start_date,'yyyymmdd')||'-'||to_char(v_end_date-1,'yyyymmdd')||'.log';
    v_report := utl_file.fopen(v_file_dir, v_file_name, 'w');
    --Report Header
    utl_file.put_line(v_report,'AUDIT REPORT');
    utl_file.put_line(v_report,'------------');
    utl_file.put_line(v_report,'Database: '||v_db_name);
    utl_file.put_line(v_report,'From : '||to_char(trunc(v_start_date),'dd-mm-yyyy'));
    utl_file.put_line(v_report,'To : '||to_char(trunc(v_end_date),'dd-mm-yyyy'));
    utl_file.put_line(v_report,'Created : '||to_char(sysdate,'dd-mm-yyyy hh24:mi:ss'));
    utl_file.new_line(v_report);
    --Report Detail records
    utl_file.put_line(v_report,v_header_user);
    utl_file.put_line(v_report,v_sep_user);
    for r_audit_user in c_audit_user(v_start_date,v_end_date) loop
    v_record_user := rpad(r_audit_user.user_id,11,' ')||
    rpad(r_audit_user.os_user,11,' ')||
    rpad(r_audit_user.session_id,11,' ')||
    rpad(r_audit_user.host,9,' ')||
    rpad(r_audit_user.last_program,31,' ')||
    rpad(r_audit_user.last_action,12,' ')||
    rpad(r_audit_user.last_module,12,' ')||
    rpad(r_audit_user.logon_day,11,' ')||
    rpad(r_audit_user.logon_time,9,' ')||
    rpad(r_audit_user.logoff_day,11,' ')||
    rpad(r_audit_user.logoff_time,9,' ')||
    lpad(r_audit_user.elapsed_minutes,15,' ');
    utl_file.put_line(v_report,v_record_user);
    end loop;
    utl_file.new_line(v_report);
    utl_file.put_line(v_report,v_header_ddl);
    utl_file.put_line(v_report,v_sep_ddl);
    for r_audit_ddl in c_audit_ddl(v_start_date,v_end_date) loop
    v_record_ddl := rpad(r_audit_ddl.user_name,11,' ')||
    rpad(r_audit_ddl.ddl_date,22,' ')||
    rpad(r_audit_ddl.ddl_type,11,' ')||
    rpad(r_audit_ddl.object_type,21,' ')||
    rpad(r_audit_ddl.owner,11,' ')||
    rpad(r_audit_ddl.object_name,21,' ')||
    rpad(r_audit_ddl.sql_text,100,' ');
    utl_file.put_line(v_report,v_record_ddl);
    end loop;
    utl_file.new_line(v_report);
    utl_file.put_line(v_report,v_header_dml);
    utl_file.put_line(v_report,v_sep_dml);
    for r_audit_trail in c_audit_trail(v_start_date,v_end_date) loop
    v_record_dml := rpad(r_audit_trail.os_username,12,' ')||
    rpad(r_audit_trail.username,11,' ')||
    rpad(r_audit_trail.timestamp,22,' ')||
    rpad(r_audit_trail.owner,11,' ')||
    rpad(r_audit_trail.obj_name,16,' ')||
    rpad(r_audit_trail.action,7,' ')||
    rpad(r_audit_trail.action_name,16,' ')||
    rpad(r_audit_trail.ses_actions,19,' ')||
    rpad(r_audit_trail.priv_used,20,' ');
    utl_file.put_line(v_report,v_record_dml);
    end loop;
    utl_file.new_line(v_report);
    utl_file.put_line(v_report, '*** End of report ***');
    utl_file.fclose(v_report);*/
    null;
    end;
    So all code is commented out, but still the error.
    Any ideas?
    Kind regards,
    Dave

    just out of interest, what output do you get if you desc user_source?
    I get:
    NAME                                               VARCHAR2(30)               
    TYPE                                               VARCHAR2(12)               
    LINE                                               NUMBER                     
    TEXT                                               VARCHAR2(4000)        

  • ORA-20001 Error when creating a new application

    Hi,
    I am trying to create a new application of an existing table in the database and I get the following error. The application is created using the wizard (app type Database, from scratch, Report and Form page)
    ORA-20001: Unable to create modules. ORA-20001: Create pages error. ORA-20001: Unable to create form page. ORA-20001: Error page=2 item="P2_NON_ORACLE_EMPLOYEE_SPEAKER" id="1975288532127294112" ORA-20001: Error page=2 item="P2_NON_ORACLE_EMPLOYEE_SPEAKER" id="1975288532127294112" has same name as existing application-level item. ORA-0000: normal, successful completion
    The table I am creating the app on is defined like this:
    CREATE TABLE  "TABLE_1"
       (    "ID" NUMBER,
            "SESSION_EXTERNAL_PAPER" VARCHAR2(30),
            "OWNER_CFP_SUBMITTER1_FULL_NA" VARCHAR2(255),
            "OWNER_CFP_SUBMITTER1_COMPANY" VARCHAR2(255),
            "STATUS" VARCHAR2(30),
            "SESSION_ID" NUMBER,
            "TITLE" VARCHAR2(255),
            "ABSTRACT" VARCHAR2(4000),
            "SESSION_TYPE" VARCHAR2(30),
            "SESSION_CATEGORY" VARCHAR2(30),
            "STREAM" VARCHAR2(30),
            "PRIMARY_TRACK" VARCHAR2(255),
            "OPTIONAL_TRACK" VARCHAR2(255),
            "CROSS_STREAM_TRACK" VARCHAR2(30),
            "SUPPORTING_VIDEO" VARCHAR2(4000),
            "ATTENDEE_ROLE" VARCHAR2(255),
            "TO_RATING" VARCHAR2(30),
            "TO_COMMENTS" VARCHAR2(4000),
            "COMMENTS" VARCHAR2(4000),
            "ORACLE_PARTNERNETWORK" VARCHAR2(30),
            "IS_YOUR_OPN_MEMBERSHIP_UNDER_A" VARCHAR2(255),
            "ORACLE_PARTNER_TYPE" VARCHAR2(255),
            "OPN_MEMBERSHIP_LEVEL" VARCHAR2(30),
            "ORACLE_REGION_BASED" VARCHAR2(30),
            "ORACLE_VALIDATED_INTEGRATION" VARCHAR2(30),
            "HAS_YOUR_COMPANY_ACHIEVED_SPEC" VARCHAR2(4000),
            "PLEASE_DESCRIBE_THE_VALUE_OF_O" VARCHAR2(4000),
            "INCLUDE_CASE_STUDY" VARCHAR2(30),
            "PROVIDE_NAME_OF_THE_CUSTOMER_F" VARCHAR2(255),
            "PLEASE_PROVIDE_A_BRIEF_DESCRIP" VARCHAR2(4000),
            "NON_ORACLE_EMPLOYEE_SPEAKER1_F" VARCHAR2(255),
            "NON_ORACLE_EMPLOYEE_SPEAKER1_C" VARCHAR2(255),
            "ORACLE_EMPLOYEE_SPEAKER1_FULL" VARCHAR2(255),
            "ORACLE_EMPLOYEE_SPEAKER1_COMPA" VARCHAR2(255),
            "NON_ORACLE_EMPLOYEE_SPEAKER2_F" VARCHAR2(255),
            "NON_ORACLE_EMPLOYEE_SPEAKER2_C" VARCHAR2(255),
            "ORACLE_EMPLOYEE_SPEAKER2_FULL" VARCHAR2(255),
            "ORACLE_EMPLOYEE_SPEAKER2_COMPA" VARCHAR2(255),
            "NON_ORACLE_EMPLOYEE_SPEAKER3_F" VARCHAR2(255),
            "NON_ORACLE_EMPLOYEE_SPEAKER3_C" VARCHAR2(255),
            "ORACLE_EMPLOYEE_SPEAKER3_FULL" VARCHAR2(255),
            "ORACLE_EMPLOYEE_SPEAKER3_COMPA" VARCHAR2(255),
            "NON_ORACLE_EMPLOYEE_SPEAKER4_F" VARCHAR2(255),
            "NON_ORACLE_EMPLOYEE_SPEAKER4_C" VARCHAR2(255),
            "ORACLE_EMPLOYEE_SPEAKER4_FULL" VARCHAR2(255),
            "ORACLE_EMPLOYEE_SPEAKER4_COMPA" VARCHAR2(255),
            "CREATED" DATE,
            "CREATED_BY" VARCHAR2(50),
            "LAST_UPDATE" DATE,
            "LAST_UPDATED_BY" VARCHAR2(50),
             CONSTRAINT "OOW_PAPER_PK" PRIMARY KEY ("ID") ENABLE
       ) ;I am using APEX version 4.0.2.00.07
    Any idea what could be wrong and what can be done to resolve the problem?
    Cheers,
    Andy

    Thanks! Never thought of that.
    --Andy                                                                                                                                                                                                                       

  • ORA-01785 error when dynamically resetting report source

    When programmatically changing the region source on a 'function body returning SQL query' report, i get the following error:
    ORA-01785: ORDER BY item must be the number of a SELECT-list expression
    if the new SQL statement has fewer columns than the one it is replacing, and the user had previously selected a sort column for a column# higher than the highest column number in the new query
    for instance if the query was SELECT * FROM EMP and the user had clicked the COMM header to sort on COMM (column number 7), then changing the region source to SELECT * FROM DEPT results in the ORA-01785 -- evidently because Apex is submitting SELECT * FROM DEPT ORDER BY 7
    is there a way to programmatically reset Apex's ORDER BY column# setting? clear cache and reset pagination don't seem to do it

    that put me on the right track
    i really didn't want to reset all user preferences, as i am making extensive use of them in this application
    however, i did find HTMLDB_UTIL.REMOVE_SORT_PREFERENCES -- which, unfortunately, removes all sort preferences, not for a specific page or region.
    i was able to find the correct preference in WWV_FLOW_PREFERENCES$, so I can user HTML_DB_UTIL.SET_PREFERENCE to reset it, but the preference_name includes the region#, which changes on import -- so i'll need to extract if at runtime using javascript, or figure out some other runtime technique for finding the correct preference_name
    hey, apex developers, how about enhancing HTMLDB_UTIL.REMOVE_SORT_PREFERENCES to allow setting/removing the sort preference for a specific page (by page number or alias) and region (by position on the page or some other reliable identifier?

  • HTMLDB Newbie: ORA-01658 error when creating new app or table from sprdsht

    Hey there. I'm new to HTML DB and trying to create a new app (or even a new table) from a simple spreadsheet. I've tried both comma and tab delimited, but get the same error message every time. This is in my workspace on htmldb.oracle.com.
    "ORA-20001: create_table error: ORA-20001: Excel load run ddl error: ORA-01658: unable to create INITIAL extent for segment in tablespace FLOW_693"

    Scott,
    Thanks, but I don't think that's the problem. My workspace is 100Mb, and it's almost empty. I can install & run sample apps just fine, but not create a new app from a spreadsheet. The spreadsheet is small, to: nine columns and about 50 rows.
    Any ideas?

  • Range of Object Worksheet Failed error when creating variable report

    I have BO Planning version 11.6 and am running it in conjunction with Excel 2007. Every time I try to use the Report Wizard I can create a report the first time with no problems. However, when I exit out of that report and then try to create a new report using the Report Wizard I receive the following error "The following error has occurred: Error No. 1004, Method 'Range' of obejct'_Worksheet' failed". Then a report pops up with no data in it. The error keeps occuring when I try to create new reports until I exit out of Business Objects and open it up again. Then I can create 1 report with no problems.

    Please post this query to the Other Business Objects Products forum:
    SAP BusinessObjects BI Legacy Products
    That forum is monitored by qualified technicians and you will get a faster response there.
    Thank you for your understanding,
    Ludek

  • Database error when creating a report

    Hi all,
    When we are creating a report with a universe based on BW, we are getting this error message:
    "A database error occurred. The database error text is: An error occurred while trying to load the provider for transport sap. Failed to load library mda_sap. System error message: 0509-022 Cannot load module /Apps/BOEXI31/bobje/enterprise120/aix_rs6000/libmda_sap.so.
    0509-150 Dependent module
    /Apps/BOEXI31/bobje/enterprise120/aix_rs6000/librfccm.o could not be loaded.
    0509-103 The module has an invalid magic number.
    0509-022 Cannot load module
    /Apps/BOEXI31/bobje/enterprise120/aix_rs6000/libmda_sap.so
    0509-150 Dependent module
    /Apps/BOEXI31/bobje/enterprise120/aix_rs6000/libmda_sap.so could not be
    loaded.. (WIS 10901)"
    When I test the connection of the universe in Designer, the result is ok. Also, when I create a report on Rich Client, the report is created fine.
    This is the Environment details:
    BusinessObjects XI 3.1 Service Pack 3 Fix Pack 3.2 (distributed installation)
    Windows Server 2008 R2 (CMS)
    AIX 5.3 Level 10 (Other BO services)
    Integration Kit SP3 fp 3.2 installed on both servers
    Thanks,
    Alvaro

    Because the customer wanted the functionallity of single sign-on with Vintela. We used this guide for the installation: http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/d0f6ac3c-b3ac-2b10-1b95-c9bd46194977?quicklink=index&overridelayout=true
    Regards,
    Alvaro

  • BI Publisher Javascript error when creating a report

    Hello,
    I am trying to create a report in BI Publisher and the following comes up:
    Message JavaScript Error: Failed to load: io/catalog/read-report
    Supplemental Detail fileName: http://<hostname>/xmlpserver/js/xdo_rel.js?cacheBuster=53
    lineNumber: 1
    I am stuck with this error and cannot find anything about it in the internet. I used to be able to create a Report in BI Publisher. On the other hand when I try to edit an existing report, I can do so without any issues.
    Please advise. Thank you.

    Ok, so...
    The funny thing is that it didn't work the first time I tried to change the name of my column, and now it works !
    So it's right that 2 columns can't have the same alias, I'm sorry, I'm new even with the SQL, it's a long story...
    I would like to change your message to "Correct" but I can't...
    Thanks Roel !

  • Report template error when creating new report via SAP menu

    Hi everybody,
    we have the following error on our system:
    When trying to create a new crystal report on a SAP query, using the entry "Create new report from a SAP query" in the SAP menu an error occurs: An error ocurred while generating a new report template
    The error message appears after the SAP logon and the SAP query selection.
    I think this error is related to the report templates of Crystal...
    Is there any default template for SAP integrated queries?
    We are using Crystal Report 2008 SP2 with SAP Integration Kit.
    Thanks for any helps and comments.
    Sebastian

    The following SAP note might help you
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bip/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333333363337333633343330%7D.do]
    Regards,
    Raghavednra.G

Maybe you are looking for

  • I can't upgrade my iPad 2 software from iOS 5.0.1 to iOS 5.1

    Hi I wonder if anyone of you could help. I have an iPad 2 running iOS 5.0.1 and can't upgrade to iOS 5.1. The problem I am having is when I check for an update on my iPad it takes ages and then I get a message saying that it was unable to check for a

  • Payment Run program for china country code

    Hi all, We have a requirement where, after running a payment program we need a generate a dme file. till now we were using rffod__u which is for derman, But our requirement is for china. Can anyone suggest which is the payment run program that is use

  • How to check if a image/MovieClip is in particular position??

    Hi, I m trying to develop a e-Learning kind of stuff where in All the planets of solar system are jumbled and then the Kid has to drag and drop the each planets in order. But what i need is After the kid drags and drops the image/MovieClip in order,

  • Adding SQL Server AlwaysOn to existing Failover Clusters

    Hello, We use two seperate ms sql server 2012 clusters. We have two sites. All nodes are in same domain. In the first site,  NOD1 and NOD2 are in SITE A cluster group. (INSTANCE A) They have a shared SAN storage. In the second site, NOD3 and NOD3 are

  • Intermittent 404 error after deploying EAR file

    I deployed my web application to an EAR file and deployed it to OAS 10.1.3 on linux. I deployed it to a separate OC4J container that I created (not home container). During the deployment, I specified an application name and context as usual and did n