Encounter ORA-01002 when calling OCIStmtFetch2 to fetch blob data

Oracle Version:Release 10.2.0.1.0
Description:
We use these two functions to fetch the content of blob field dynamically in batch mode:
OCIDefineByPos(OCI_DYNAMIC_FETCH)
OCIDefineDynamic(callbackfun->cbf_get_data)
We allocate fixed memory to fetch data in order to using compact memory.
If the size of blob to be fetched is larger than the allocated memory size, the fetch can not be done in one call, which need to be interrupted.
Those records would remain in cache and can only be fetched until calling OCIStmtFetch2 next time.
The callback function:cbf_get_data, achieves this by returning OCI_ROWCBK_DONE, which marks current fetch interrupted.
It would not return OCI_CONTINUE, because OCI_CONTINUE can not interrupt current fetch procedure in time.
We made a sample code test, and found this logic only works when fetching small rows (nearly 800 rows). Exceptions occurred when fetching more rows(>=1000 rows).
For example, among these 2 cases,
1.(OCIStmtFetch2(m_stmthp,m_errhp,(ub4)800,OCI_FETCH_NEXT,(sb4)OCI_FETCH_RELATIVE,OCI_DEFAULT)
2.(OCIStmtFetch2(m_stmthp,m_errhp,(ub4)1000,OCI_FETCH_NEXT,(sb4)OCI_FETCH_RELATIVE,OCI_DEFAULT)
only the 1st one work, but the 2nd.
After function cbf_get_data returns OCI_ROWCBK_DONE, calling OCIStmtFetch2 did not enter into callback function cbf_get_data.
And OCIErrorGet showed such error:
ORA-01002: fetch out of sequence
the total number of result set is about 100,000.
We tried to set PREFETCH to a larger value in this way::
OCIAttrSet(m_stmthp,OCI_HTYPE_STMT,(dvoid *)&rnum,0,OCI_ATTR_PREFETCH_ROWS,m_errhp);
rtn=OCIAttrSet((dvoid *)m_stmthp, (ub4) OCI_HTYPE_STMT,(dvoid *)&preFetch, (ub4)sizeof(preFetch), OCI_ATTR_PREFETCH_MEMORY,m_errhp);
but it did not help.
Waiting for you guidance.
Thanks in advance!
-Andy
Edited by: Andy Tong on 2010-10-22 上午12:29

Here is our testing Code:
#include "oci.h"
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#pragma comment(lib,"oci.lib")
char buf1[5000];
char buf2[5000];
long datalen=5000;
ub4 outpos=1;
ub4 outpos2=2;
int sum=0;
int sum2=0;
OCIError *m_errhp;
OCIStmt *m_stmthp;
char      LOBBuf[8006];
long      LOBLen=8006;
long     gindpp=0;
ub2     grcpp=0;
#define MAX_ROW_NUM 56338
/* Fetch callback to specify buffers. */
sb4 cbf_get_data(     dvoid*          ctxp,
                         OCIDefine*     dfnhp,
                         ub4               iter,
                         dvoid**          bufpp,
                         ub4**          alenpp,
                         ub1*          piecep,
                         dvoid**          indpp,
                         ub2**          rcpp)
     if(iter==0)
          sum=0;
     else if(iter>=858) //857 exception
          //LOBBuf,LOBLen
          //     sum+=LOBLen;
          //     if(sum>1057552-100*1024)
          sum=0;
          bufpp=(dvoid)0;
          alenpp=(ub4)0;
          *piecep = (ub1)OCI_ONE_PIECE;
          indpp = (dvoid ) 0;
          rcpp     = (ub2 ) 0;
          return(OCI_ROWCBK_DONE);     
     LOBLen=8006;
     bufpp=(dvoid)LOBBuf;
     alenpp=(ub4)&LOBLen;
     *piecep = (ub1)OCI_ONE_PIECE;
     indpp = (dvoid )&gindpp;
     rcpp     = (ub2 )&grcpp;
     return(OCI_CONTINUE);     
BOOL CTest_ociApp::InitInstance()
     OCIEnv *          m_envhp;
     OCIServer *          m_srvhp;
     OCISvcCtx *          m_svchp;
     sword               rtn;
     char               sqlState[256];
     int               nativeErr;
     char               errTxt[256];
     unsigned long          bufLen=256;
     OCIDefine hDefine =  (OCIDefine ) 0;
     OCIDefine hDefine1 = (OCIDefine ) 0;
     OCIDefine hDefine2 = (OCIDefine ) 0;
     OCIDefine hDefine3 = (OCIDefine ) 0;
     OCIDefine hDefine4 = (OCIDefine ) 0;
     int i;
     OCILobLocator** lob_array;
     char username[255];
     char password[30];
     char dbname[30];
     char szSqlStr[255];
     ub4 preFetch= 10*1024*16;
     strcpy(username,"dlg25w");
     strcpy(password,"sa");
     strcpy(dbname,"WIN10G");
     OCIEnvCreate(&m_envhp, OCI_DEFAULT | OCI_OBJECT, 0, 0, 0, 0, 0, 0);
     OCIHandleAlloc( (dvoid *)m_envhp, (dvoid **)&m_errhp,OCI_HTYPE_ERROR,(size_t) 0, (dvoid **) 0);
     OCIHandleAlloc( (dvoid *)m_envhp, (dvoid **)&m_srvhp,OCI_HTYPE_SERVER,(size_t) 0, (dvoid **) 0);
     OCIHandleAlloc( (dvoid *)m_envhp, (dvoid **)&m_svchp,OCI_HTYPE_SVCCTX,(size_t) 0, (dvoid **) 0);
     OCIHandleAlloc( (dvoid *)m_envhp, (dvoid **)&m_stmthp,OCI_HTYPE_STMT,(size_t) 0, (dvoid **)0);
     OCIServerAttach(m_srvhp, m_errhp,(text *)dbname, strlen(dbname),(ub4) OCI_DEFAULT);
     OCILogon(m_envhp,m_errhp,&m_svchp,(text *)username,strlen(username),(text *)password,strlen(password),(text *)dbname,strlen(dbname));
     ub4     rnum=0;
     unsigned int len=0;
     //rtn=OCIAttrGet(m_envhp,OCI_HTYPE_ENV,(dvoid *)&rnum,&len,OCI_ATTR_CACHE_MAX_SIZE,m_errhp);
     OCIErrorGet((dvoid *) m_errhp,(ub4)1,(OraText *)sqlState,&nativeErr,(unsigned char*)errTxt,bufLen,(ub4) OCI_HTYPE_ERROR);
     len=4;
     rnum=83886080;
     rtn=OCIAttrSet(m_envhp,OCI_HTYPE_ENV,(dvoid *)&rnum,len,OCI_ATTR_CACHE_OPT_SIZE,m_errhp);
     rtn=OCIAttrGet(m_envhp,OCI_HTYPE_ENV,(dvoid *)&rnum,&len,OCI_ATTR_CACHE_OPT_SIZE,m_errhp);
     OCIErrorGet((dvoid *) m_errhp,(ub4)1,(OraText *)sqlState,&nativeErr,(unsigned char*)errTxt,bufLen,(ub4) OCI_HTYPE_ERROR);
     rnum=2000;
     sprintf( szSqlStr,"%s", "SELECT DATA FROM MF4");
     OCIStmtPrepare(m_stmthp, m_errhp, (text*)szSqlStr, (ub4)strlen(szSqlStr),(ub4) OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT);
OCIAttrSet(m_stmthp,OCI_HTYPE_STMT,(dvoid *)&rnum,0,OCI_ATTR_PREFETCH_ROWS,m_errhp);
     /* initialize array of locators */
     OCIDefineByPos(m_stmthp, &hDefine2, m_errhp, (ub4)1,(dvoid *)0,(sb4)8006,SQLT_BIN,(dvoid *)0, (ub2 *)0, (ub2 *)0,(ub4) OCI_DYNAMIC_FETCH);//OCI_DYNAMIC_FETCH
     OCIDefineDynamic(hDefine2, m_errhp, (dvoid *)&outpos,(OCICallbackDefine)cbf_get_data);
     OCIStmtExecute(m_svchp, m_stmthp, m_errhp,(ub4)0, (ub4) 0,(const OCISnapshot*) 0,
          (OCISnapshot*)0,(ub4)OCI_DEFAULT);//OCI_STMT_SCROLLABLE_READONLY
     rtn=OCIAttrSet((dvoid *)m_stmthp, (ub4) OCI_HTYPE_STMT,(dvoid *)&preFetch, (ub4)sizeof(preFetch), OCI_ATTR_PREFETCH_MEMORY,m_errhp);
     while(1)
          rtn=OCIStmtFetch2(m_stmthp,m_errhp,(ub4)1000,OCI_FETCH_NEXT,(sb4)OCI_FETCH_RELATIVE,OCI_DEFAULT);
          OCIErrorGet((dvoid *) m_errhp,(ub4)1,(OraText *)sqlState,&nativeErr,(unsigned char*)errTxt,bufLen,(ub4) OCI_HTYPE_ERROR);
          if(rtn==OCI_NO_DATA)
               break;
          else
     t0=GetTickCount()-t0;
     t0=0;
     OCIAttrGet((CONST void *)m_stmthp,OCI_HTYPE_STMT,(void *)&rows_fetched,(ub4 *)sizeof(rows_fetched),OCI_ATTR_ROW_COUNT ,m_errhp);
     printf("\n Total number of records:%d",rows_fetched);
     OCILogoff( m_svchp, m_errhp );
     OCIServerDetach( m_srvhp, m_errhp, OCI_DEFAULT );
     OCIHandleFree((dvoid *) m_stmthp, OCI_HTYPE_STMT);
     OCIHandleFree((dvoid *) m_svchp, OCI_HTYPE_SVCCTX);
     OCIHandleFree((dvoid *) m_srvhp, OCI_HTYPE_SERVER);
     OCIHandleFree((dvoid *) m_errhp, OCI_HTYPE_ERROR);
     getchar();
     return FALSE;
}

Similar Messages

  • I get Ora-00600 when I try to fetch large data via Xml

    Hi all
    I user Oracle8i ver 8.1.6, when I execute the following
    procedure:
    PROCEDURE TTG_EXEC_SQL (SELECT_STATMENT in VarChar2, Result Out
    Clob, err_no Out Number) IS
    -- This Procedure excutes SELECT command and return the result
    data throw Xml CLOB parameter.
    QueryCtx DBMS_XMLquery.CtxType;
    ErrorNum NUMBER;
    ErrorMsg VARCHAR2(200);
    RES1 CLOB;
    Begin
    QueryCtx := DBMS_XMLQuery.NewContext( Select_Statment );
    DBMS_XMLQuery.setRaiseException(QueryCtx, true);
    DBMS_XMLQuery.setRaiseNoRowsException(QueryCtx, true);
    DBMS_XMLQuery.propagateOriginalException(QueryCtx,true);
    ResULT := DBMS_XMLQuery.getXML(QueryCtx);
    DBMS_XMLQuery.CloseContext(QueryCtx);
    Exception
    when others then
    DBMS_XMLQuery.getExceptionContent (QueryCtx,ErrorNum,
    ErrorMsg);
    ERR_NO := NVL(ErrorNum,0);
    END;
    I get Ora-00600 error when the retrived data is more than 800
    records.
    can any one help me Pls ASAP.
    THNX
    Husam

    Can you get the query result with SQL command alone?

  • ORA-23421 when calling dbms_defer_sys.schedule_purge

    Hi all,
    did anyone experience ORA-23421 when calling dbms_defer_sys.schedule_purge?
    for settimg up an updatable materialized view replication between two Oracle 9.2 databases, I followed the steps detailed in "Oracle9i Replication Management API Reference" and when calling
    DBMS_DEFER_SYS.SCHEDULE_PURGE (
    next_date => SYSDATE,
    interval => 'SYSDATE + 1/24',
    delay_seconds => 0,
    rollback_segment => '');
    on the materialized view site, I get the error ORA-23421, telling me, that job number 48 is not a job in the job queue.
    Do you have any idea, what's going wrong?
    Thanks for your assistance
    Siegfried Hartung

    The answer could be found at http://www.orafaq.com/forum/t/66106/0/
    From a previous run of the initialization scripts another user owned the job, that was adressed. The issue was resolved by changing the script in order to use the old userid (snapadmin instead of mvadmin).

  • ERROR (ORA-01002)  when Ioading a table by UPDATE/INSERT

    I get the error message ORA-01002 ( Fetch out of sequence ) when I am loading a table by UPDATE/INSERT.
    At de Runtime Audit Viewer the process of loading update a number of register, in that case 44.050 and to the left register I get the error message that I show above.

    Can you please give us some details about your source and targets. I have used UPDATE/INSERT but I did not get this kind of error.
    rgds
    -AP

  • FRM-40735 / ORA-06508 when calling an attached package's procedure

    Hello all,
    I've a problem when calling a procedure in one of my attached libraries. the code is :
    when upper(trim(NOT_MSG_NAME)) = 'REN_MSG_REQ_REG_PERMENANT' then SERV.CLFRM_PBL_NRQP_F(:Parameter.NOTIFICATION_ID);
    and it gives me FRM-40735 stating that an ORA-06508 has occurred when calling the procedure.
    Important and funny thing is, when I add the path to the library , It works fine!
    When I attach it, removing the path, It goes wrong like I said..
    the location of the library is:D:\DevSuiteHome\cgenf61\ADMIN , the path is added in FORMS_PATH and all the other
    libraries attached to the form in the same path are working fine !
    I'm using forms builder 10.1.2.0.2, and the platform is windows and I've migrated from forms 9.0.4.0.19
    anybody having any ideas what the problem may be?

    Thank you Sarah
    In fact, somebody had modified the formsweb.cfg adding two working directory directives (It's a shared PC!). I recon none of them works though no configuration error is raised. I omitted both of them and the problem is gone .
    thank you again.

  • Encount Ora-29534 when loadjava xmlparserv2.jar

    I encounted ora-29534 error message when I tried to load xml pl/sql parser using the following command:
    % loadjava -user scott/tiger -r -v xmlparserv2.jar
    Environment: Oracle8.1.5
    windows nt sp4
    jdk1.1.8
    What causes this problem and how to resolve it?
    Thanks!
    Allen

    Got the problem sorted out. Apparently it was because I had Oracle 8.1.5 which used Java 1.1.7, whereas the version of xmlparserv2.jar I had was compiled using a more recent version of Java.
    Migrated to Oracle 8.1.7, and that solved the problem.

  • ORA-02074 when calling proc from VB

    Anyone have any idea why a stored procedure that sets a savepoint will fail with
    [Oracle][ODBC][Ora]ORA-02074: cannot ROLLBACK in a distributed transaction
    ORA-02074: cannot SET SAVEPOINT in a distributed transaction
    ORA-06512: at "PIPS_ADMIN.PKG_ACAS_COMMON", line 1098
    ORA-06512: at line 1
    when called from Visual Basic via an ADO connection through ODBC BUT
    will succeed when called from SQL*Plus or TOAD or other tool.
    Any ideas appreciated.
    Mike

    The change was only made to a local variable in a function that was called from the original function that got the parameters from the java client.
    I changed it from localtimestamp to systimestamp and it works fine.
    Do i have to make any settings about the time zone in the jdbc thin client ?

  • ORA-01804 when calling function from java client

    Hi All,
    we changed a PL/SQL-function that is called from a java client from using sysdate to localtimestamp. The function works fine in TOAD, but when called from the java client ist throws an ora-01804: failure to initialize timezone information.
    Any suggestions?
    Alexander

    The change was only made to a local variable in a function that was called from the original function that got the parameters from the java client.
    I changed it from localtimestamp to systimestamp and it works fine.
    Do i have to make any settings about the time zone in the jdbc thin client ?

  • FRM-40735 with ORA-105100 when calling JavaBean in Forms6i deployed to Web

    We are encountering an ORA_JAVA error during runtime in a new simple form when trying to call an imported JavaBean in Forms 6i.
    It works when in the Forms6i Builder Run Form Client/Server mode on Linux/Motif.
    The specific error is: FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-105100
    Our form incorporates the following simple example from Metalink Note:131964.1
    How to Create a Simple Java program with the ORA_JAVA Package of Forms?
    We have confirmed that we are downloading our custom JavaDev6i.jar file in the JInitiator console during runtime when deployed on the Forms Server using sockets.
    We have turned on Forms Runtime Diagnostics (FRD), which showed the following
    ORA_JAVA.LAST_ERROR: 121
    when attempting to execute the call to the JavaBean.
    I also ran strace on the forms processes:
    strace -o/tmp/f60srvm_trc.txt -afeT -p 21192 &
    strace -o/tmp/f60webmx_trc.txt -afeT -p 9172 &
    I found libjvm.so could not be found in the LD_LIBRARY_PATH,
    so I changed /d01/oracle/visappl/admin/adovars.env from:
    LD_LIBRARY_PATH=$ORACLE_HOME/network/jre11/lib/i686/native_threads:$ORACLE_HOME/network/jre11/lib/linux/native_threads:${LD_LIBRARY_PATH:=}
    to
    JDK131_HOME=/usr/java/jdk1.3.1_20
    export JDK131_HOME
    LD_LIBRARY_PATH=$JDK131_HOME/lib/i386:$JDK131_HOME/jre/lib/i386:$JDK131_HOME/jre/lib/i386/classic:$JDK131_HOME/jre/lib/i386/native_threads:${LD_LIBRARY_PATH:=}
    This solved that library problem, but it did not fix the original problem of not being able to run a JavaBean in a deployed Form.
    I've provided our environment below from txkMPcheck.sh, but please let me know what else you need to help us with this.
    Technology Validation Utility report for 11.5.9 Maintenance Pack (some info deleted to fit in forum 3.5K limit)
    Script : ./txkMPcheck.sh (115.20)
    Context : /d01/oracle/visappl/admin/VIS_hpbox.xml
    HTTP Server Node (hpbox):
    [PASS] Oracle JInitiator version from the Applications Context file is: 1.1.8.16
    [PASS] JDK version on HTTP server node is: 1.3.1_20
    [PASS] iAS version from the Applications Context file is: ias1022
    [PASS] iAS patchset version from the OUI inventory is: 1.3.19.0.0g
    [PASS] PERL is included in the PATH variable from the APPLSYS.env file.
    [PASS] DISPLAY variable from the Applications Context file is: :0.0
    Forms Server Node (hpbox):
    [PASS] Developer 6i version from f60gen executable is: 6.0.8.21.3
    [PASS] The 806 client library version from the f60gen executable is: 8.0.6.3.0
    [PASS] Checksum of file kpuex.o confirms back port 1227566 has been applied.
    [PASS] DISPLAY variable from the Applications Context file is: :0.0
    Administration Server Node (hpbox):
    [PASS] Database version from dbms_utility is: 9.2.0.3.0
    SUMMARY:
    [ALLPASS] All the technology checks on this node needed for the 11.5.9 Maintenance Pack
    have passed. You may now proceed with next steps in the Oracle
    Applications Release 11.5.9 Maintenance Pack Installation instructions.
    More env info...
    Oracle (Red Hat) Enterprise Linux Rel 4 Upd 6 (uname: 2.6.9-67.0.0.0.1.ELsmp #1 SMP)
    Forms6i Builder 6.0.8.21.3 (Production) (on Linux)
    Already posted this to Metalink forum, but no answer in 1 week.
    Thanks for your help!

    Looks like the CLASSPATH for the server is not set correctly. Does it include the directory where your JAR file resides?
    You say that the JavaDev6i.jar is downloaded the the JInitiator, which surprises me. It looks like you are trying to import/call Java from the server side, which means it is not necessary to load the JAR client side. You only have to include it in the client side JARs if you are using Pluggable Java Components (PJC) which run client side. You are using the Java Importer which creates a PL/SQL wrapper around a server side Java class.
    This might also explain why it does work in client/server mode. Then you might have a different CLASSPATH setup when starting Forms Runtime from within Forms Builder.

  • ORA-06502 when calling from a procedure

    HI,
    I have a procedure(p1) inside a package that queries a table and send out the result based on the input paramater value. OUT variable is of same type as the table column(using %type), column size is varchar2(4000). This procedure is called from another procedure(p2) and sends out the result to Java Page to display the results at front-end.
    Problem is when application runs and p1 is called I get the following error message,
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Length/size of the character string queried from table is _1747_ that is within the limit of 4000 chars. If I limit the output to just 500 using substr, I don't get any error but adding a single character startes throwing error. OUT variable in both p1 and p2 are declared as table.column%type and error comes from p1 only as confirmed by the error log.
    When I call p1 or p2 from a declare block, I don't get any error.
    This has really confused me and I am not able to find any reason for this difference in behaviour.
    Request to help me in understanding what could be the issue here.
    Oracle version used is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    -Thanks in Advance.

    CREATE or replace PROCEDURE p1
    ( l_id IN VARCHAR2
    , l_str OUT VARCHAR2
    ) IS
      l_temp VARCHAR2(4000);
    BEGIN
      SELECT Response_Message INTO l_temp FROM t1 WHERE Response_ID = l_id;
      l_str := l_temp||'10 symbols';
    END;
    CREATE or replace PROCEDURE p2
    ( l_id IN VARCHAR2
    , l_str OUT VARCHAR2
    ) IS
    BEGIN
      p1(l_id, l_str);
    END;
    /no errors in procedures, but
    DECLARE
    resultstr VARCHAR2(1000);
    BEGIN
      p2(58, resultstr);
      DBMS_OUTPUT.PUT_LINE(resultstr);
    END;
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "P1", line 8
    ORA-06512: at "P2", line 6
    ORA-06512: at line 4Procedure is called with small variable.
    Try check all calls and all procedures for size and check if there are string concatenations.

  • ORA-06502 PL/SQL: numeric or value error ORA-06512 when calling a procedure

    Hi,
    I have been using ODP.net for a while now and have been calling lots of procedures without issue, however today I put together one to insert key, value parameters into a simple table and it is failing on me Intermittently with the ORA-06502... I have checked the code and I do not see any problems and am thoroughly frustrated... When I call the procedure directly it all works perfectly so the problem is not in the db!
    Please can you help? Code follows:
    Table defined as:
    CREATE TABLE REPORT_REQUEST_PARAMETERS
    (     REQUEST_ID NUMBER,
         PARAM_NAME VARCHAR2(50 BYTE),
         PARAM_VALUE VARCHAR2(255 BYTE)
    Stored procedure defined as:
    create or replace PROCEDURE SP_WRITE_REQUEST_PARAMS
    ( in_request_id number, in_param_name char, in_param_value char )
    AS
    BEGIN
    INSERT INTO REPORT_REQUEST_PARAMETERS ( REQUEST_ID, PARAM_NAME, PARAM_VALUE )
    VALUES
    ( in_request_id, in_param_name, in_param_value );
    END SP_WRITE_REQUEST_PARAMS;
    Finally the ODP.net code which calls this looks like:
    using (OracleConnection connection = new OracleConnection(...blah...))
    using (OracleCommand command = connection.CreateCommand())
    command.CommandType = CommandType.StoredProcedure;
    command.CommandText = "SP_WRITE_REQUEST_PARAMS";
    OracleParameter p1 = new OracleParameter("in_request_id", OracleDbType.Int32);
    OracleParameter p2 = new OracleParameter("in_param_name", OracleDbType.Char);
    OracleParameter p3 = new OracleParameter("in_param_value", OracleDbType.Char);
    p1.Direction = ParameterDirection.Input;
    p1.Value = requestId;
    p2.Direction = ParameterDirection.Input;
    p2.Size = paramName.Length;
    p2.Value = paramName;
    p3.Direction = ParameterDirection.Input;
    p3.Size = paramValue.Length;
    p3.Value = paramValue;
    command.Parameters.Add(p1);
    command.Parameters.Add(p2);
    command.Parameters.Add(p3);
    connection.Open();
    command.ExecuteNonQuery();
    connection.Close();
    }

    What version of database? If it's 9206 this is a known database problem, and should be resolved by patching the database to 9208. I don't have the bug number handy though.
    Simply because it succeeded in sqlplus doesnt mean it's not a database problem, as the problem was intermittent and succeeded from odp sometimes too.
    Thanks
    Greg

  • ORA-28509 when calling PL/SQL mq message throught Java Application

    I have a PL/SQL procedure called "prc_send_mq_message" witch works perfectly when I invoke throught database users where it is compiled.
    But when this same procedure is invoked by Java Application witch connects with the same user, the error: "ORA-28509: was not possible stablish connectinon with Non_Database Oracle" happens.
    Can anyone help me ?
    See pl/sqlblock bellow:
    Create or replace procedure prc_send_mq_message Is
    pi_db_link_name Varchar2(100) := 'siibdg4mq';
    pi_queue_name Varchar2(100) := 'QL.REQ.SIIB.FBS.01';
    vObjDesc PGM.MQOD;
    vHandleObj PGM.MQOH;
    vMsgDesc PGM.MQMD;
    vPutOpt PGM.MQPMO;
    --options PGM.MQPMO;
    vPutBuffer Raw(32767);
    Begin
    -- Opening the queue:
    vObjDesc.DBLINKNAME := pi_db_link_name;
    vObjDesc.OBJECTNAME := pi_queue_name;
    pgm.mqopen( vObjDesc, PGM_SUP.MQOO_OUTPUT, vHandleObj ); --> ORA-28509: was not possible stablish connectinon with Non_Database Oracle
    End;
    /

    Hi,
    This is the Oracle MessageQ forum, not the WebLogic Server, Oracle Database, or Oracle JMS forum. You will likely have better success in getting your question answered by using one of the Database related forums.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Encountering ORA-01152 when implementing DataGuard

    Working of a 2-node cluster hosting 11.1.0.7 on a Linux RH4 platform, and attempting to implement DataGuard on a single node with same OS and same DB version, and followed document http://www.oracle.com/technology/deploy/availability/pdf/dataguard11g_rac_maa.pdf
    The "duplicate target " command works successfully, and having recreated the sp file on the standby node, when I attempt to startup the standby database I get the following error.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 534462464 bytes
    Fixed Size 2161400 bytes
    Variable Size 314574088 bytes
    Database Buffers 209715200 bytes
    Redo Buffers 8011776 bytes
    Database mounted.
    ORA-10458: standby database requires recovery
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '+DATA/abcdg/datafile/system.258.697912407'
    I have re-tried several times without success - any ideas anybody?

    I've skimmed the PDF and I think what has happened is that you may have slightly diverged from the sequence shown by issuing "startup" instead of "startup mount", the difference being that "startup" tries to open the standby database in read only mode, which is when ORA-01152 is thrown.
    I'm assuming here that the rman duplicate operation does not include a recovery phase, if that is true then the restored datafiles will need recovering to a consistent state before the database can be opened in read-only mode.
    In short you probably just need to issue:
    recover managed standby database disconnect;and let managed recovery run the archive logs in. Once it is consistent then subsequent "startup" commands should work without error.
    If you don't actually want it open read-only then you can just leave it in a mount state and running managed recovery.

  • ORA-904 when calling a sys package from a private one (on 9.2.0.5.0)

    Hi,
    I explain:
    SELECT DBMS_PIPE.UNIQUE_SESSION_NAME
    FROM dual;
    works!!!
    CREATE OR REPLACE FUNCTION GET_NAME RETURN VARCHAR2 IS
    vc_name VARCHAR2(1000);
    BEGIN
    SELECT DBMS_PIPE.UNIQUE_SESSION_NAME
    INTO vc_name
    FROM dual;
    RETURN vc_name;
    END GET_NAME;
    works (no error at compile time)
    BUT:
    SELECT GET_NAME FROM DUAL;
    Get a ORA-00904 error:
    ORA-00904: : identificateur non valide
    ORA-06512: at "DBASYS.GET_NAME", line 4
    This mean that DBMS_PIPE.UNIQUE_SESSION_NAME
    is unknown.
    But I used it from the same session just before.
    What is the problem ?
    This example is simple, I HAVE TO use a function, in my true function, I do things before and after the call.
    Thanks.
    Christian COMMARMOND (France)

    Hi Kamal,
    Thank you for taking care of my problem...
    About:
    CREATE OR REPLACE FUNCTION GET_NAME RETURN VARCHAR2 IS
    vc_name VARCHAR2(1000);
    BEGIN
    vc_name := DBMS_PIPE.UNIQUE_SESSION_NAME;
    RETURN(vc_name);
    END GET_NAME;
    I can not even compile it, I get PLS-00021 DBMS_PIPE UNKNOWN (the message is in french so my translation could differ of the real oracle message but code is OK)
    I think that this is the problem of GRANTed objects. It seems that even if my account is DBA, my procs does not inherit of the 'public' grants and that the real owner of the object should GRANT to me the EXECUTE.
    If this is the problem, I do not have the SYS password to do the GRANT.
    Do you think there could be a work around?
    Thanks again,
    Christian COMMARMOND

  • Ora-00922 when building a model with Oracle Data Miner

    Hi,
    i'm using Oracle Data Miner 10.1.0.2 with Database 10.1.0.3.0 under Linux x86.
    The specific patch 10.1.0.3.1 for Data Mining was applied because i didn't manage to execute the models in the tutorial.
    So all were fine, and i succeded creating my own models and i executed them.
    But few months later, i.e now, i'm trying to build som other models but when building i have again the ora - 00922 : missing or invalid option
    I tried applying once again the patch but no effect !
    Is anyone ever faced this problem !?
    Eric

    Hi Xiafang,
    the database were not upgraded but used to build some ETL mappings.
    Here are the results of the SQL statements u gave me
    SQL> connect / as sysdba
    Connected.
    SQL> select value from v$option where parameter like '%Data Minin%';
    VALUE
    TRUE
    FALSE
    SQL> select comp_id, version, status from dba_registry;
    COMP_ID VERSION STATUS
    WK 10.1.0.3.0 VALID
    EM 10.1.0.3.0 VALID
    XDB 10.1.0.3.0 VALID
    AMD 10.1.0.3.0 VALID
    CONTEXT 10.1.0.3.0 VALID
    SDO 10.1.0.3.0 VALID
    ORDIM 10.1.0.3.0 VALID
    EXF 10.1.0.3.0 VALID
    OWM 10.1.0.2.0 VALID
    ODM 10.1.0.3.1 VALID
    CATALOG 10.1.0.3.0 VALID
    COMP_ID VERSION STATUS
    CATPROC 10.1.0.3.0 VALID
    JAVAVM 10.1.0.3.0 VALID
    XML 10.1.0.3.0 VALID
    CATJAVA 10.1.0.3.0 VALID
    APS 10.1.0.3.0 VALID
    XOQ 10.1.0.3.0 VALID
    Is the DM option enabled, i think yes but the SQL answer TRUE and FALSE.
    So, should i enable DM with the commands u gave me ?
    Eric

Maybe you are looking for

  • Final cut pro x not opening in yosemite

    I am running OS X Yosemite version 10.10 on a Mac Book Pro with Final Cut Pro X version 10.1.3.  Every time I try and open Final Cut it crashes as soon as it opens.  I have removed the app by placing it in trash and reinstalled the app with the same

  • LDM (Logical Domains) - How to see physical file associated with vds

    After performing: ldm add-vdsdev <filename> vol1@primary-vds0 ldm add-vdisk testdvd vol1@primary-vds0 ldg1 is there a command that allows me to view what filename was used. I created testdvd a while ago like this and I'm trying to figure out what fil

  • Center aligned Text in image

    Hai, I urgently need help. I want to create a jpg image which is totally white in this white image i draw some multiple line text which i want to write in the center of image. I send the Text as string to my class through servlet file. The string has

  • Reg:ALV, how to supress leading zeros

    Hi, Presently I am doing a report with ALV, Here I am getiing the ouput properly,that is i am able to display  emlpoyee number correctly but with leading zero's. I want to suppress this leading zero's as per the requirement. How to solve the problem.

  • Client 800 user

    Hello Guru: I just finished install SAP ECC 6.0 SR1. I can log on client 000, 001. while going on SCC4 , I have seen system has client 800 too. I try to log on client 800 with SAP*, DDIC with the same password I used on client 000,001 but not work. P