ORA-01460: unimplemented or unreasonable error & OPEN-FOR statement ...

Hi,
I have a procedure that opens a cursor which returns a result set based on a dynamic SELECT statement. The IN clause
in most cases needs to handle more than 1000 expressions. So to avoid the ORA-01785 error, I use a function to
convert the comma separated list of ids (which are unknown) into a collection which can then be used in the sub query
to process each expression or id. I assumed that the maximum string length I could use for these list of ids was
32767, i.e. VARCHAR2. But f I attempt to open the cursor with a list of ids where the string length is greater than 4000 bytes , the cursor is invalid
and it seems to throw the following Oracle error:
ORA-01460: unimplemented or unreasonable conversion ...
Note that anything less than 4000 bytes is fine. I have attached some of the code below and would appreciate if anyone
could tell me what im doing wrong! For example, can a varchar2 variable greater than 4000 bytes not be used when
executing dynamic SQL in the context of the OPEN-FOR statement?
-- Create type to hold collection of identifiers.
CREATE OR REPLACE TYPE IDList IS TABLE OF NUMBER;
-- Function which converts a string of comma separated list of identifiers
-- into a collection.
CREATE OR REPLACE FUNCTION fnConvertIDListToCollection(
     varList IN VARCHAR2,
     varDelimiter IN VARCHAR2 DEFAULT ',')
RETURN IDList
IS
     varString long := varList || varDelimiter;
     varPos pls_integer;
     varData IDList := IDList();
BEGIN
     LOOP
          varPos := instr(varString, varDelimiter);
          EXIT WHEN (nvl(varPos, 0) = 0);
          varData.extend;
          varData(varData.count) := trim(substr(varString, 1, varPos - 1));
          varString := substr(varString, varPos + 1);
     END LOOP;
     RETURN (varData);
END;
CREATE OR REPLACE PROCEDURE MyTestProc
myCursor OUT SYS_REFCURSOR
AS
varListOfIds VARCHAR2(32767);
BEGIN
     -- Hard coding this for now but this will be an incoming parameter containing a list
     -- of unknown ids, separated with commas.
     varListOfIds := '1,2 .. , 5000';
     OPEN myCursor FOR
     'SELECT     DISTINCT val1, val2, val3
     FROM TABLEA
     WHERE     val1 IN (select * from table(cast(fnConvertIDListToCollection(:ListOfIds) as IDList)))' USING varListOfIds;
END;
/

APC,
Many thanks for the suggestion and yes I could possibly implement an alternative solution, certainly for some cases but I need to investigate further for others. I'm migrating some SQL Server logic over to Oracle and that was simply the approach taken on that platform.
Could I trouble you with one further question as a newbie to all of this. I hinted in my last response that I was somewhat confused over the limits with the use of varchar2 variables in PL/SQL. If I were building up a piece of dynamic SQL (e.g. SELECT statement including a WHERE clause) using an incoming VARCHAR2 parameter for the WHERE clause, can this parameter contain more than 4000 bytes if necessary. I assumed it could be as big as 32767 bytes but an earlier response suggested a maximum of 4000 bytes. Really sorry for probably a fairly basic Oracle question but it would be very appreciated if you could explain this to me.
Again, many thanks.

