Why am I getting ORA-06502

Hi:
I have the following call in a form trigger:
ERROR_MSG('Access denied');
Here is the detail on ERROR_MSG, which is in a pll (base.pll):
PROCEDURE ERROR_MSG(
                     P_MSG                 VARCHAR2,
                     USE_ALERT             BOOLEAN  := FALSE,
                     P_TITLE               VARCHAR2 := '',
                     RAISE_FAILURE         BOOLEAN  := TRUE,
                     USE_LONG_MSG          BOOLEAN := FALSE
IS
  V_ALERT_ID          ALERT;
  V_ALERT_RESPONSE    NUMBER;
  V_MSG               VARCHAR2(32767) := P_MSG;
BEGIN
  CLEAR_MESSAGE;
  IF SUBSTR(V_MSG, -1) <> '.' THEN
    V_MSG := V_MSG || '.';
  END IF;
  IF USE_LONG_MSG THEN
       VIEW_LONG_MESSAGE(V_MSG, P_TITLE);
  ELSE
    IF USE_ALERT THEN
      V_ALERT_ID := FIND_ALERT('OK_ALERT');   
      IF ID_NULL(V_ALERT_ID) THEN
        MESSAGE(REPLACE(V_MSG, CHR(10)));
      ELSE
        SET_ALERT_PROPERTY(V_ALERT_ID, TITLE, NVL(P_TITLE, 'Error'));
        SET_ALERT_PROPERTY(V_ALERT_ID, ALERT_MESSAGE_TEXT, V_MSG);
        V_ALERT_RESPONSE := SHOW_ALERT(V_ALERT_ID);
      END IF;
    ELSE
      MESSAGE(REPLACE(V_MSG, CHR(10))); -- I am getting this message
    END IF;
  END IF;
  IF RAISE_FAILURE THEN
    RAISE FORM_TRIGGER_FAILURE;
  END IF;
END;I am getting the message in the line marked "I am getting this message"
My problems is that I am also getting ORA-06502 error message after the "Access Denied" meesage.
Does anybody have an idea why?

I suspect that whatever trigger or procedure is issuing the "Access denied" message is not causing the ORA-06502: PL/SQL: numeric or value error message. What trigger are you issuing the message from? Is there some other trigger or procedure running? If it is issuing some sort of navigational command, which is causing the current procedure to issue the "Access denied" error message, but NOT checking
    If not form_success then
      Raise Form_trigger_failure;
    End if;then it may be proceeding, and then encounters the 6502 problem.

Similar Messages

  • Getting ORA-06502 error. Don't know why. Please help!

    I am getting the following error msgs and don't understand why?
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SMSRPT.SP_DATA_CHECK", line 22
    ORA-06512: at line 6
    Here is my procedure. Can someone look at it and explain to me what i could possibly be doing wrong here.
    create or replace
    PROCEDURE sp_data_check(p_date number) is
    --DECLARE
    v_table_name VARCHAR2(35);
         v_string VARCHAR2(1024);
         v_result number;
         v_output VARCHAR2(1024);
    v_report_date VARCHAR2(8);
    v_dt VARCJAR2(8);
    CRLF char(2) := chr(10)||chr(13);
         CURSOR c_table is
              select table_name
              from user_tab_columns
              where COLUMN_NAME = 'REPORT_DATE'
              and table_name NOT LIKE '%BIN%';
         BEGIN
    OPEN c_table;
         loop
              FETCH c_table into v_table_name;
              exit when c_table%NOTFOUND;
              v_string:='select decode(max(report_date),'||p_date||',1,0)'|| ' from ' || v_table_name;
              execute immediate v_string into v_result;
    v_report_date:='select max(report_date)'|| ' from ' || v_table_name;
    excute immediate v_report_date into v_dt;
              v_output:=v_output||CRLF||v_table_name||': '||v_dt;
    end loop;
    if v_result =0 then
    sp_send_mail('reports@localhost','[email protected]',
    'Report Date Not There','The following tables do not have the correct report_date information:'||v_output);
    end if;
    close c_table;
    END;
    The bold section of my code is what i added that broke it. Before adding these lines of code it all worked fine.

    That worked. Here is the revised working program
    create or replace PROCEDURE sp_data_check(p_date number) is
    --DECLARE
    v_table_name VARCHAR2(35);
         v_string VARCHAR2(1024);
         v_result number;
         v_output VARCHAR2(1024);
    v_report_date VARCHAR2(100);
    v_dt VARCHAR2(100);
    CRLF char(2) := chr(10)||chr(13);
         CURSOR c_table is
              select table_name
              from user_tab_columns
              where COLUMN_NAME = 'REPORT_DATE'
              and table_name NOT LIKE '%BIN%';
         BEGIN
    OPEN c_table;
         loop
              FETCH c_table into v_table_name;
              exit when c_table%NOTFOUND;
              v_string:='select decode(max(report_date),'||p_date||',1,0)'|| ' from ' || v_table_name;
              execute immediate v_string into v_result;
    v_report_date:='select max(report_date)'|| ' from ' || v_table_name;
    execute immediate v_report_date into v_dt;
              v_output:=v_output||CRLF||v_table_name||': '||v_dt;
    end loop;
    if v_result =0 then
    sp_send_mail('reports@localhost','[email protected]',
    'Report Date Not There','The following tables do not have the correct report_date information:'||v_output);
    end if;
    close c_table;
    END;

  • Trying to create Master - Detail form, getting  ORA-06502: PL/SQL: numeric

    Anyone know why we might get this error trying to create a Master Detail form in HTMLDB 2.0?
    ORA-20001: Unable to create master detail page. ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Unable to create Master Detail pages.
    Return to application.

    Please create the failing case in your workspace on apex.oracle.com and tell us the workspace name, app ID and steps to recreate.
    Scott

  • Getting ORA-06502 in Runtime, but not throug Developer

    I got a copy of Matrix.fmb & Matrix.pll from someone at oracle and changed it up for my application. It worked great. I just recently upgraded from 8.05 to 10G and Developer 5 to 6. If I run the form from Developer, it runs great. If I run in using the runtime, I get an ORA-06502 error in an assigment statment. I tracked down the location of the error, and it seems the variable looses it dimension.
    I even inserted a dummy statment after declareing it, to test the problem.
    i.e. v_test := 'abcdefg'; it seems to error out on this statment.
    I even took all the procedures, packages, and funtions from the pll and put them directly in forms and it runs and errors out the same.
    Sometimes if I put remarks and 'message' statments in the form, t will error out on a different statement in the package, but the same error.

    What is your 6i version? We had similar strange problems and applied the latest 6i patch. E.g. instead of this:
    if my_function(my_parameter) = 'X' then ...
    We had to change the code (in some cases only) to:
    my_variable := my_function(my_parameter);
    if my_variable = 'X' then ...

  • Why do i get ORA-03113 when doing a spatial query against union all view?

    Hi, i created the following view
    CREATE OR REPLACE FORCE VIEW cola_markets_v
    AS
      (SELECT mkt_id, NAME, shape shape_a, NULL shape_b, NULL shape_c,
              NULL shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_a')
       UNION ALL
      (SELECT mkt_id, NAME, NULL shape_a, shape shape_b, NULL shape_c,
              NULL shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_b')
       UNION ALL
      (SELECT mkt_id, NAME, NULL shape_a, NULL shape_b, shape shape_c,
              NULL shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_c')
       UNION ALL
      (SELECT mkt_id, NAME, NULL shape_a, NULL shape_b, NULL shape_c,
              shape shape_d
         FROM COLA_MARKETS
        WHERE NAME = 'cola_d');added the necessary entries in USER_SDO_GEOM_METADATA and created a spatial index on COLA_MARKETS (SHAPE). However, when i do a spatial query against this view, i get ORA-03113. A spatial query against the base table works fine. Any ideas why this happens? (This is Oracle 10.2.0.3.0)
    Thanks in advance, Markus
    PS: This is my spatial query
    SELECT *
      FROM cola_markets_v t
    WHERE sdo_filter (t.shape_a,
                             SDO_GEOMETRY (2003,
                                           NULL,
                                           NULL,
                                           sdo_elem_info_array (1, 1003, 3),
                                           sdo_ordinate_array (1, 1, 2, 2)
                             'querytype=window'
                            ) = 'TRUE';

    Thank you for your reply. I have tried it with 11.1.0.6.0 today and it works. This might be an issue with 10.2.0.3.0.

  • Why Am I Getting ORA-01031: insufficient privileges To Add Trandata?

    I create a table C##TOM.CUSTOMERS in SQL Plus.
    I go to the ggsci command line and attempt to add trandata and get the following insufficient privileges response:
    GGSCI (TPFAEFFL-LAP) 11> add trandata C##TOM.CUSTOMERS
    ERROR: Error (1031, ORA-01031: insufficient privileges) start select in get_total_columns.
    I have already granted connect, dba, flashback, create session, alter session, select any dictionary, select any table, select any transaction, and select unlimited tablespace to the user.
    What privileges am I missing?
    TIA.

    Did you use the DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE procedure to the DBLOGIN user?  
    This call grants all of the required privileges for ADD SCHEMATRANDATA and ADD TRANDATA - whether it is classic or integrated capture.  

  • Why I am getting ORA-29257 while running a get ipaddress query?

    Friends,
    The query:
    select machine,utl_inaddr.get_host_address(machine) from v$session where username is not null
    Result:
    Error at line 1:
    ORA-29257
    host bmc01\beating
    How can i resolve this error?
    Thanks & Regards
    Sathyguy

    The machine name is unknown to the Database server. To see if this is the problem try adding that machine in hosts file.

  • ORA-06502: PL/SQL: numeric or value error in 10g

    We were using a Function in Oracle 9i which uses max()
    function against CHAR field.
    It was working fine until now. We are moved database
    from 9i to 10g.
    Now i am getting "ORA-06502: PL/SQL: numeric or value error:
    character string buffer too small"
    I have created simple function and tested. Actual Char field
    size is 10. In that function we also declared the variable size of 20 to store the value.
    But when we run the function in Oracle 10g we give the variable size char(4000
    ) then it works.
    we have many functions like this we are confusing whether these functions are working or not in 10g
    why this happening please give a solution
    Regards
    Shiju

    Try this. It is the Oracle recommended workaround and it worked for us.
    ALTER SYSTEM SET blank_trimming=TRUE SCOPE=SPFILE
    STOP AND START THE instance.
    Good Luck!

  • ORA-06502 when trying to call a function inside my report

    Hi guys,
    I have the following code in a function to get my open bal for a field in my report but I am getting ORA-06502 every time I try to run it.
    Does any one have any idea as why?
    ================================
    function CF_OPNE_BALFormula return Number is
    v_bal number;
    v_period char;
    v_prv_period char;
    BEGIN
    v_period := to_char(last_day(:p_date_From),'RRRRMM');
    if substr(v_period,5,2) = '01' then
    v_prv_period := to_char(to_number(substr(v_period,1,4))-1) ||'13';
    else
    v_prv_period := to_char(to_number(to_char(:p_date_From,'YYYYMM')-1));
    end if;
    v_bal := csh_acc_pkg.csh_get_acc_bal(:p_own_id,:P_GLA_acc_num,v_prv_period,'F','ACC');
    return(v_bal);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN NULL;
    END;
    ====================================================
    Thanks
    Hali

    Try using varchar2 with length specified instead of char in the variable declarations.

  • ORA-06502 character string buffer too small, works in query not procedure

    The following query works prefect as a single query:
    with t as (select steroid_start_date as the_date from treatments where patientid = 1378 and visitnumber = 0)
        select max(case when instr(mon, '/') > 0 then NULL else mon end) mon,
             max(case when instr(yr, '/') > 0 then NULL else yr end) yr
      from ( select the_date, substr(the_date, nvl(last_pos,1), pos-1) mon, substr(the_date, pos+1) yr
              from ( select t.*,
                               instr(the_date, '/', 1, lvl) pos,
                            lag(instr(the_date, '/', 1, lvl))
                                over (
                                        partition by the_date
                                        order by instr(the_date, '/', 1, lvl)
                                     ) last_pos
                     from t, (
                                select 1 lvl
                                from dual
                                UNION ALL
                                select 2 lvl
                                from dual
                             ) b
                      where instr(the_date, '/', 1, lvl) > 0
          );I have a procedure contains:
    CREATE OR REPLACE PROCEDURE update_steroid_start_date(patid number, visit number)
    IS
        mon varchar2(3);
        yr varchar2(3);
    date1 varchar2(12);
    insert_date varchar2(12);
    BEGIN
        select steroid_start_date into date1 from treatments where patientid = patid and visitnumber = visit;
        with t as (select date1 the_date from dual)
        select max(case when instr(mon, '/') > 0 then NULL else mon end),
             max(case when instr(yr, '/') > 0 then NULL else yr end) into mon, yr
      from ( select the_date, substr(the_date, nvl(last_pos,1), pos-1) mon, substr(the_date, pos+1) yr
              from ( select t.*,
                               instr(the_date, '/', 1, lvl) pos,
                            lag(instr(the_date, '/', 1, lvl))
                                over (
                                        partition by the_date
                                        order by instr(the_date, '/', 1, lvl)
                                     ) last_pos
                     from t, (
                                select 1 lvl
                                from dual
                                UNION ALL
                                select 2 lvl
                                from dual
                             ) b
                      where instr(the_date, '/', 1, lvl) > 0
          );when I try to execute this procedure, I am getting ORA-06502 character string buffer too smal on the line
    with t as (select date1 the_date from dual)why is that? I am trying to break user input 1/2000, sometimes junk (1/ , /2000), and apply some logic so they will be 01/01/2000, NULL, 01/01/2000
    Edited by: OracleNoob on Feb 17, 2009 10:58 AM

    Hi,
    That error occurs when the variables that are being set are too short to hold the entire value being selected.
    Either make the variables longer, or the columns shorter.
    If you need mnore help, post
    (1) The version of Oracle (and any other relevant software) you're using
    (2) A little sample data (just enough to show what the problem is) from all the relevant tables
    (3) The results you want from that data
    (4) Your formatted code
    (5) The full error message(s), including line number
    Executable SQL statements (like "CREATE TABLE AS ..." or "INSERT ..." statements) are best for (2).
    Formatted tabular output is okay for (3) and essential for (4). Type &#123;code&#125; before and after the tabular text, to preserve spacing.

  • Ora-06502: variable length too long on report query xml schema download

    on shared components/report queries/edit report query/
    and downloading my queries in xml schema format (radio button).
    Get
    ORA-06502: PL/SQL: numeric or value error: raw variable length too long
    when i click the download button.
    EDIT:
    i want to add that i recently changed several columns in the database from 150 to 3000 chars long.
    Edited by: Manny Rodriguez on Oct 11, 2011 7:19 AM

    "4000 bytes is the ultimate maximum. you can say 4000 *characters* , but it'll always be limited to 4000 *bytes* . "
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1224836384599#201073000346459201\
    "The maximum length of the column is determined by the national character set definition. Width specifications of character data type NVARCHAR2 refer to the number of characters. The maximum column size allowed is 4000 bytes."
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements001.htm#SQLRF50976
    By the way, you're treating your numbers as STRINGS, remove the quotes around your zero's.

  • Ora-06502 while calling oracle function

    I am using 9.2.0.4.0 database.
    I have vb.net application that uses oracle provider for .net to connect to database.
    I am calling Oracle function which returns varchar2 value back.
    when i execute cmd2.ExecuteNonQuery, I get ora-06502 error.
    CREATE OR REPLACE FUNCTION ZZZ_TEMP( p_val IN VARCHAR2) RETURN varchar2
    AS
    BEGIN
    RETURN 'HELLO';
    EXCEPTION WHEN OTHERS THEN
    RETURN SQLCODE||' - '||SUBSTR(SQLERRM,1,100);
    END;
    ************** vb.net code
    Dim cmd2 As New Oracle.DataAccess.Client.OracleCommand(UserSchemaName & ".ZZZ_TEMP", con)
    Dim VAL As String
    Try
    cmd2.Parameters.Add("RetVal", Oracle.DataAccess.Client.OracleDbType.Varchar2, ParameterDirection.ReturnValue)
    cmd2.Parameters.Add("p_val", Oracle.DataAccess.Client.OracleDbType.Varchar2, ParameterDirection.Input).Value = "XYZ"
    cmd2.Connection = con
    cmd2.CommandType = CommandType.StoredProcedure
    cmd2.ExecuteNonQuery()
    VAL = cmd2.Parameters("RetVal").Value
    Catch ex As Oracle.DataAccess.Client.OracleException
    MsgBox(ex.Message)
    End Try

    If I change this function to retrun number rather than Varchar2 and change my
    RetVal parameter as follow it works. I am noticing that there might be a bug when function returns varchar2
    cmd2.Parameters.Add("RetVal", Oracle.DataAccess.Client.OracleDbType.int32, ParameterDirection.ReturnValue)
    cmd2.Parameters.Add("p_Val", Oracle.DataAccess.Client.OracleDbType.int32, ParameterDirection.Input).valu ="XYZ"

  • XML transform and ORA-06502:

    When i update a limited set ( 1 row) of data with the statement in example 1 the statement works fine. When i delete the where clause i get ORA-06502: numeric or value error: character string buffer too small.
    How can i make the statement work for a large amount of data.
    example 1:
    update udo.udo_cursus_beschrijvingen cbg
    SET cbg.tekst = cbg.tekst.transform(XMLType(
    '<?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="url[(starts-with(child::text(),''www.''))]">
    <url>http://<xsl:value-of select="."/></url>
    </xsl:template>
    <xsl:template match="@*|*|text()|processing-instruction()">
    <xsl:copy>
    <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
    </xsl:copy>
    </xsl:template>
    </xsl:stylesheet>
    ')).getStringVal()
    where cbg.id = 1672;

    Sergio - I'm surprised that a hundred rows causes the Display As Text (based on LOV, save/does not save the state) to blow out. I'd expect no problems up to 5000 rows or so. I'd like to see an example of your case. The limitation on select lists is usually related to either the size of an individual report column (4000 max) or the size of a report row (32K max) in which a select-list lov is used. The total size of the HTML returned counts towards these limits. The problem for select-list items on a page is that large select lists mean lots of HTML on the page making the page heavy and burdening the network.
    Scott

  • 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.

  • Download Interactive Report fails with ORA-06502

    I am using:-
    Apex version 4.2.1.00.08
    Oracle DB 11.2
    Apex Listener
    I.E. 8
    I have created an interactive report and when I download the report to CSV I get ORA-06502.  My report contains over 100 columns some of which are blobs so I am hitting the old 32k limit.  Does anyone have a work round for this problem. The ability to download data is a key feature of my application and this really is a show stopper form me.
    Regards...

    The queries are not executed in parallel but in serial. So the total execution time configured will be for all the Select statements in the report combined.
    As for your second question, since the execution is not parallel hence BO will not initiate any error message until the total execution time exceeds the defined limit. This could be during the execution of first select statement or the second.
    Try executing the queries directly in database one by one and see how much time they are taking.
    - Noman Jaffery

Maybe you are looking for

  • Can I save music from my itunes macbook to my iphone/ipad mini via home sharing?

    Or can you only play it in your home with the home wifi? When I plug my ipad into my Macbook an error message comes up "The ipad cannot be used because it requires iTunes version 10.7 of later. My Macbook is running itunes 10.6.3 and won't seem to ac

  • Why can't we have "show cookies" menu be a button in the new drop down menu on FF29 ?

    I see the new Firefox 29 has a drop down menu in the upper right corner, with various shortcut symbols. One of them is "preferences", but I would like to make that to be have an even shorter shortcut to "show cookies", instead of having it buried in

  • Stacks not sorting correctly

    In the documents folder I have it set to sort by date modified, but it doesn't seem to refresh the sorted order of the stack after I modify a file. The only way that I can get it to refresh the stack is to log out and back in. Does anyone know how to

  • Google certificates

    Hello. My new Google app is giving me error on purchase: "This version of the application is not configured for billing through Google Play." At the same time my old apps i created year ago are working correctly. Do i need to recreate my android cert

  • Unable to deactivate previous coldfusion builder 2 installations

    I can't activate an installation of ColdFusion Builder 2 because it says I have two adjacent installations of CF Builder on two other computers. The two other computers disks drives were erased before CF Builder could be deactivated. So, it still thi