Database Adapter: NVARCHAR2 datatype in stored procedure

Hi,
when I try to define partner link as database adapter - call stored procedure with datatype NVARCHAR2, I'm getting following error:
Error while writing wsdl file .....
Exception: WSDLException: faultCode=OTHER_ERROR: Database type is either not supported or is not implemented. Parameter INP_TEL is of type NVARCHAR2 which is either not supported or not an implemented datatype.
Is it possible to wokaround this problem without changing datatype nvarchar(utf16) to varchar2(iso8859p2)?
There should be no difference between mapping of varchar and nvarchar to string at BPEL side.
BPEL version: 10.1.2.0.0
Regards
Karel

Better workaround is to define stored procedure with varchar datatype, generate wsdl
and then change stored procedure definition to nvarchar.
This works and mapping (java) string to (oracle) nvarchar2 is correct.
But sometimes this could be difficult ( invalidations of thousands objects).
Maybe there could be better solution like add mapping to some files ???
Karel

Similar Messages

  • Sender JDBC adapter : Update SQL Statement : stored procedure

    Hi,
    Can we use a stored procedure in the sender jdbc adapter in 'Update SQL Statement'.
    The problem i am facing is like, we are selecting data from two tables in 'SQL statement for query' and then in 'Update SQL Statement' , we need to delete that data from these two tables.
    Please let me know if it is possible.
    Thanks,
    Rohit

    you can use a Stored procedure in the
    Query SQL Statement
    You have the following options:
    ·        Specify a valid SQL SELECT statement to select the data to be sent from the specified database.
    ·        Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.
    so have your whole select and update as part of this single Stored procedure

  • Synchronous JDBC adapter(receiver side) with stored procedure

    Hi experts,
    Can some database processing logic be included in receiver JDBC (synchronous) adapter...to put it simply
    I have synchronous JDBC adapter in the receiver side..Using this JDBC adapter I want to get some response back from the table..
    The requirement is not a simple fetch from the table..It involves some processing in the database side which I guess will be done by stored procedure..After this database processing , this output will be picked up by the JDBC adapter and will send to PI.
    How can this be achived ..Any Blog..
    Thanks
    Ayan

    Yes u can use stroed procedure and send back the response,
    refer this link for stored procedure structure.
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    chirag.

  • How can I check a Remote Database is alive in a Stored Procedure

    Hi
    In a PL/SQL stored procedure, I do a select from a table on a remote database via the database link. There is a Loop around the select as it waits for a flag to be set on the remote table. However, on several occasions, while looping, the remote database has gone down and the procedure then fails with error:
    'Details ORA-02068: following severe error from ORA-02068: following severe error from 'Remote Database ' ORA-01033: ORACLE initialization or shutdown in progress ORA-06512: at "Current Database.Stored Procedure", line'
    Is it possible to trap this error and prevent the procedure from crashing?
    My current code is like:-
    LOOP     
    SELECT flag
    INTO v_flag
    FROM remote_table@remote_db;
         IF v_flag= 'OK'
         THEN
    < Run Oracle Warehouse Builder Process Flow >
         EXIT;
         ELSE dbms_lock.sleep(600);
         END IF;
    END LOOP;
    Any help with this would be appreciated.
    Thanks
    GB

    Hi Bernd
    Thanks for your help. If I do this, I think the procedure would continue onto the 'IF' statement. I am looking for a way of looping round and trying to run the select again before moving on.
    If I did something like
    LOOP --- Loop 1 ---
    LOOP --- Loop 2---
    BEGIN
    SELECT flag
    INTO v_flag
    FROM remote_table@remote_db;
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    -- Need to exit if no exception ---
    END LOOP;
    IF v_flag= 'OK'
    THEN
    < Run Oracle Warehouse Builder Process Flow >
    EXIT;
    ELSE dbms_lock.sleep(600);
    END IF;
    END LOOP;
    Is there a way of going back to the start of Loop 2 if there was an exception, otherwise EXIT and continue onto the 'IF' statement.

  • Parameters of Date Datatype for stored Procedure

    I have a stored procedure where i hav two date parameters..initial i had the parameter datatype as varchar and in query i used the format to_date(fromdate ,'dd/mm/yyyy')
    My fromdate is in the format 31-01-2010
    everything worked fine...now i changed the datatype of parameters to date...how shud i give the input ?
    If i give as 01/31/2010 as i get the error
    ORA-06550: line 6, column 15:
    PLS-00382: expression is of wrong type
    ORA-06550: line 6, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 7, column 13:

    Cathrin wrote:
    I have a stored procedure where i hav two date parameters..initial i had the parameter datatype as varchar .. and this is wrong. Surely!
    Why are you passing date values as varchar2?
    One of the fundamental programming principles is to use the correct data types for variables and parameters. Exactly because of the type of problem you are now experiencing.
    So do not use string variables for numbers and dates and arrays and other types. 99.99% of the time this will be just plain wrong. And at this stage, it is more than safe to ignore the 0.01% exception to this rule.
    Use the correct data types. That simple.

  • TEXT datatype in Stored Procedure and concat Carriage returns

    Anyone,
    I am trying to create a stored procedure that will allow me to grab a bunch of 255 Char records in a cursor and concatenate them together adding a carriage return after each row.
    Here is pseudo code would look like:
    CREATE OR REPLACE PROCEDURE myproc IS
       CURSOR c1 IS
          SELECT myVARCHAR_255_col
          From mytable
          where criteria = something
          rec c1%ROWTYPE;
          var_my_new_TEXT TEXT;
    BEGIN
       OPEN c1;
       LOOP
          FETCH c1 INTO rec;
          EXIT WHEN c1%NOTFOUND;
            IF rec.myVARCHAR_255_col IS NOT NULL THEN
                var_my_new_TEXT := CONCAT(rec.myVARCHAR255_col, '%char(13)+char(10)%')
            END IF
       END LOOP;
       CLOSE c1;
    END;There is a bit more to code then this but most important issue is how to deal with TEXT datatype? Should/can it be RAW instead. And also how do I get a CARRIAGE RETURN into the body of the column of type TEXT.
    Thanks in advance,
    Miller

    Is there a specific reason for concatenating 255 characters at a time and returning it? This example may be of help.
    SQL> set long 500
    SQL> DESC MYTABLE
    Name                                      Null?    Type
    COL1                                               NUMBER(2)
    COL2                                               LONG
    SQL> select * from mytable;
          COL1
    COL2
             1
    This text is very long This text is very long This text is very long This text i
    s very long This text is very long This text is very long This text is very long
    This text is very long This text is very long This text is very long This text
    is very long This text is very long This text is very long This text is very lon
    g This text is very long This text is very long This text is very long
    SQL> select length(col2) from mytable;
    select length(col2) from mytable
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got LONG
    SQL> select length('This text is very long This text is very long This text is very long This text i
      2  s very long This text is very long This text is very long This text is very long
      3   This text is very long This text is very long This text is very long This text
      4  is very long This text is very long This text is very long This text is very lon
      5  g This text is very long This text is very long This text is very long') from dual;
    LENGTH('THISTEXTISVERYLONGTHISTEXTISVERYLONGTHISTEXTISVERYLONGTHISTEXTISVERYLONG
                                                                                 393
    SQL> R
      1  DECLARE
      2  V_VARIABLE VARCHAR2(4000);
      3  BEGIN
      4  SELECT COL2 INTO V_VARIABLE FROM MYTABLE;
      5  DBMS_OUTPUT.PUT_LINE(SUBSTR(V_VARIABLE,1,255));
      6  DBMS_OUTPUT.PUT_LINE(SUBSTR(V_VARIABLE,256,138));
      7* END;
    This text is very long This text is very long This text is very long This text
    is very long This text is very long This text is very long This text is very
    long This text is very long This text is very long This text is very long This
    text is very long Th
    is text is very long This text is very long This text is very long This text is
    very long This text is very long This text is very long
    PL/SQL procedure successfully completed.
    SQL> SELECT SUBSTR(COL2,1,255) FROM MYTABLE;
    SELECT SUBSTR(COL2,1,255) FROM MYTABLE
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got LONG

  • Connecting to a non-oracle database (jdbc) from a java stored procedure

    Does anyone know to configure the database to allow a connection to a non-oracle database from a Java Stored procedured, using JDBC?
    Thank you in advance,
    Chris

    Hi Chris,
    I haven't tried it, and these are just some of my thoughts, but I
    think you would need to load the JDBC driver for the other database
    into the Oracle database (using the "loadjava" tool, of-course).
    Then your java stored procedure should be able to instantiate the
    third party JDBC driver and obtain a connection to the other database.
    Hope this helps.
    Good Luck,
    Avi.

  • Unknown Database Connector Error using Oracle stored procedures

    We are using an Oracle database for the first time with our Crystal Reports, and I am attempting to modify a report to use a new stored procedure.  When I attempt to add either the new procedure, or to add a new copy of the existing procedure, I get an error message:
    Unknown Database Connector Error
    If I remove the existing procedure first (leaving no database objects at all), and then attempt to add back exactly the same stored procedure that I just removed, I get a different error message:
    Database Connector Error: '42000:[Oracle][ODBC]Syntax error or access violation'
    Neither of these errors is particularly helpful.  The stored procedure in question works as is.  I can run it in SQL Developer, and it also executes within the existing report if I run it.  Unfortunately, it needs to be modified and given a new name, so I need to be able to add the new stored procedure to the report.
    The operating system is Windows XP Professional version 2002 SP3.  The Oracle version is 11g (11.2.0.2.0).  Crystal reports version is Crystal Reports 2008 (12.3.0.601).  The stored procedure returns a refcursor.  The ODBC connection is created using the "Oracle in OraClient11g_home1" driver.  When I test the connection, it tells me it was successful.
    If it matters, the report is a Saba report.
    Can anyone shed any light on what the problem is and how to fix it.  If the solution is to upgrade the Windows version, that is under the control of our tech support and there is no information available as to when it will happen.

    Yes - I had used the Set Datasource Location to point to the correct ODBC connection.  I get the same results with an existing report as I do with a new blank report.
    I have no idea where the service market place is.  Honestly, I find the entire SAP site confusing.  I found one reference to the PAM guide, but when I clicked on it, it insisted on a userid/password, and apparently the userid/password I have for this discussion group doesn't pass.  I did find, eventually, a document called "Crystal Reports 2008 Service Pack 3 for Windows - Supported Platforms".  When I read it, it tells me that it's compatible with Oracle 11g, generic ODBC, and Windows XP SP3, which is what we are using.  I'm hoping that this document has equivalent information to the PAM guide.

  • Database updation using XML and stored Procedure?

    Hello,
    I want to perform updation in multiple tables using XML files.Please suggest can I do updation using xml and stored procedure.
    If yes then which is more efficient and takes less time.
    1.Updation using xml files only
    2.Updation using xml files with stored procedure.
    3.Stored procedure alone.
    If direct xml and stored procedure communication is possible.then please write how.
    Thanks in advance for any help.

    Here's a sample. The next code drop of the XSQL Servlet will make the easy-to-do from within XSQL Pages:
    package package1;
    import org.w3c.dom.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    public class Class1 extends Object {
    public static void main( String[] arg ) throws Exception {
    Connection conn = getConnection();
    CallableStatement ocs = conn.prepareCall("begin ? := App.HotItems('PAUL'); end;");
    ocs.registerOutParameter(1,OracleTypes.CURSOR);
    ocs.execute();
    ResultSet rs = ((OracleCallableStatement)ocs).getCursor(1);
    OracleXMLQuery oxq = new OracleXMLQuery(conn,rs);
    System.out.println(oxq.getXMLString());
    oxq.close();
    rs.close();
    ocs.close();
    conn.close();
    public static Connection getConnection() throws Exception {
    String username = "scott";
    String password = "tiger";
    String dburl = "jdbc:oracle:thin:@localhost:1521:xml";
    String driverClass = "oracle.jdbc.driver.OracleDriver";
    Driver d = (Driver)Class.forName(driverClass).newInstance();
    return DriverManager.getConnection(dburl,username,password);
    null

  • How to invoke a stored procedure in database adapter

    Hi All,
    i have created a database adapter which contains a stored procedure, the procedure is merge process,which bring data from another database,
    i have made sure that checking for new records and updating any changes from the source database everything has been taken care in the procedure.
    my question is how to invoke this process, what all process activities need to be associated with the database adapter, to invoke it
    assuming i want to run it every 5 hours,
    any reply would be of great help.
    Regards
    Ananth

    Hi,
    V thanks for you reply, i am v much new to this bpel environment, i tried using invoke but got errors like
    Error(61):
    [Error ORABPEL-10107]: Invalid initial activities
    [Description]: in line 61 of "C:\jdevstudio10134\jdev\mywork\Incremental_refresh\data_incr_refresh\bpel\data_incr_refresh.bpel", Initial activity is invalid. An initial activity must be of a receive or pick activity..
    [Potential fix]: Please re-arrange the BPEL process definition to make sure its initial activity is of a receive or pick activity. (e.g. by adding new receive activity or removing invalid initial activities..
    Error:
    [Error ORABPEL-10063]: missing initial receive activity
    [Description]: in "C:\jdevstudio10134\jdev\mywork\Incremental_refresh\data_incr_refresh\bpel\data_incr_refresh.bpel", there is no receive activity that starts the process.
    [Potential fix]: make sure one of "pick" and "receive" activities have attribute      "createInstance" set to be "yes".
    later i used the service pick, so from pick i am heading to ivoke and later to finally database adapter, but still getting below error
    Error(59):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 59 of "file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel", XML parsing failed because file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel<Line 59, Column 19>: XML-24536: (Error) Missing Attribute 'partnerLink'.
    [Potential fix]: Fix the invalid XML.
    Error(59):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 59 of "file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel", XML parsing failed because file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel<Line 59, Column 19>: XML-24536: (Error) Missing Attribute 'portType'.
    [Potential fix]: Fix the invalid XML.
    Error(59):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 59 of "file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel", XML parsing failed because file:/C:/jdevstudio10134/jdev/mywork/Incremental_refresh/data_incr_refresh/bpel/data_incr_refresh.bpel<Line 59, Column 19>: XML-24536: (Error) Missing Attribute 'operation'.
    [Potential fix]: Fix the invalid XML.

  • Database Adapter and SQL Server procedure issue

    Hello,
    I am using Jdev 11.1.1.7.0 and SQL Server 2005.
    In the Database Adapter configuration wizard, Specify Stored Procedure step, I choose the “GEACupax” schema and got the following error after a click on “Procedure Browse” button:
    com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'GEACUPAX.INFORMATION_SCHEMA.SCHEMATA'.
    The command Database Adapter tried to execute was:
    (from jdev log:) select schema_name from GEACUPAX.INFORMATION_SCHEMA.SCHEMATA order by schema_name;
    Note, the schema name has changed to uppercase. I think that is the problem. If I try this query in SQLDeveloper, it returns the same error. I can fix it changing the schema name to “GEACupax”. The case matters.
    Any ideas?
    Leandro.

    Vijay,
    Thanks for you reply.
    I figure out a related bug:
    Bug 12859472: Cannot browse store procedure in case-sensitive MS SQL Database
    There are two possible workarounds:
    1. Use a database name with capital letters
    2. Do not use stored procedures, but access the tables directly.
    The notes on the Bug ticket describes that the issue would be scheduled to be fixed in PS7 which is 11.1.1.8.
    Cheers!
    Leandro.

  • Error occured while obtaining stored procedure

    Hi,
    I'm trying to configure a Database adapter to call a stored procedure. When I try to select the procedures in a package I get an error saying:
    "Error occurred while obtaining the stored procedure, Please verify the Database connection"
    The database connection is fine. I can select other stnad alone procedures and it works fine but I get the above error only when trying to select the procedures in a package.
    Any help is appreciated.
    Thanks

    Yes, this is happening when I use the wizard to Browse. I see all the packages but when I click on the package to expand it, I do not see the procedures in the package and I get the error message. And as you said the procedures are on 10g and Olite is for dehydration.
    Any ideas as to why I get this error. When I create standalone procedures or functions I can select those and create the adapter. Its only with packages.
    Thanks

  • Mapping Routing service with a database adapter in ESB

    Hi,
    I have a database adapter configured for a Stored procedure that takes in a XML_TYPE and returns a CLOB. I also have the Schema for request and response, which I have configured in a Routing Service. Now how do I map the Routing Service to the Database adapter.
    The problem I am facing is 'CLOB' is returned as a simple type which can't be mapped to a complex type schema of the Routing Service.
    Also the 'any' tag of the XML_TYPE is not supported by jdeveloper.
    Any suggestions plz....
    Thanks..

    Adapters may have been tesed under load but messages are kept small. Of you adapter keep your messages as small as possible. Try and keep messages under 1MB, if possible.
    If you know Apps will I would stick to using the DB adapter for calling APIs, and Apps adapter for the more complex integrations, e.g. business events, xml gateway. I use DB adapter for concurrent programs, but the apps adapter is good for these integrations as well.
    The reason I used the DB adapter for APIs is because the PL/SQL stub the adapter creates forces you to uses all fields in the APIs. In some case you may only need a handfull out of 100. You get issues when you don't provide values.
    If you are in evaluation stage of products I would recommend Oracle Data Integrator for eBusiness Suite integration if you are implementing batch type interfaces. This is because of the inbuild error handling. It manages batch messages much better. Whereas SOA Suite is designed for single messages so it manges small messages well.
    The best option Oracle offers is Oracle Data Integration Suite, which includes ESB and BPEL.
    cheers
    James

  • JCA database adapter issue due to database schema dependency

    Hi,
    I am using the JCA database adapter to call a stored procedure. The adapter uses the database schema name while calling the Stored procedure. The schema name is added in the namespace of XSD, wsdl files.
    If I have to use a different database schema name, how can I update the existing code without much modification.
    Thanks!

    Thanks for your reply Prabhu.
    But the modification in JCA file is resulting in the following Exception.
    I think this change has resulted in references related issue. Please let me know if any further changes are required.
    <> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=> Could not invoke operation against the 'Database Adapter' due to:
    BINDING.JCA-11811
    Stored procedure invocation error.
    Error while trying to prepare and execute the old_schema_name.stored_procedure_name.
    An error occurred while preparing and executing the old_schema_name.stored_procedure_name.
    API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier old_schema_name.stored_procedure_name.
    must be declared
    ORA-06550: PL/SQL: Statement ignored

  • How can I transfer a XML file content to a MS SQL database by stored procedure using LabWindows/CVI SQL Toolkit?

    Hi,
    I have a problem to transfer a XML file content to a MS SQL database by a given/fixed stored procedure. I'm able to transfer the content of the file by using following method ...
    hstmt = DBPrepareSQL (hdbc, EXEC usp_InsertReport '<Report> ..... </Report>');
    resCode = DBExecutePreparedSQL (hstmt);
    resCode = DBClosePreparedSQL (hstmt);
    ... but in this case I'm not able to fetch the return value of the stored procedure! 
    I have tried to follow the example of the stored procedure in the help documentation (DBPrepareSQL) but I miss a datatype for xml?!?
    Any idea how to solve my problem?
    KR Cake  
    Solved!
    Go to Solution.

    After some additional trials I found a solution by calling the stored procedure in this way
    DBSetAttributeDefault (hdbc, ATTR_DB_COMMAND_TYPE, DB_COMMAND_STORED_PROC);
    DBPrepareSQL (hdbc, "usp_InsertReport");
    DBCreateParamInt (hstmt, "", DB_PARAM_RETURN_VALUE, -1);
    DBCreateParamChar (hstmt, "XMLCONTENT", DB_PARAM_INPUT, sz_Buffer, (int) strlen(sz_Buffer) + 1 );
    DBExecutePreparedSQL (hstmt);
    DBClosePreparedSQL (hstmt);
    DBGetParamInt (hstmt, 1, &s32_TestId);
    where sz_Buffer is my xml file content and s32_TestID the return value of the stored procdure (usp_InsertReport(@XMLCONTENT XML))
    Now I face the problem, that DBCreateParamChar limits the buffer size to 8000 Bytes.
    Any idea to by-pass this shortage??

Maybe you are looking for