Similar Messages

  • ORA-01460: unimplemented or unreasonable conversion requested

    Hi,
    i have a problem with a insert statement
    we use C# .net
    our database server version is
    Oracle Database 10g Client
    The problem is:
    When iam trying to insert records more than 248 it returns the "ORA-01460: unimplemented or unreasonable conversion requested" error. If the number of records are less than 248, then iam able to insert it successfully. Can u please suggest me what to do inorder to overcome with this.
    iam using the following query to insert.
    PROCEDURE PINSUPD_UNIT
    pi_unit_info CLOB,
    pi_user_id DPS_USER.USR_ID%TYPE,
    po_unit_cur OUT unit_cur
    ) AS
    v_xmlDoc      SYS.XMLTYPE;
    v_xmlNode      SYS.XMLTYPE;
    v_intXMLNodeCount      NUMBER;
    v_UNIT_ID ECON_UNIT.UNIT_ID%TYPE;
    v_DESCRIPTION ECON_UNIT.DESCRIPTION% TYPE;
    v_NAME ECON_UNIT.NAME%TYPE;
    v_UNIT ECON_UNIT.UNIT%TYPE;
    v_sysdate DATE;
    INVALID_XML EXCEPTION;
    BEGIN
    v_sysdate := TO_DATE( TO_CHAR(SYSDATE, 'DD/MM/YYYY HH:MI:SS AM'), 'DD/MM/YYYY HH:MI:SS AM');
    -- To extract the Data from the XML Input
    IF pi_unit_info IS NOT NULL AND pi_unit_info <> ' ' THEN
    v_intXMLNodeCount := 1;
    v_xmlDoc := SYS.XMLTYPE.CREATEXML(pi_unit_info);
    WHILE SYS.XMLTYPE.ExistsNode(v_xmlDoc, '//Unit_Details[' || v_intXMLNodeCount || ']') = 1
    LOOP
    v_xmlNode := SYS.XMLTYPE.EXTRACT(v_xmlDoc, '//Unit_Details[' || v_intXMLNodeCount || ']');
    v_UNIT_ID := 0;
    v_UNIT_ID := TO_NUMBER(SYS.XMLTYPE.EXTRACT(v_xmlNode, '//Unit_ID/text()').getStringVal(),'99999999999999999999999999999999999999');
    v_DESCRIPTION := '';
    v_DESCRIPTION := SYS.XMLTYPE.EXTRACT(v_xmlNode, '//Description/text()').getStringVal();
    v_NAME := '';
    v_NAME := SYS.XMLTYPE.EXTRACT(v_xmlNode, '//Name/text()').getStringVal();
    v_UNIT := '';
    v_UNIT := SYS.XMLTYPE.EXTRACT(v_xmlNode, '//Unit/text()').getStringVal();
    IF v_UNIT_ID = 0 THEN
    --To insert the Unit Details
    INSERT INTO
    ECON_UNIT
    UNIT_ID,
    NAME,
    UNIT,
    DESCRIPTION,
    USR_ID,
    LAST_UPDATED_DATE
    VALUES
    SEQ_UNIT.NEXTVAL,
    v_NAME,
    v_UNIT,
    v_DESCRIPTION,
    pi_user_id,
    v_sysdate
    DBMS_OUTPUT.put_line(v_name);
    ELSE
    --To update the Unit details
    UPDATE
    ECON_UNIT
    SET
    NAME = v_NAME,
    UNIT = v_UNIT,
    DESCRIPTION = v_DESCRIPTION,
    USR_ID = pi_user_id,
    LAST_UPDATED_DATE = v_sysdate
    WHERE
    UNIT_ID = v_UNIT_ID;
    DBMS_OUTPUT.put_line(v_name);
    END IF;
    v_intXMLNodeCount := v_intXMLNodeCount + 1;
    END LOOP;
    OPEN po_unit_cur FOR SELECT * FROM ECON_UNIT;
    ELSE
    RAISE INVALID_XML;
    END IF;
    i know it is a known problem, but still iam trying a lot to overcome it.

    I believe, PL/SQL has a limitation of 32K characters for a LONG parameter.

  • Stored procedure - insert clob obj - error msg: ORA-01460: unimplemented

    Hi all,
    I have a situation where I want to insert a clob object to my local table via a stored procedure. The clob object stores large amount of text. The clob data is populated from retrieving content in an external text file. When executing an insert statement in c# code, the information was inserted successfully. when executing the stored procedure to insert the information, i always get "ORA-01460: unimplemented or unreasonable conversion requested". I use ReadToEnd() from StreamReader class to retrieve the context of the external text file. Does anyone know why Oracle behaves this way? Thanks for helping in advance.
    TABLE DEFINITION FOR CLOB_TEST
    Name       Type         Nullable Default Comments
    PKG_NAME   VARCHAR2(50) Y                        
    PKG_DESC   CLOB         Y                        
    PKG_FAM_ID NUMBER       Y                        
    STORED PROCEDURE
    procedure InsertTempReleaseTable(p_name        in varchar2,
                                       p_description in clob,
                                       p_fam_id      number) is
      begin
        insert into clob_test
          (pkg_name, pkg_desc, pkg_fam_id)
        values
          (p_name, p_description, p_fam_id);
      end InsertTempReleaseTable;
    RETRIEVE CONTENT FROM A TEXT FILE
    public string GetTextFileContents(string path)
                using (StreamReader sr = new StreamReader(path))
                      return (sr.ReadToEnd());
    C# INVOKE STORED PROCEDURE TO INSERT
    using (OracleCommand cmd = (OracleCommand)database.GetStoredProcCommand("pkg_sptbuildstatus.InsertTempReleaseTable"))
                    cmd.Parameters.Add("p_name", OracleType.VarChar, 255).Value = obj.PackageName;  // string  
                    cmd.Parameters.Add("p_description", OracleType.Clob).Value = obj.ChangeDescription; // string
                    cmd.Parameters.Add("p_fam_id", OracleType.Number).Value = obj.FamilyId; // int
                    database.ExecuteNonQuery(cmd);
                }Edited by: user8976335 on Jan 11, 2010 4:28 PM
    Edited by: user8976335 on Jan 11, 2010 4:59 PM
    Edited by: user8976335 on Jan 11, 2010 4:59 PM
    Edited by: user8976335 on Jan 12, 2010 10:48 AM

    It's possible it doesn't like the name of your variables (being the same as the table), it's good practice to not do that.
    Much better would be.
    procedure InsertTempReleaseTable
       p_name in varchar2,
       p_description in clob,
       p_fam_id number
    is
    begin
       insert into clob_test
          (name, description, fam_id)
       values
          (p_name, p_description, p_fam_id);
    end InsertTempReleaseTable;Your Oracle version is typically of immense help.
    select * from v$version;Also, using the tags will keep the formatting of your code.
    If this isn't any help, can you post a working example of your example ? Where the code breaks (which call).
    Edited by: Tubby on Jan 11, 2010 3:50 PM
    Edited by: Tubby on Jan 11, 2010 3:51 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • "Error opening for writing" error msg.

    While installing Shockwave Player 12.1.0.150 I received "Error opening for writing" error message. The file C:\Windows\System32\Adobe\Director\SwDir_1210150.dll is missing.
    I uninstalled older versions of it using Add/Delete function of Programs and Features in the Control Panel. My OS is Windows 7 Pro, and default browser is Google Chrome. How/Where to fix this? Thank you in advance.

    SMH  What is up with this download????  NOW, I used the Slim version, it installed with no problem, and in the SysWOW folder where I found the missing .dll file. However, when I check if it's working and it's not. Checked Chrome's plug-ins and it's not there. This is enough to make a bulldog break his chain.

  • Counting Record from OPEN FOR statement

    Hi,
    Is there a way to count the number of record produce by OPEN ... FOR statement...?
    I tried using %ROWCOUNT. It doesn't seems to be working. It returned me 0 though when i printed the cursor, i had 7 records.
    OPEN p_cursor FOR sqlstatement;
    pnum_record := p_cursor%ROWCOUNT;Thank you everyone!

    Dave,
    My procedure is supposed to return back the records to the caller (application)
    Below is the spec
    PROCEDURE query_licensetype (
          p_cursor     IN OUT   cursortype,
          p_num_page   IN OUT   PLS_INTEGER,
          p_string              VARCHAR2 DEFAULT NULL,
          p_pageno              PLS_INTEGER DEFAULT 1,
          p_pagerow             PLS_INTEGER DEFAULT 20,
          p_asc                 PLS_INTEGER DEFAULT 1
       )And a piece of the code that open it
    OPEN p_cursor FOR vsql USING p_string, p_string, vstart_rec, vend_rec;I am not sure how to do what you have suggested.
    Can you show me how to FETCH all the record from p_cursor and still returning back the record to the caller?
    Thanks Dave!

  • [ORACLE 9] OPEN FOR statement USING bind variable

    Hi,
    I have a loop that only fetches 1 record instead of 7:
    DECLARE
    lv_into varchar2(40);
    lv_qry  varchar2(400);
    type curtest_ref is ref cursor;
    curtest          curtest_ref;
    lv_compteur number(4) := 1;
    lv_client_loc   varchar2(100);
    BEGIN
    dbms_output.put_line( 'Début' );
    lv_qry := 'select client_loc from tmp_jbm where client_id = :A ';
    open curtest for lv_qry using lv_compteur;                
    loop
                    fetch curtest into lv_client_loc ;
                    exit when curtest%notfound;
                    dbms_output.put_line( 'ligne: '       || to_char( lv_compteur )
                                       || ' Client Loc: ' || lv_client_loc );
                    lv_compteur := lv_compteur + 1;
                    exit when lv_compteur > 6;
         end loop;
    EXCEPTION
        when others then
                 dbms_output.put_line( 'Erreur exception: ' || sqlerrm );
    END;
    [/END CODE]
    It looks like the cursor only fetches 1 record and then stops.
    Many thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    The code is doing what you have asked it to do.
    Incrementing lv_compteur := lv_compteur + 1; inside the FOR LOOP will not refresh your CURSOR as the CURSOR OPEN statement is outside the loop.
    You could change your lv_qry variable to something like this:
    lv_compteur_min number(4) := 1;
    lv_compteur_max number(4) := 6;
    lv_qry := 'select client_loc from tmp_jbm where client_id BETWEEN :A AND :B';and OPEN the cursor by passing two variables
    open curtest for lv_qry using lv_compteur_min, lv_compteur_max ;

  • Image Upload error ora-01460:

    Hi to all,
    I am doing a development in .Net to upload the Image.
    I tried using to upload Image using Oracle Client Connectivity provided by .Net. I am able to upload the Image of any size upto 4GB on Blob field.
    I tried using the same thing just changing the connectivity to OLEDB and tried to upload the Image but I'm getting the error as ora-01460: unimplemented or unreasonable conversion requested for Image file size greater than 32K.
    What would be the possible causes for this.. I posted below my table structure and the procedure involved in the uploding the picture.
    Name Null? Type
    ID NUMBER
    IMAGE_FILENAME VARCHAR2(500)
    IMAGE BLOB
    MIME VARCHAR2(4000)
    FILENAME VARCHAR2(4000)
    Procedure
    CREATE OR REPLACE PROCEDURE DBO.SP_UPLOAD_FILE(P_ID IN NUMBER, P_FILENAME IN VARCHAR2, P_MIME IN VARCHAR2, P_PICTURE IN BLOB) AS
    BEGIN
    UPDATE TEMP_IMAGE SET IMAGE = P_PICTURE, FILENAME = P_FILENAME, MIME = P_MIME
    WHERE ID= P_ID;
    END;
    Please post your suggestions..
    Thanks and Regards,
    Vijayaraghavan K

    What would be the possible causes for this.OLEDB?
    Did you post the entire error message or did you just cut out the ORA-01460 part?
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:481421535472#72682112997104

  • Work around/Alternate solution for Oracle error  ORA-01460 and ORA-02063

    After the installation of Oracle.DataAccess version 2.111.7.20, I get the following error.(the code worked fine with Oracle.DataAccess version 9.2.0.700 )
    I have attached the error as well as the sample code.
    ORA-01460 and ORA-02063 are known bugs in the new ODP but would like to know if there is any Work around/Alternate solution for this problem(other than
    the use of stored procs)..
    Thanks!
    Error:
    ORA-01460: unimplemented or unreasonable conversion requested
    ORA-02063: preceding line from BSREAD_STAGINGRO at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
    at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteReader()
    SampleCode
    private bool isValidFieldData(string clientName, string fieldNumber, string uniqueID, string clientID)
    using (OracleConnection mBSConnection = new OracleConnection(mBSConnectionString))
    OracleDataReader oRdr = null;
    OracleCommand Valid_FieldData_Command = null;
    try
    Valid_FieldData_Command = new OracleCommand();
    Valid_FieldData_Command.Connection = mBSConnection;
    Valid_FieldData_Command.CommandText = "SELECT uniqueid FROM EXTDB.BSData WHERE agencyid = :agencyid and agencyname=:agencyname AND fieldnumber =:fieldnumber AND uniqueid = :uniqueid";
    Valid_FieldData_Command.Parameters.Add(":agencyid", OracleDbType.Varchar2, 255).Value = agencyID;
    Valid_FieldData_Command.Parameters.Add(":agencyname", OracleDbType.Varchar2, 255).Value = agencyName;
    Valid_FieldData_Command.Parameters.Add(":fieldnumber", OracleDbType.Varchar2, 255).Value = fieldNumber;
    Valid_FieldData_Command.Parameters.Add(":uniqueid", OracleDbType.Varchar2, 255).Value = uniqueID;
    mBSConnection.Open();
    oRdr = Valid_FieldData_Command.ExecuteReader(); ->Error occurs here
    The error occurs whenever the length of any of the parameter is increased. But there is no specific length where it is breaking down.
    For example in this case, it breaks down with the given error if
    agencyID > 8
    agencyName > 6
    fieldNumber > 9
    uniqueid > 6

    The problem was mapping input parameter type.
    VARCHAR2-type mapping input parameter works with String-type PF parameter. But CHAR-type won't.

  • ORA-01460 error only in production enviorment in ADF 11g application

    Hi ,
    We are using ADF 11g rel 1 11.1.1.4.0
    And database is
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE 11.2.0.1.0 Production"
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    All our enviornments are running the same database
    But when we are deploying the application in Production we get the Error
    JBO-27122: SQL-fejl under forberedelse af sætning. Sætning:
    select DB_TST_API.test_proc(Id1, id2) from table;
    ## Detail 0 ##
    java.sql.SQLException: ORA-01460: unimplemented or unreasonable conversion requested
    While executing the query which has a call tp API and input variable
    select DB_TST_API.test_proc(Id1, id2) from table;
    The DB function is defined as
    the FUNCTION test_proc(p_value IN VARCHAR2, p_list IN VARCHAR2) RETURN number;
    The input parameter is only 10 digit integer in ADF application, there is a logical difference that the DB function takes a string and ADF is supplying with Integer, but the code has worked before and has suddenly started giving this error
    The code also works fine on all other test eviornments
    Also the sql query when run from sql devleoper on production DB does not give any error
    Its becoming difficult to find out what could be causing this only on production enviornment

    In ANY case, I'd be using explicit conversions here, not implicit ones, so my recommendation would be one of these:
    a). Use TO_CHAR on the input
    b). Use Java to convert the integer to a string
    c). Change the functionto take a NUMBER as the parameter (if it really is a number)
    d). Write a wrapper for the function. The wrapper should take a number and convert it using TO_CHAR and call the real function
    John

  • Error ORA-01460 warning ORA-01461 during running a mapping with parameters

    Oracle 10g release2(10.2.0.1.0), OWB 10.2.0.1.31, Workflow server 2.6.4
    I have a simple process flow ( start -> mapping -> end).
    The mapping consists of 4 input groups(3 ordinary tables<INGRP1, INGRP2, INGRP3> and 1 mapping input parameter operator <INGRP4>), a joiner, a filter, an expression operator and 1 output group.
    I want to use two variables in join condition, so I bound two mapping input parameters(<INGRP4.SRC_SYS_CDE> and <INGRP4.ADMIN_ORG_NUM>) with two parameters of the process flow's start activity.
    Those two mapping input parameters are of type char, one is 4-char long and the other is 2-char long. So I set both of the two parameters of the start activity as String, one as 08, another as 7504.
    My join condition is:
    INGRP1.ORGIDT = INGRP2.SOURCEORGANIZATIONNO AND
    INGRP2.SOURCESYSTEMCODE = INGRP4.SRC_SYS_CDE AND
    INGRP2.ADMINORGANIZATIONNO = INGRP4.ADMIN_ORG_NUM AND
    INGRP1.CURCDE = INGRP3.NUM(+)
    There are no errors and warnings in validation, generation and deployment process, but when I run the process flow, it always finishes blankly(zero insert) with no error and warning messages. It should insert more than 20,000 rows.
    When I run the mapping and set the parameters 08 and 7504 at the parameter prompt, then start, the following error and warning occurs.
    Error ORA-01460: unimplemented or unreasonable conversion requested
    Warning ORA-01461: can bind a LONG value only for insert into a LONG column
    So what's the problem? How can I fix it?

    The problem was mapping input parameter type.
    VARCHAR2-type mapping input parameter works with String-type PF parameter. But CHAR-type won't.

  • ORA-01460 and ORA-02063 errors in form built on a view

    We have built an apex form on a view against a remote database (via dblink).
    Running the page brings back data as desired.
    However, clicking on the "edit icon" to make updates results in:
    ORA-01460: unimplemented or unreasonable conversion requested ORA-02063: preceding line from my_dblink
    I have searched and cannot seem to locate a fix. Can anyone provide a solution or further steps to troubleshoot?
    Thanks in advance.

    Right now you will be able to base a portal form only on updatable views. Non updatable views are not supported.
    As a work around you can use QBE reports to query the data, without having the delete and update links.
    Regards,
    Sunil.
    null

  • Oracle ADF: ORA-01460 4000 chars problem

    Hello,
    please excuse my bad english. I hope you will understand what I mean.
    I hope I'am right here with my Problem:
    I hava a web application written with Oracle ADF in jDeveloper. A View-Object contains the SQL-Statemant to search with a bind variable (Type: String) and uses Oracle Text.
    WHERE contains(Index, :mySearchString, 1) > 0
    Java generates the String (Type: String) that might have a length of 12 chars, 1234 chars or maybe something about 4000 chars.
    If the String is below 4000 chars, there is no problem.
    But if he exceeds the 4000 chars I get a exception with the message "ORA-01460:     unimplemented or unreasonable conversion requested".
    How to execute this statement with a String longer than 4000 chars?
    Could someone help me?
    I am at my wit's end.
    Thank you!
    DB: Oracle 10g Enterprise Edition (10.1.0.4.2)
    JDBC Version: 10.1.0.5
    Greetings
    One

    Thank you! Good to know that it isn't impossible to enhance this.
    I wrote a sql function:
    create or replace function mysearch(p_arg varchar2)return sys_refcursor is
    l_resultset sys_refcursor;
    begin
    open l_resultset for select ... from ... where contains(attribut, p_arg);
    return l_resultset;
    end;
    and create a View-Object. This View-Object has the follwing SQL-Statement:
    SELECT mysearch(:p_arg) AS MY_SEARCH FROM DUAL
    but no attributes! And the Object which I get has only 1 row. It should contains about 9000.
    And I get anyway the message "ORA-01460:     unimplemented or unreasonable conversion requested".
    In a PL/SQL context varchar2 can be 32KB!? Or not?
    Is this a ADF Problem? :-( (I hope so! If not: SORRY)

  • How to solve ORA-12560:TNS:protocol adapter error?

    I'm trying to use sqlplus on Windows 2008 R2 which is installed on VirtualBox to access an Oracle 11gR2 database on Red Hat Linux.
    I'm sure that the database on Red Hat Linux is up and tnsnames.ora is a copy from another machine which is used by another application to connect to the same Oracle database.
    When I run sqlplus, I got the ORA-12560: TNS:protocol adapter error.
    sqlnet.ora
    SQLNET.AUTHENTICATION_SERVICES = (NTS)
    Both sqlnet.ora and tnsnames.ora are located in c:\app\administrator\product\11.2.0\client64\network\admin folder.
    The registry ORACL_HOME has c:\app\administrator\product\11.2.0\client64.
    echo %ORACLE_HOME% incommand window returns %ORACLE_HOME%
    echo %ORACL_SID% in command window returns %ORACLE_SID%
    If I set ORACLE_HOME to another folder, I will get the following error:
    Error 6 initializing SQL*Plus
    SP2-0667: Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    So, I believe the ORACLE_HOME in registry has the correct value.
    I have also tried set ORACLE_SID to the service name listed in tnsnames.ora but sqlplus still returns the ORA-12560:TNS:protocol adapter error.
    For unknown reason, the value of ORACLE_HOME and ORACLE_SID I set by using set command will not persist after I close the command window that I set the values.

    881656 wrote:
    I'm trying to use sqlplus on Windows 2008 R2 which is installed on VirtualBox to access an Oracle 11gR2 database on Red Hat Linux.
    I'm sure that the database on Red Hat Linux is up and tnsnames.ora is a copy from another machine which is used by another application to connect to the same Oracle database.
    When I run sqlplus, I got the ORA-12560: TNS:protocol adapter error.
    sqlnet.ora
    SQLNET.AUTHENTICATION_SERVICES = (NTS)
    It make NO sense do to as above when attempting to connect to Oracle DB on *NIX
    which knows NOTHING about NTS Authentication.
    SQLNET.AUTHENTICATION_SERVICES = (NONE)
    or just remove the line or whole file.
    Also need to be sure that ipchains is disabled on *NIX system                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error while executing Procedure - ORA-06511: PL/SQL: cursor already open

    I have successfully compiled the following procedure but when I execute it, following error occurs, please adv.
    Thanks and Regards,
    Luqman
    create or replace
    procedure TESTKIBOR
    (contno in varchar)
    AS
    BEGIN
    DECLARE cursor c1 is
    SELECT * FROM KIBOR_SCHEDULE
    WHERE CN=contno;
    begin
    OPEN C1;
    FOR line IN c1 LOOP
    update kibor_schedule
    set lincome=line.Lincome,
    expo=line.eXPO,
    pport=line.pPORT
    where cn=line.cn
    and rno=line.rno;
    END LOOP;
    COMMIT;
    close c1;
    END;
    END TESTKIBOR;
    ERROR at line 1:
    ORA-06511: PL/SQL: cursor already open
    ORA-06512: at "MKTG.TESTKIBOR", line 6
    ORA-06512: at "MKTG.TESTKIBOR", line 10
    ORA-06512: at line 1

    Hi,
    CREATE OR REPLACE PROCEDURE Testkibor
         (contno  IN VARCHAR)
    AS
    BEGIN
      DECLARE
        CURSOR c1 IS
          SELECT *
          FROM   kibor_schedule
          WHERE  cn = contno;
      BEGIN
    --//    OPEN c1; --no need to open if using for loop
        FOR line IN c1 LOOP
          UPDATE kibor_schedule
          SET    lincome = line.lincome,
                 expo = line.expo,
                 pport = line.pport
          WHERE  cn = line.cn
                 AND rno = line.rno;
        END LOOP;
        COMMIT;
    --//     CLOSE c1; -- no need for loop  does it for you
      END;
    END testkibor;SS

  • Password file auth - error ORA-01990: error opening password file '/p00/ora

    Hi, Im setting up password file auth on our existing database.
    Ive run this
    orapwd file=orapwdt04.pwd password=secret entries=5
    then set this in the .ora file
    remote_login_passwordfile=exclusive
    But when I restart the dabase im getting this error
    ORA-01990: error opening password file '/p00/oraprod/9.2.0/dbs/orapw'
    How / where do I tell the database to look for the password file.
    Im running on AIX and Oracle 9.2.0.6
    thanks for looking.

    password filename must be in the format of orapw<sid> and location of the file $ORACLE_HOME/dbs

Maybe you are looking for

  • BPC 7.5 Web Administration / Set App Params asks for AntiXSSLib 1.5

    Hi. We have now installed BPC 7.5 in our test environment, but are facing a problem. According to the installation guide, we have installed Microsoft AntiCross Site Scripting Library 3.0 on our app/web-servers. But when trying to enter "Set Applicati

  • How to repair iphoto ? on snowléopard

    Hi I'm french and my english is not perfect!! So, i ' m looking for opening iphoto after to have changed hard disc , so it doesn't open How do i do ? Thank's to your help!! marianne

  • Flash crash Runaround

    I was told by Adobe there wasn't any help for "free" (Flash Player) products. Explaining that my company was a paid user of other Adobe products i.e. Dreamweaver, got me transferred to Tech Support who claimed there weren't any known Flash crash issu

  • Select () in java

    Hi, I'm new to socket in java and dunno if there is a mechanism which is similar to using the select () system call in unix ? What I mean is that how can we know there are some data to read from a socket ? Thanx a lot to any one that can help me.

  • Photoshop CS1 Mac can't open file by clicking icon

    I am using Photoshop CS1 on my Mac Pro running 10.5.7.  When I click on an image that is labeled an Adobe Photoshop image (jpeg or tiff), Photoshop opens, but the image does not.  I realize that CS1 was not designed for an Intel Mac and I plan to upg