Ora-06502 error while running a form

Hi
DECLARE
pl_id PARAMLIST;
begin
     PL_ID:=GET_PARAMETER_LIST('TMP');
     IF NOT ID_NULL(PL_ID) THEN
          DESTROY_PARAMETER_LIST('TMP');
     END IF;
     PL_ID:=CREATE_PARAMETER_LIST('TMP');
     ADD_PARAMETER(PL_ID,'PARAMFORM','TEXT_PARAMETER','NO');
     /*ADD_PARAMETER(PL_ID,'Y_N','TEXT_PARAMETER',:L_CHOICE);
     add_parameter(pl_id,'WHERE','TEXT_PARAMETER',:TI_WHERE);
     add_parameter(pl_id,'ORDERBY','TEXT_PARAMETER',:TI_ORDERBY);*/
     RUN_PRODUCT(REPORTS,'LEXUSE1.REP',SYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, NULL);
     EXCEPTION
          WHEN OTHERS THEN
          MESSAGE(SQLERRM);
          MESSAGE(' ');
END;
i am using the above code on when-button-pressed trigger to call a report, but when i press the button i get an error message ORA-06502 PL/SQL Numeric or Value Error. dont know why

Remove single quotes around TEXT_PARAMETER
ADD_PARAMETER(PL_ID,'PARAMFORM',TEXT_PARAMETER,'NO');

