ORA-01745 when running Explain Plan

Hello everybody,
I would like to know what is the best way to report a bug. In fact I believe just found one and I would like it fixed. I am using the latest version of SQLDeveloper on WinXP that uses its own JDK.
To replicate the bug it's very easy, just try to do an explain plan of the following query:
SELECT * FROM scott.emp
where empno = &&emp_nr;and the "*ORA-01745: invalid host/bind variable name*" error appears. Since the query executes properly, but the Explain plan errors out, I believe this could be a bug.
Thanks,
Paolo

Gary,
thanks a lot for your feedback.
I have found this weird behaviour, because I was trying to avoid another one. In fact I tried using the substitution variable syntax instead of the bind variable syntax in SQLDeveloper, especially to avoid the issues coming from automatic data conversions.
For example, if I run the following query using the bind variable syntax (passing SYSDATE as the parameter value):
SELECT *
   FROM scott.emp
  WHERE hiredate BETWEEN TRUNC(:p_eff_date,'yyyy')
                     AND TRUNC(add_months(:p_eff_date,12),'yyyy') - 1;it will go in error with "*ORA-00932: inconsistent datatypes: expected DATE got NUMBER*", because the filter predicate will be converted automatically as follows:
TRUNC(TO_NUMBER(:P_EFF_DATE),TO_NUMBER('yyyy'))<=TRUNC(ADD_MONTHS(:P_EFF_DATE,12),'fmyyyy')-1This behaviour is visible by running the explain plan on the above query. Isn't that TO_NUMBER(:P_EFF_DATE),TO_NUMBER('yyyy') a little bit too wrong? Note that the second occurrence of the P_EFF_DATE parameter does not get converted. Can't this "automatic conversion" behaviour be disabled somehow?
Due to this weird issue I tried to use the substitution variable syntax, but the main issue with the single ampersand is that you have to enter the value of the parameter as many times as the parameter is referenced in the query and you can imagine that with big queries written by other people this is not so easy.
Is there another way to pass parameters to a query in the SQL Worksheet? How can I "use literals rather than variables" as you suggest? Do you mean NOT using parameters at all?
Thanks,
Paolo