Similar Messages

  • ORA-12560: TNS:protocol adapter error while running Oracle Form 10g over IE

    Hi,
    I am getting the following error message while running my form over Internet Explorer. What could be the error and the solution.
    ORA-12560: TNS:protocol adapter error
    I am using the same user id/password that i used to create the database.
    Plz help.
    thanks,
    RV

    unless you defined the TWO_TASK in your environment, you might need to provide it during the login. The typical Forms login screen has 3 fields, username/password and TWO_TASK , which is the alias used for the database server in the tnsnames.ora file on your end. If you are using iAS forms, then a proper RAD (Resource Access Descriptor) needs to be created by the DBA or whoever manages the iAS server. This is only if SSO is utilized, if not, then you need to provide TWO_TASK as well.
    Hope this proves useful
    R/ Zafer

  • ORA-03147 error while running Alert

    I am getting “ORA-03147: Missing mandatory TTC field” error while running an alert. I can share error screenshot and the alert query, if needed. (not putting right now as the query is huge)
    Please note that alert query runs perfectly fine in PLSQL Developer.
    Any prompt suggestion/help is appreciated.

    Please find the alert query and error screenshot at below links:
    https://docs.google.com/leaf?id=0B6W2rsWyyNGMMmJhNjQ5OTAtZGM1Ni00ZTY3LWJmNTEtM2RiYmUyYmJiNzFl&hl=en_US
    https://docs.google.com/document/d/1yseUqYQYYPwnoMhnN1s1WFpkb1FjpWLniALGTHdhzfw/edit?hl=en_US
    I cannot access the files in the above links.
    Thanks,
    Hussein

  • ORA-01503 and ORA-01110 Errors while running adcfgclone.pl dbTier

    Hi,
    I am working on R12 on IBM AIX as I am cloning from one system to another I am facing some errors while running adcfgclone.pl for database tier.
    Following is the log from the adcfgclone.pl as it fails;
    Creating the control file for CLONE_test database ...
    SQL*Plus: Release 11.1.0.7.0 - Production on Mon Sep 6 10:32:43 2010
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Connected to an idle instance.
    ORACLE instance shut down.
    Connected to an idle instance.
    ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated
    ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
    ORACLE instance started.
    Total System Global Area 1068937216 bytes
    Fixed Size                  2160600 bytes
    Variable Size             427821096 bytes
    Database Buffers          624951296 bytes
    Redo Buffers               14004224 bytes
    CREATE CONTROLFILE REUSE SET DATABASE "CLONE"
    *+
    ERROR at line 1:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01159: file is not from same database as previous files - wrong database id
    ORA-01110: data file 22: '/u04/oracle/proddata/applsysx01.dbf'
    alter database open resetlogs
    *+
    ERROR at line 1:
    ORA-01507: database not mounted
    alter tablespace TEMP add tempfile '/u03/oracle/proddata/temp01.dbf' REUSE
    *+
    ERROR at line 1:
    ORA-01109: database not open
    ALTER DATABASE RENAME GLOBAL_NAME TO "CLONE.testcom.com"
    *+
    ERROR at line 1:
    ORA-01109: database not open
    ORA-01507: database not mounted
    ORACLE instance shut down.
    Connected to an idle instance.
    ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated
    ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
    ORACLE instance started.
    Total System Global Area 1068937216 bytes
    Fixed Size                  2160600 bytes
    Variable Size             427821096 bytes
    Database Buffers          624951296 bytes
    Redo Buffers               14004224 bytes
    ORA-03113: end-of-file on communication channel
    Process ID: 1278120
    Session ID: 1105 Serial number: 3
    ERROR:
    ORA-03114: not connected to ORACLE
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn't exist
    Connected.
    ORA-01031: insufficient privileges
    ERROR:
    ORA-01012: not logged on
    ERROR:
    ORA-01012: not logged on
    ERROR:
    ORA-01012: not logged on
    ERROR:
    ORA-01012: not logged on
    ERROR:
    ORA-01012: not logged on
    ERROR:
    ORA-01012: not logged on
    Disconnected
    exit_code=1
    Checking for errors ...
    The database has not been successfully created. Shutting down the instance ...
    SQL*Plus: Release 11.1.0.7.0 - Production on Mon Sep 6 10:33:12 2010
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Connected to an idle instance.
    ORACLE instance shut down.
    Disconnected
    +.end std out.+
    +.end err out.+
    I have checked the log for preclone from the source machine but there are no errors. Below are the last lines of preclone log file
    Zip2 - Completed native zipping sh -c "cd /u02/oracle/proddb/10.2.0/appsutil/out/PROD_testcom/; zip  -q  -y /u02/oracle/proddb/10.2.0/appsutil/clone/data/stage/adcrdb.zip -@ ; echo ERRORCODE = $? ERRORCODE_END"
    Done...
    +#############################################################+
    StageDBTier Finished at Tue Aug 31 16:50:19 GMT03:00 2010+
    Status: Completed Successfully
    +#############################################################+
    Please advice.
    Regards

    Hi user:
    1. Yes the database and lsnr were closed as the tar files were created. So, i assume thate there are no any oracle session avalibale when you copy files from source to target
    2. Yes I would also like to mention that it already had an old instance. So this is just a new clone. So, i mention you have valid entery on /etc/hosts file
    3. Please can you describe what permissions as from root user it was done as
    chown -R oratest:dba <db tier folders> If your target user is oratest than syntax seems correct, did you copy oracle_home too from source to target and this home owner is oratest again right?
    Regard
    Helios

  • Error while running a form

    Hi,
    I have downloaded orqacle 10g XE,and developer suite from oracle .
    The configuration I am using is
    OS : Window vista
    Browser : Mozilla firefox
    java applet :jinitator1.3.1.22
    while running the form firefox get hanged and not able to run the form.
    Could anyone tell me the rason for the same
    Thanks in Advance

    Welcome to the Oracle Forums. Please take a few minutes to review the following:
    <ul>
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>Announcement: Forums Etiquette / Reward Points
    </ul>
    It sounds like you are using a web version of Oracle Forms (9i, 10g, 11g) but it would helpful to know the exact release. More than likely, you simply need to start the OC4J (9i or 10g) or WebLogic Server (WLS) if you are using Forms 11g. It would also be helpful to know your workstation OS and Java versions.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Error While Running the form 10g

    Hi,
    I have a prob while running the form.
    Since the day I installed Form 10g at my home pc. Every time after i make any changes in the form, if i try to run the form after compiling and saving. It keeps asking me to enter scott/tiger@anthony to run the form.
    Even after running the form if i close it and to run the form again i have to enter scott/tiger@anthony.
    Wht culd be the prob plz help ?
    Rgds
    Anthony J
    Hi,
    I have all my tables in the scott schema also b4 running the form for the 1st time I do connect to the database thru File -> connect.
    Plz confirm what shld be the setting the preference option in the menu.
    Message was edited by:
    Anthony J

    Do you have a logon statement in the ON-LOGON trigger in your form? Do that, and it won't ask you to logon each time you run the form.
    Also make sure you connect to the database in Forms Builder by going to File -> Connect...

  • Error while running the form

    Hi All,
    I am using oracle 10g form builder.
    I am able to connect to database.
    But When running the form I am facing an error saying TNS protocol adapter error.
    Can you please resolve it.
    Thanks
    Sunil
    Edited by: user9092293 on Sep 14, 2010 10:39 PM

    Sarah,
    At runtime the Windows Registry is generally not used. In Forms versions newer than 902 most environment settings are captured from default.env. Also, adding "LOCAL" simply gives you the ability to offer a default value which won't be displayed in the login dialog (or login string). This may not always be desired behavior. Essentially, this is just a cheat. It doesn't necessarily solve the problem, but instead just works around it.
    Sunil,
    Although what Sarah is suggesting might solve your issue, it might not result in the desired behavior. I would recommend you first isolate and correct the problem before implementing shortcuts. In your case, the error you are seeing is often (but not always) the result of not including the connect string (db name/alias) when trying to connect or the inability to locate tnsnames.ora. So, proving this first will offer at least two thing: 1) It will help you to understand how the logon process works... 2) It illustrates what caused the problem in the first place, which may be helpful knowledge if you see this problem in the future.
    Recommendation:
    1. Can you connect the Builder to the db? In other words, open the Builder and from the menu select File > Connect. Enter your username, password, and Database name
    2. If you can connect from within the Builder, while still connected, open your form in the Builder and click on the Run Form button found on the Builders menu/toolbar. Your form should run. If the same error appears then the problem is not related to the inclusion of the db name, as the Builder would have passed that information when the Run Form button was pressed. In this case, it suggests that the tnsnames.ora file cannot be found by the Runtime. If this is what you are seeing, refer back to my previous entry regarding updating your default.env with TNS_ADMIN.

  • ORA-12514 error while running adcfgclone.pl

    Dear Hussein,
    We are cloning an R12 instance, while running adcfgclone.pl dbTier, we are gettign the below error:
    ============================================================
    getConnectionUsingAppsJDBCConnector() -->
    APPS_JDBC_URL='null'
    Trying to get connection using SID based connect descriptor
    getConnection() -->
    sDbHost : db1
    sDbDomain : ******.com
    sDbPort : 1551
    sDbSid : ERPUAT
    sDbUser : APPS
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@db1.******.com:1551:ERPUAT
    Exception occurred: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db1.******.com)(PORT=1551))(CONNECT_DATA=(SERVICE_NAME=ERPUAT)))
    Exception occurred: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db1.******.com)(PORT=1551))(CONNECT_DATA=(SERVICE_NAME=ERPUAT.******.com)))
    Exception occurred: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    Connection could not be obtained; returning null
    =============================================================
    and in alert log file, there is below error:
    =============================================================
    alter database open resetlogs
    ORA-1194 signalled during: alter database open resetlogs...
    alter tablespace TEMP1 add tempfile '/mnt/data/erpuat/db/apps_st/data/temp01.dbf' REUSE
    ORA-1109 signalled during: alter tablespace TEMP1 add tempfile '/mnt/data/erpuat/db/apps_st/data/temp01.dbf' REUSE...
    alter tablespace TEMP2 add tempfile '/mnt/data/erpuat/db/apps_st/data/temp02.dbf' REUSE
    ORA-1109 signalled during: alter tablespace TEMP2 add tempfile '/mnt/data/erpuat/db/apps_st/data/temp02.dbf' REUSE...
    Sun Sep 13 23:53:24 2009
    Shutting down instance (abort)
    License high water mark = 1
    USER (ospid: 1809): terminating the instance
    Instance terminated by USER, pid = 1809
    Sun Sep 13 23:53:25 2009
    Instance shutdown complete
    ================================================
    Please suggest
    Bilal
    Edited by: user5499416 on Sep 14, 2009 12:24 AM
    Edited by: user5499416 on Sep 14, 2009 12:52 AM

    Bilal,
    Exception occurred: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directoryPlease verify that the database was created successfully and it is up and running.
    Regards,
    Hussein

  • 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

  • ORA-06502 Error while exporting to xls format

    While Exporting to xls format, the ORA-06502 crops up in the exported file.
    The print server is BI Publisher.
    The report has around 50 columns.
    Any help would be greatly appreciated.

    Any suggestions?

  • 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-01704 error while running dbms_sql for a clob

    Hi,
    I'm running following code and getiing error ORA-01704: string literal too long
    declare
    cursor_name INTEGER;
    t1 clob;
    t2 clob;
    r number;
    begin
    select a1 into t1 from temp
    where n1 = 'test';
    t2 := 'insert into temp (a1,n1) values (''' || t1 || ''',''test12'')' ;
    cursor_name := dbms_sql.open_cursor;
    DBMS_SQL.PARSE(cursor_name, t2, DBMS_SQL.NATIVE);
    r := DBMS_SQL.EXECUTE(cursor_name);
    DBMS_SQL.CLOSE_CURSOR(cursor_name);
    dbms_output.put_line(r);
    end;
    clob t1 is 32598 butes long.
    in temp table a1 is a clob.
    Could anyone please tell me why the error and how to solve the problem.
    Thanks
    Tarun

    This is one of the many posts over here where the OP can not be bothered to include the four digit version number.
    I can never understand why the version number is left out other than out of rudeness, arrogance and utter laziness.
    Apparently the small lot here responding should be clairvoyant and/or remember all version numbers.
    I'm going to call for a boycot of people posting without version number!!!!
    As to the code:
    There is no reason why you are using dbms_sql here, you are misusing Oracle, and it should have been static sql.
    At least t2 should have been a bind variable, dbms_sql does support bind variables!
    As far as I know the command string should be a varchar2, not a clob, and if t2 is a bind variable there is no need for t1 to be a clob.
    Sybrand Bakker
    Senior Oracle DBA

  • ORA-03120 error while running XML on 8.1.7

    Hi Steve and others,
    We were getting errors returned XSU on Oracle 8.1.6 whenever the query resultset exceeded certain size. Steve, if you remember you advised us to move up to 8.1.7 which apparently fixes the bug.
    I did.
    But now whenever I run a XML statement I get
    this error:
    select xmlgen.getXML('select content_id from
    bc_content where content_id < ''100''', 1) from dual
    ORA-03120: two-task conversion routine: integer overflow
    Now, I didn't install XSU again on this database. I believe that's pre-installed with 8.1.7. But do I need to install it on top? Or is there some other issue I am not aware of?
    Thanks in appreciation,
    NM
    null

    Steve,
    Thanks very much for replying. Here is the rub: I get this error for EVERY statement (involving XML etc) that is executed through SQL*Net. But on SQLPlus of the server the queries run just fine.
    I analyzed and found the following:
    *** On server SQLPLUS of 8.1.7 database:
    SQL> select xmlgen.getXML('select content_id from bc_content where content_id < ''1800''', 1) from dual ;
    XMLGEN.GETXML('SELECTCONTENT_IDFROMBC_CONTENTWHERECONTENT_ID<''1800''',1)
    <?xml version = '1.0'?>
    <!DOCTYPE ROWSET [
    <!ELEMENT ROWSET (ROW)*>
    <!ELEMENT RO
    ** On a client for the new 8.1.7 database (BTW We didn't upgrade the client)
    ORA-03120: two-task conversion routine: integer overflow
    Ora-3120 is a TWO-TASK error.
    Typically something is wrong for two-task errors with either
    (a) Database. Which is not the case. As we saw the query works when executed from server the query works!
    (b) Application Code: Which is not. As it works with the version of application talking to 8.1.6 database (which fails when filesize retrievd is big. Doesn't fail always)
    (c) Network (SQL*Net): And the error is HERE! That's why even though the query is executed on server we fail to execute it on a client.
    Our clients are on SQL*Net belonging to Oracle 8.1.6 as well. But we talk to an Oracle 8.1.7 server. Theoritically 8.1.6 client should work just fine with 8.1.7 server.
    Thanks very much again for replying,
    NM

  • ORA-00904 Error while running CMP EJB

    When I am running my CMP bean, I get following error,
    2006-07-02 09:58:17,171 DEBUG org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountBean#fi ndByAccountNumber] Executing SQL: SELECT t0_a.ACCOUNT.UOID FROM ACCOUNT t0_a WHERE (t0_a.ACCOUNT.ACCOUNT_NUMBER = ?)
    2006-07-02 09:58:17,250 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountBean#fi ndByAccountNumber] Find failed java.sql.SQLException:
    ORA- 00904: "T0_A"."ACCOUNT"."ACCOUNT_NUMBER": invalid identifier.
    Why is it giving invalide identifier? the length of this identifer is also less then 30 and there are no special characters being used in it.

    I think I have read that you cannot use the "." to navigate through the object, you can only use it for accessing a field of an object (i.e. a column of a table in the DB).
    So, never use more than 1 "." in your requests. In your case, I guess that you need to reformulate the request.

  • Render error while running interactive forms using ABAP

    Hi all,
       I am trying to create an adobe form using ABAP through SFP T-code. While I am trying to execute it, it is generating a Render Error. The error message is as follows:
    Exception       SYSTEM_ERROR
    Message ID:          FPRUNX                     Message number:           001
    Message:
    ADS: The render error log file has been written to D:\u(200101)
    But in the file, it is showing  'NO ERROR REPORT FOUND'.
    I have also tested by FP_PDF_TEST_00 program if the connection with the server is fine. It is showing it is fine. I have tested with JAVA code as well. It is also showing that connection is fine.
    I could'nt get the reason for the error. It would be great if anyone can help me in this issue.
    Thanks in advance.
    gopal

    Dear Gopal,
    please use the search function. This question has been answered many times here in the forum.
    Best regards,
    Dezso

Maybe you are looking for