Similar Messages

  • What are the permissions needed to run explain plans via sql develeper?

    Are the permissions the same in Sql Developer to run explain plans like they are when you run them via sql*plus?

    Yes same permission because the explain plan does not tie to the tools.

  • Question about running explain plan

    I tried to run explain plan for a simple query, just to familiarize myself with how to do it. (I have another query that's taking a long time, and I've never run explain plan before). I got an error, googled it, and discovered I had to run the file at @%ORACLE_HOME%\rdbms\admin\utlxplan.sql first, to create the Plan_Table. Well, I tried to run that file and I get the error that I don't have priveleges on the tablespace. This really doesn't surprise me, as my access is read-only. Is there any way around this? I don't know a whole lot about databases, so forgive me if these following questions are dumb, but...
    1) is that file basically trying to create a table (called Plan_Table) within the schema I'm in (the only schema I have access to)?
    2) can my company's DBA run that file for me to create the Plan_Table?

    What version of the database are you on?
    You can get run-time execution plans from V$SQL_PLAN. You will need permission to read the V$ views. First find your query in V$SQL_PLAN (you can do a text search; putting a comment in like '--my_query' can help), then join to V$SQL_PLAN to find the query plan that that query used - join by the ADDRESS and HASH_VALUE columns.
    Otherwise, see if you can get insert/update/delete access on just that one table when your DBA creates it
    Good luck.

  • Running explain plan on a prepared statement

    I'm using IBatis to run queries against an Oracle database. IBatis runs the queries as prepared statements. I want to run explain plan on the prepared statements.
    I already have a shim -- a proxy java.sql.Connection object -- that takes the SQL used to create a prepared statement (e.g., "select a, b, c from table d where c = ?"), returns a proxy java.sql.PreparedStatement, and then on the PreparedStatement's execute(), interpolates the bound parameters into the SQL statement, and runs Explain Plan on that (e.g, preparedStatement.setInt(5) is called, followed by preparedStatement.execute(), which results in my proxy running "explain plan for select a, b, c from table d where c = 5;")
    Using Spring configuration, I can transparently insert the shim and get explain plans for all queries run through that Connection.
    The problem is this: I'm explaining the plan for the SQL with the bound parameters, not necessarily the SQL run for the prepared statement.
    Assume that in the above example, there exists an index on column c in table d, and that 5% of d's rows have the value 1, 15% have the value 2, and 80% have the value 3.
    For "select a, b, c from table d where c = 1", Oracle will use the index. But for "select a, b, c from table d where c = 3", Oracle will do a full table scan.
    What I want to know is what Oracle will do for "select a, b, c from table d where c = ?" when "?" is an unknown, arbitrary value subsequently bound to 1 or to 3.
    As I understand it, the query plan for a prepared statement is done once, when the prepared statement is created. At execute time (as I understand it), the query plan is not reformulated based on the actual bound values (though partition pruning is recalculated).
    So how can I find out what query plan is actually be used for prepred statement?
    Thanks.

    I already have a shim -- a proxy java.sql.Connection object -- that takes the SQL used to create a prepared statement I believe explain plan is part of PL/SQL rather than external to it.
    As such you can pass it via a prepared statement. It is just a matter of getting the syntax correct. And of course collecting the result.
    The syntax is going to be be something like the following. You would use it just like you use the existing sql.
    begin
       select ... from ... where c = ?;
    endThe result might be returned a result sets (plural). If so you would need to code appropriately for that.

  • Ora-3113 when running sql in sqlplus mts. dedicated works fine

    when i try to execute a simple query (return 1 row), from sqlplus (in the server database) by shared connection, i recive ora-3113. by dedicated conection it works fine. environment datas : server side (windows 2003 server; 10.2.0.1).
    part of my trace file :
    nsprecv: normal exit
    nsrdr: got NSPTDA packet
    nsrdr: NSPTDA flags: 0x40
    nsrdr: normal exit
    nsdo: entry
    nsdo: cid=0, opcode=85, bl=2001, what=0, uflgs=0x0, cflgs=0x1
    nsdo: nsctx: state=6, flg=0x620d, mvd=0
    nsdo: gtn=127, gtc=127, ptn=10, ptc=2011
    nserror: entry
    nsdo: error exit
    nsdo: nsctxrnk=0
    nsdo: error exit
    nioqer: entry
    nioqer: incoming err = 12151
    nioqce: entry
    nioqce: exit
    nioqer: returning err = 3113
    nioqer: exit
    nioqrc: exit
    nioqbr: entry
    nioqbr: state = normal (0)
    nioqsm: entry
    nioqsm: Sending break packet (1)...
    nsdo: entry
    nsdo: cid=0, opcode=67, bl=1, what=17, uflgs=0x100, cflgs=0x3
    nsdo: rank=64, nsctxrnk=0
    nsdo: nsctx: state=3, flg=0x420d, mvd=0
    nsdo: nsctxrnk=0
    nsdo: error exit
    nioqsm: send-break: failed to send break...
    nioqper: error from send-marker
    nioqper: nr err code: 0
    nioqper: ns main err code: 12583
    nioqper: ns (2) err code: 0
    nioqper: nt main err code: 0
    nioqper: nt (2) err code: 0
    nioqper: nt OS err code: 0
    nioqsm: exit
    nioqer: entry
    nioqer: incoming err = 12152
    nioqce: entry
    nioqce: exit
    nioqer: returning err = 3113
    nioqer: exit
    nioqbr: returning 3113
    nioqbr: exit
    nioqds: entry
    nioqds: disconnecting...
    thanks

    Thread continued at -->
    ora-3113 when running sql in sqlplus mts. dedicated works fine

  • Getting ora-0600 when running PROFLOAD.sql

    Hi,
    I was getting ORA-0600 when running PROFLOAD.sql script for DBMS_PROFILER (from SYS account). I am running Oracle 9i personal edition on win98. Did anybody had the same problem??

    Here is the full dump..
    QL> @profload
    Package created.
    Grant succeeded.
    Synonym created.
    create or replace library sys.dbms_profiler_lib wrapped
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [16201], [], [], [], [], [], [], []
    create or replace
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [16201], [], [], [], [], [], [], []
    Testing for correct installation
    PACKAGE BODY sys.DBMS_PROFILER - missing or invalid
    PL/SQL procedure successfully completed.

  • How to run Explain Plan for SP?

    Can we run Explain Plan for SP??

    EXPLAIN PLAN creates an execution plan for SQL statements. PL/SQL is not SQL.
    PL/SQL procedures can contain SQL, yes. These SQLs can be copied and pasted from PL/SQL into something like TOAD and execution plan determined.
    However, if the aim is to see the "execution/performance plan" for PL/SQL code, then you need to profile the PL/SQL code using the DBMS_PROFILER package. This will tell you the execution path and elapsed time to execute a line of PL/SQL.
    Details can be found in the [url http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_profil.htm#sthref5502]Oracle® Database PL/SQL Packages and Types Reference guide.

  • ORA-01438 occurred during "Explain plan"!

    Here is my query:
    SELECT
    rtrim(T1.col_id) Field0
    , count(T2.col_id) Field2
    , count(T3.col_id) Field3
    FROM SS.Table1 T1
    LEFT JOIN SS.Table2 T2
    ON (rtrim(T1.col_id) = rtrim(T2.col_id))
    LEFT JOIN SS.Table3 T3
    ON (rtrim(T1.col_id) = rtrim(T2.col_id))
    GROUP BY T1.col_id
    When I try to explain it plan I receive an error:
    "ORA-01438: value larger than specified precision allowed for this column"
    Can someone explain this?
    Thanks for the help in advance
    Regards,
    Beroetz

    Hi,
    Not sure how u r getting the explain plan...is it via a third party tool of SQLPLUS. Anyway by looking at the error it doesno tlook like there is a problem in explain plan.Did u run the script and check whether there is any error???There is a datatype error i guess.Please check ur script and the data in it.
    Regards
    Bharath

  • Invalid column name when executing explain plan

    SQL Developer version 4.0, SQL Worksheet, Windows 2000, Database 9.2.0.6.
    When attempted to run a explain plan on a simple two table join query, it generates error invalid column name. Removed aliases and simplify query to one table row count, and still get the same error. Even tried the schema owner and got the same error.
    I decided to check the explain plan table and found out that it was from an older version. Recreated the explain plan table and was able to run the explain plan.
    I'm just posting this in the event somebody else runs into the same problem.

    This was fixed in the 4.1 or 1215 build. Please update by downloading or check for updates.
    -thanks
    kris

  • How does SQL Developer run EXPLAIN PLAN?

    Hello,
    I noticed that SQL Developer can do an EXPLAIN PLAN even though I don't have a PLAN_TABLE available for the user that I use to connect in SQL Developer.
    I was always wondering whether there was a way to do an EXPLAIN PLAN without a PLAN_TABLE, apparently this seems to be possible.
    Thomas

    If I try an explain plan when I do not have a plan table available, I get the message "A PLAN_TABLE is required to access the explain plan, but it does not exist. Do you want to create a PLAN_TABLE?". Unfortunately, as that user does not have create table privs, if I say Yes I get the following error "ORA-01031: insufficient privileges".
    Given this, if you are doing an explain plan, you either have access to a plan table or you have create table privs and SQL Developer has created the plan table for you.

  • WEBUTIL: ora-305501 when running howto_ole.html

    When running OTN demo file http://otn.oracle.com/products/forms/htdocs/webutil/howto_ole.html Word gets open and text replaced but SaveAs command is not executed. Instead. Error ora-305501 is displayed in the forms status bar.
    I have only changed the name of the file to open.
    This is my code from OTN demo:
    DECLARE
    app CLIENT_OLE2.OBJ_TYPE;
    docs CLIENT_OLE2.OBJ_TYPE;
    doc CLIENT_OLE2.OBJ_TYPE;
    selection CLIENT_OLE2.OBJ_TYPE;
    args CLIENT_OLE2.LIST_TYPE;
    BEGIN
    -- create a new document
    app := CLIENT_OLE2.CREATE_OBJ('Word.Application');
    CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
    docs := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Documents');
    doc := CLIENT_OLE2.INVOKE_OBJ(docs, 'add');
    selection := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Selection');
    -- insert data into new document from long item
    CLIENT_OLE2.SET_PROPERTY(selection, 'Text', 'Texto añadido');
    -- save document as example.doc
    args := OLE2.CREATE_ARGLIST;
    CLIENT_OLE2.ADD_ARG(args, 'c:\pepe.doc');
    CLIENT_OLE2.INVOKE(doc, 'SaveAs', args);
    CLIENT_OLE2.DESTROY_ARGLIST(args);
    -- close example.doc
    args := CLIENT_OLE2.CREATE_ARGLIST;
    CLIENT_OLE2.ADD_ARG(args, 0);
    CLIENT_OLE2.INVOKE(doc, 'Close', args);
    CLIENT_OLE2.DESTROY_ARGLIST(args);
    CLIENT_OLE2.RELEASE_OBJ(selection);
    CLIENT_OLE2.RELEASE_OBJ(doc);
    CLIENT_OLE2.RELEASE_OBJ(docs);
    -- exit MSWord
    CLIENT_OLE2.INVOKE(app,'Quit');
    exception
    when others then
    message(sqlcode);
    message(sqlerrm);
    message('Ha habido un error');
    END;

    This is the output I have got in my Java Console.
    I hope this will help you.
    JInitiator: Versión 1.3.1.9
    Usar versión JRE 1.3.1.9 Java HotSpot(TM) Client VM
    Directorio local del usuario = C:\Documents and Settings\lobato
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    RegisterWebUtil - Loading Webutil Version 1.0.2 Beta
    connectMode=HTTP, native.
    La versión del applet Forms es: 902110
    2003-ago-29 08:19:04.772 WUI[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2003-ago-29 08:19:04.782 WUI[VBeanCommon.getIPAddress()] 192.168.0.58
    2003-ago-29 08:19:04.802 WUF[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2003-ago-29 08:19:04.812 WUF[VBeanCommon.getIPAddress()] 192.168.0.58
    2003-ago-29 08:19:04.832 WUH[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2003-ago-29 08:19:04.842 WUH[VBeanCommon.getIPAddress()] 192.168.0.58
    2003-ago-29 08:19:04.862 WUS[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2003-ago-29 08:19:04.872 WUS[VBeanCommon.getIPAddress()] 192.168.0.58
    2003-ago-29 08:19:04.882 WUT[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2003-ago-29 08:19:04.902 WUT[VBeanCommon.getIPAddress()] 192.168.0.58
    2003-ago-29 08:19:04.922 WUO[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2003-ago-29 08:19:04.932 WUO[VBeanCommon.getIPAddress()] 192.168.0.58
    2003-ago-29 08:19:04.952 WUL[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2003-ago-29 08:19:04.962 WUL[VBeanCommon.getIPAddress()] 192.168.0.58
    2003-ago-29 08:19:04.972 WUB[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2003-ago-29 08:19:04.992 WUB[VBeanCommon.getIPAddress()] 192.168.0.58
    2003-ago-29 08:19:20.224 WUT[setProperty()] Setting property WUC_GET_LOCAL_PROPERTY to syslib.jacob.dll
    2003-ago-29 08:19:20.254 WUT[getProperty()] Getting property WUC_GET_LOCAL_PROPERTY
    2003-ago-29 08:19:20.284 WUT[loadSettings()] Local properties file loaded
    2003-ago-29 08:19:20.294 WUT[getProperty()] Value of WUC_GET_LOCAL_PROPERTY=1.0
    2003-ago-29 08:19:20.315 WUT[setProperty()] Setting property WUC_GET_LOCAL_PROPERTY to syslib.JNIsharedstubs.dll
    2003-ago-29 08:19:20.335 WUT[getProperty()] Getting property WUC_GET_LOCAL_PROPERTY
    2003-ago-29 08:19:20.345 WUT[getProperty()] Value of WUC_GET_LOCAL_PROPERTY=1.0
    2003-ago-29 08:19:20.365 WUT[setProperty()] Setting property WUC_GET_LOCAL_PROPERTY to syslib.d2kwut60.dll
    2003-ago-29 08:19:20.385 WUT[getProperty()] Getting property WUC_GET_LOCAL_PROPERTY
    2003-ago-29 08:19:20.395 WUT[getProperty()] Value of WUC_GET_LOCAL_PROPERTY=1.0
    2003-ago-29 08:19:26.23 WUO[setProperty()] Setting property WUO_OLE2_OBJNAME to Word.Application
    2003-ago-29 08:19:26.43 WUO[getProperty()] Getting property WUO_OLE2_CREATE_OBJ
    2003-ago-29 08:19:28.196 WUO[getProperty()] Value of WUO_OLE2_CREATE_OBJ=1
    2003-ago-29 08:19:28.216 WUO[setProperty()] Setting property WUO_OLE2_HANDLE to 1
    2003-ago-29 08:19:28.266 WUO[setProperty()] Setting property WUO_OLE2_PROPNAME to Visible
    2003-ago-29 08:19:28.286 WUO[setProperty()] Setting property WUO_OLE2_SET_PROPERTY to N1
    2003-ago-29 08:19:28.556 WUO[setProperty()] Setting property WUO_OLE2_HANDLE to 1
    2003-ago-29 08:19:28.707 WUO[setProperty()] Setting property WUO_OLE2_PROPNAME to Documents
    2003-ago-29 08:19:28.727 WUO[getProperty()] Getting property WUO_OLE2_GET_OBJ_PROPERTY
    2003-ago-29 08:19:28.767 WUO[getProperty()] Value of WUO_OLE2_GET_OBJ_PROPERTY=2
    2003-ago-29 08:19:28.787 WUO[getProperty()] Getting property WUO_OLE2_CREATE_ARGLIST
    2003-ago-29 08:19:28.787 WUO[getProperty()] Value of WUO_OLE2_CREATE_ARGLIST=3
    2003-ago-29 08:19:28.807 WUO[setProperty()] Setting property WUO_OLE2_HANDLE to 3
    2003-ago-29 08:19:28.827 WUO[setProperty()] Setting property WUO_OLE2_HANDLE to 2
    2003-ago-29 08:19:28.837 WUO[setProperty()] Setting property WUO_OLE2_PROPNAME to add
    2003-ago-29 08:19:28.857 WUO[getProperty()] Getting property WUO_OLE2_INVOKE_OBJ
    2003-ago-29 08:19:29.908 WUO[getProperty()] Value of WUO_OLE2_INVOKE_OBJ=4
    2003-ago-29 08:19:29.928 WUO[setProperty()] Setting property WUO_OLE2_HANDLE to 1
    2003-ago-29 08:19:29.978 WUO[setProperty()] Setting property WUO_OLE2_PROPNAME to Selection
    2003-ago-29 08:19:29.998 WUO[getProperty()] Getting property WUO_OLE2_GET_OBJ_PROPERTY
    2003-ago-29 08:19:30.49 WUO[getProperty()] Value of WUO_OLE2_GET_OBJ_PROPERTY=5
    2003-ago-29 08:19:30.59 WUO[setProperty()] Setting property WUO_OLE2_HANDLE to 5
    2003-ago-29 08:19:30.79 WUO[setProperty()] Setting property WUO_OLE2_PROPNAME to Text
    2003-ago-29 08:19:30.99 WUO[setProperty()] Setting property WUO_OLE2_SET_PROPERTY to STexto añadido

  • ORA -04062 when running forms aginst a different schema

    Hello,
    I am getting this error (ORA -04062 signature of 'procedure' has been changed)when I try to run my form aginst my test- schema (different from my development schema). I get rid of the error if I compile the form against the test schema. In the production environment I have to run this form against multiple schemas, so recompilation is not a possible solution.
    Has anybody else come across this problem.
    null

    Thanks John for your reply !
    I think my problem is close to the second thing you mention as a possible cause. I found out that I had used a parameter of type table%ROWTYPE in call to a pacakged procedure. When I defined a "TYPE MyRec IS RECORD" record type in my pacakge specification and used that as the type for the parameter my form seems to work against my test schema without recompilation. Unfortunately the table is pretty large so my package specification does not look so neat anymore. And I lost the dynamics associated with the %ROWTYPE attribute.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by John Alexander ([email protected]):
    That's a well-known bug. Its worse with a v7 database, but still can occur with 8/8i.
    A couple of things to look for:
    1) REMOTE_DEPENDENCIES_MODE is SIGNATURE instead of TIMESTAMP in init.ora.
    2) Forms that call stored procedures with a large parameter list (about 55 or more) can get a run-time error ORA-4062 if running on a different schema than where it was compiled.
    3) You can also hit a snag if you are calling a dbms_XX package within the form. Instead, call it within a db procedure, which you can call from the form.
    John Alexander
    St. Petersburg, FL www.SummitSoftwareDesign.com <HR></BLOCKQUOTE>
    null

  • ORA-01816 when running with Oracle Instant Client

    good morning
    we are running the same SQL script on 2 computers.
    - native system with DB
    - via Oracle Instant client
    when running via the instant client i get the following error.
    ( select to_char(to_date('1970-01-01') + "DATE" / 86400000, 'YYYY-MM-DD') "CD", logical_name
    ERROR at line 2:
    ORA-01861: literal does not match format string
    thanks for any hint

    It probably works on one and not the other because you have set the NLS_DATE_FORMAT for one system to match the format of the string you are passing in, so Oracle knows how to do the implicit conversion.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Runtime error ora-12703 when running utl_mail

    hello,
    I call a procedure through push button to use UTL_MAIL.send(..) and I got error ora-12703.
    There is no error during compilation.
    For your info, I manage to execute the same code on stored procedure using TOAD and I received the email sent using TOAD and telnet from my local.
    For info:
    Forms developer version:
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    procedure:
    PROCEDURE test_email IS
    BEGIN
    UTL_MAIL.send (
    sender => '[email protected]',
    recipients => '[email protected]',
    cc => '[email protected]',
    bcc => '[email protected]',
    subject => 'Test',
    MESSAGE => 'Hello World',
    mime_type => 'text; charset=us-ascii',
    priority => 3
    END;
    Could anyone please help me on this.
    Regards,
    Dayang

    Hi All,
    I tried another function that use utl_smtp to send email.
    Again I could recieve email when I execute the function in TOAD but got error ora-12703 when I ran using forms.
    When I ran the form, only "debug 1st" apear, then after that it returned error ora-12703.
    Function:
    FUNCTION SEND_MAIL
    (pIssuer IN VARCHAR2,
    pReceiver IN VARCHAR2,
    pSender IN VARCHAR2,
    pSubject IN VARCHAR2,
    pMessage IN VARCHAR2) RETURN VARCHAR2 IS
    c utl_smtp.connection;
    respuesta utl_smtp.reply;
    pServer VARCHAR2(50) := '10.0.3.79';
    CRLF CHAR(2) := CHR(13) || CHR(10);
    BEGIN
    message('debug 1st');
    -- Abre la conexión al Server de correo
    c := utl_smtp.open_connection(pServer);
    message('debug2nd');
    respuesta := utl_smtp.helo(c, pServer);
    -- Inicia el Issuer del correo.
    respuesta := utl_smtp.mail(c, pSender);
    -- Inicia el Receiver
    respuesta := utl_smtp.rcpt(c, pReceiver);
    respuesta := utl_smtp.open_data(c);
    -- Escribe la cabecera del e-mail
    utl_smtp.write_data(c, 'From: ' || pIssuer || CRLF);
    utl_smtp.write_data(c, 'To: ' || pReceiver || CRLF);
    -- Escribe el Subject
    utl_smtp.write_data(c, 'Subject: ' || pSubject || CRLF);
    -- Escribe el texto del Message.
    utl_smtp.write_data(c, CRLF || pMessage);
    utl_smtp.write_data(c, CRLF || '.');
    respuesta := utl_smtp.close_data(c);
    -- Cierra la conexión
    respuesta := utl_smtp.quit(c);
    RETURN '0';
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    utl_smtp.quit(c);
    RETURN sqlerrm;
    --raise_application_error(-20000,
    -- 'El envío del email ha fallado devolviendo el siguiente error: ' || sqlerrm);
    END;
    Regards,
    Dayang

  • ORA-44356 when running report from Oracle Application Server 10g

    All,
    We have some reports that we developed using Reports Builder 10g. We use a few program units that run with every record that use the exec_sql package to run dynamic sql in a remote database. Everything runs fine when we test the reports in Reports Builder. After we compile the reports into the .rep format and place them on our Oracle Application Server 10g portal instance, we are running into the subject error when we try to run the report from the website. From the research that I've done, it seems that this error has to do with the use of exec_sql, but there is not too much info on the web regarding this error number. Running a trace when running the report in Reports Builder doesn't show any errors, and to further complicate things, this error only occurs on some reports...others that use the exec_sql package work fine.
    Does anyone have any ideas as to why this might be happening?
    Thanks for your help,
    Tom

    Nothing is different between the reports in the exec_sql section. The strange part is that the reports will bomb out seemingly at random, at different times, and during the execution of different program units. I was able to find a work-around using DB Links, but I'd rather not use the DB Link if I can avoid it.

Maybe you are looking for

  • How can i use two iPads to play a different AU-Instrument for each Pad at the same time via WLAN?

    We have two iPads connected to the MacBook with two different Midi-Sessions. Now we want to connect the every Session to a single AU-Instrument to record live but don´t get it right. In Cubase we just had to choose the Sessions as Midi-Input. (Sorry

  • Purchase order price.

    We have 1 purchase order created. In purchase order there only 1 line item without  material no. Item category is K. In the po print preview   there is no price  i can view for tax and for total value. Price is entered in the po is manual. Goods of t

  • Custom KM Reports: parameter's labels translation

    Hi folks, we are facing a problem about custom KM reports development. Currently we have developed one new report according Thilo's how to guide and according the code of a standard one. The report seems works fine, but we are not able to translate i

  • Article Master--Sales view--Problem

    Hi I have 2 Purchasing orgs say 1000 and 2000 I am creating a vendor for purchase org 1000 say Vendor 1 I am creating an article with all views and with  purchase org 1000 and Vendor 1 in purchasing view with condition PB00 maintained In my sales vie

  • Width of Bar graph

    Hello, I need to adjust the actual width of the bar graph. (The bars itself). The only property i see is the Display width and when i change it the whole graph width changes and not the bars within them.Is there any option to do this? Thanks