SAP R/3 -- PI -- Oracle DB SYNC (JDBC)

What is the best approach to handle the following request:
We need to develop a synchonous call that will pass information from SAP R/3 through PI to an Oracle database can return the data.
For instance, we want to pass a material number from SAP R./3, and have all the related information stored in the Oracle DB returned immediately.
The data stored in Oracle will be retrieved via a JDBC connection.   If possible can you provide an example....thx

>> Just a simple query, no updating is required.
>>>  select f1 f2 f3....from ms_tbl where part = inbound-part
Then you dont need sql stored procedure . We can easily handle at pi side.
Step 1) create data type for proxy as per your need
Step 2)  Create the data type for  jdbc request side as similar below ...
<stmt>
    <Customers action="SQL_QUERY">
      <access> SELECT f1,f2,f3 from ms_tbl  WHERE PART ='$KEYFIELD$';</access>
      <key>
          <KEYFIELD>inbound-part</KEYFIELD>
      </key>
    </Customers>
  </stmt>
Note: use constant to populate values for action and access field in mapping area.
Step 3)
create data type for the  jdbc response side as below
<stmt_response>
<row>
<f1>
<f2>
<f3>
</row>
</stmt_response>
Step 4)
Then create Proxy response data type
Step 5) create message types and Service Interface.(outbound synchronous and inbound synchronous)
step 6)first map: Map step 1 messg type with step2 mesg type
step 7) second map:  Map step 3 mesg type to step 4 mesg type
Integration Directory: configure Jdbc reciever. Rest are all same.
That's  it.
Please follow this link ...
Jdbc structure :
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Jdbc configure (comm channel)
http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

Similar Messages

  • Insert /delete data from SAP Z table to Oracle table and opposite

    Hi,
    Can u help me write this FM from the SAP side?
    So, I have two tables ZTABLE in SAP and Oracle table ORAC.
    Let's put three columns in each of them, for example
    TEL1
    TEL2
    ADRESS
    NAME
    where TEL field is primary from ZTABLE to ORAC...
    (in FM there shoud be abap code for writing data in ZTABLE after we press some pushbutton made in sap screen painter..)
    for example, when we write new record in ZTABLE
    00
    112233
    Street 4
    Name1
    this data shoud be inserted in Oracle table ORAC.
    when we write new record in Oracle table for example
    01
    445566
    New Street
    Name2
    this data shoud be inserted in ZTABLE.
    Field TEL1 can be only of two values 01 or 02, other combination is not valid...
    I must have all data from Oracle table ORAC in ZTABLE and opposite.
    It should be the same scenario for DELETE...
    And this communication should be online between sap and table in oracle database...
    Can u help me from sap side? and give idea how to configure on oracle side??
    Thanks a lot,
    Nihad

    I dont know if we can directly connect to a oracle database ( wait for the answers from others on this )
    but in XI we have the JDBC adaptor to insert and retrieve data.
    so for the outbound from SAP the flow can be something like this (with XI in landscape):
    1) You have a screen to maintain a new entry / delete an entry
    2) On save , this record gets saved or deleted from the Ztable in SAP
    3)) In the same screen you can call a proxy class-method (generated using SPROXY transaction ) to send the record to XI.
    4) XI to format it and insert into the oracle table
    Mathews

  • Can't connect to external Oracle DB with JDBC connector

    Hello guys,
    I had failed to connect to connect external Oracle  via JDBC connector .
    Could you please help me to resolve the problem ?
    Backgroud:
    We need to connect the external Oracle DB with JDBC connector, because BI need to connect to the target Oracle. If the JDBC connector suceed, BI will create a UD which use the datasource
    we create in Visual admin to connect to the external Oracle DB.
    Environment:
    Our EP version is NW04S SP17 , OS is AIX .
    The target Oracle DB version is 10g(10.1.0.2.0, 64bi).
    Configuration procedure :
    1. Import Oracle driver "ojdbc14.jar" and create new driver which named "Oracle "  under
    JDBC Connector ->Run time ->Driver  in Visual Admin.
    2. Create datasource "Mydatasource" under JDBC Connector ->Run time ->Data Source,
    Name : Mydatasource
    Driver Name : Oracle
    JDBC version: 2.0(with XA support)
    JDBC compliant:
    Object Factory :oracle.jdbc.pool.OracleDataSourceFactory
    DataSource Type: ConnectionPoolDataSource
    *CPDS class name :oracle.jdbc.pool.OracleConnectionPoolDataSource
    Additional:
    Additional Properties:
    DatabaseName:LPAR8TEST
    DriverName:oracle.jdbc.OracleDriver
    Password: *****
    PortNumber:1521
    ServerName: 10.1.16.208
    URL :jdbc:oracel:[email protected]:1521:LPAR8TEST
    User:IMPL
    Connectoin Pool:
    Initial Connectons: 1                                         Expiration:  (check)
    Maximum Connections: 25                                  Connection Lifetime :600
    Maximum time wait of connection : 60                  Cleanup Thread : 200
    Default Connectoin Isolaton :Default
    SQL Engine:
    Open SQL
    3.Create Connector :
       Copy the standard connector :SDK_JDBC to SDK_JDBC_Oracle,
      Resource Adopter:
      Loader References:
      Add "libray:Oracle" .
    Managed Connection Factory:
    Configuration Property:
    DriverName:oracle.jdbc.OracleDriver
    Password: ****
    User:IMPL
    URL: jdbc:oracle:[email protected]:1521:LPAR8TEST
    All fo my configuration had been listed.
    And I had created JCO RFC : JT-BIDEV_PORTAL_BD1 , and created RFC connection with SM59 in BI.
    Please give me some suggesiton.
    Thanks.
    Louis

    When I try to start datasoure "Mydatasource" , it display error, error detail:
    java.rmi.RemoteException: com.sap.engine.services.dbpool.exceptions.BaseRemoteException: Error during start of application "sap.com/Mydatasource". [id = StartupError]
         at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.startApplication(DataSourceManagerImpl.java:608)
    Caused by: java.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
         com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 3128050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot start DataSource "CGNPC".
         at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSource(ContainerImpl.java:1549)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at com.sap.engine.services.dbpool.spi.CPManagedConnectionFactoryImpl.createManagedConnection(CPManagedConnectionFactoryImpl.java:198)
    Caused by: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 3128050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot start DataSource "Mydatasource".
         at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSource(ContainerImpl.java:1549)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at com.sap.engine.services.dbpool.spi.CPManagedConnectionFactoryImpl.createManagedConnection(CPManagedConnectionFactoryImpl.java:198)
    Caused by: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
              u2026.
    When I try to test JDBC with URL : http://jt-pldev:50000/TestJDBC_Web/TestJDBCPage.jsp,
    First I choose connection name "SDK_JDBC_Oracle" .
    If I click "Check Connectons", it display :
    500   Internal Server Error
    SAP J2EE Engine/7.00
      Application error occurred during request processing.
      Details:
      java.lang.NoClassDefFoundError: com.sap.ip.bi.sdk.dac.connector.odbo.impl.Connection (initialization failure)
    Exception id: [001A64A86F2C006B000004C40010302A000469C74E86A096]
    If I click "Slecton Connection", it display:
    500   Internal Server Error
    SAP J2EE Engine/7.00
      Application error occurred during request processing.
      Details:
      com.sap.engine.frame.core.load.SAPNoClassDefFoundError: javax.resource.Referenceable
    Exception id: [001A64A86F2C0063000004C00010302A000469C74FA2BB59]

  • NCHAR issue with oracle database using JDBC adapter

    Hi,
    We have a requirement to develop an XI interface from FTP server(File adapter) to oracle database using JDBC adapter. In the oracle database table few fields are of type NCHAR/NVARCHAR. when we try to insert the character(A,B,c..) values into oracle table fields of type NCHAR/NVARCHAR, we are getting the following error message in the JDBC adapter audit log. IF we pass the numeric value to the same field, then we are able to insert the records successfully.
    Unable to execute statement for table or stored procedure. 'IPCSDD_DOWNLOAD_PROCESS' (Structure 'StatementName1') due to java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    Please find the system information below.
    Oracle version- 10.2.4
    XI version - 3.0/ service pack 19
    JDBC driver- oracle.jdbc.driver.OracleDriver
    Please suggest.
    Thanks,
    Venkata
    Edited by: Venkata Narayana  Eepuri on Oct 21, 2010 12:10 AM

    Dear Venkata Narayana,
    Concerning the error, kindly go through the following note :
    731 - Collective note: ORA-00904
    follow the recommendations mentioned in that and please check if that helps.
    Best Regards
    Nishwanth

  • Oracle Lite Sync error

    Im getting the following error when sync. ???? Cant trace it please help
    Sync session exception stack trace:
    java.sql.SQLException: ORA-00932: inconsistent datatypes: expected DATE got NUMBER
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:242)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:554)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1478)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2077)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1987)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2704)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:458)
         at oracle.lite.sync.Subscription.execPrepUpdate(Unknown Source)
         at oracle.lite.sync.DmlProcessorM.executeInsertUpdate(Unknown Source)
         at oracle.lite.sync.DmlProcessorM.executeInsertUpdate(Unknown Source)
         at oracle.lite.sync.DmlProcessorDB.reExecuteDml(Unknown Source)
         at oracle.lite.sync.DmlProcessorDB.flushIs(Unknown Source)
         at oracle.lite.sync.HeliosSession.startSession(Unknown Source)
         at oracle.lite.sync.resume.Client$1.run(Unknown Source)
         at oracle.lite.sync.resume.ThreadPool$PoolTask.run(Unknown Source)

    I know the Database Mobile Server (inc. legacy Database Lite) forum doesn't get a lot of traffic but it really is the best place to ask Lite questions. It is an entirely different product from the real database and as such requires specialist knowledge.
    At the very least you should cross-post these questions there. I'm not normally a fan of duplicate postings but I make exceptions for these cases.
    Good luck, APC

  • Connecting Oracle 8i with JDBC

    Hi Friends,
    I am facing a problem while doing a connection to my DB which is ORACLE 8i with JDBC communication channels thorugh xi.
    I am getting an error "Error during database connection to the database URL 'jdbc:oracle:thin:@hostname:ORCL' using the JDBC driver 'oracle.jdbc.driver.OracleDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:oracle:thin:@hostname:ORCL': SAPClassNotFoundException: oracle.jdbc.driver.OracleDriver"
    In one of the SAP notes:867176 its mentioned .....
    3. Which JDBC driver version is certified to connect to which database version?
                  From the Oracle side:
                  The Oracle 10g JDBC drivers are certified to work with currently-supported versions of the database.
                  JDBC 8i/9i Thin drivers are certified to work with supported (previous) versions of the database.
                  Existing and supported JDBC drivers are certified to work with Oracle Database 10g.
                  From the SAP side:
                  SAP only supports homogeneus setups. The oracle driver major version must match the database major version, and the driver version must not be smaller than the database version.
                  SAP does not support Oracle 8i drivers.
    Is it not possible to connect to my DB?  Is SAP supports the connection to 8i oracle database? any idea,,,
    Regards,
    Sunil.

    Hi,
    Following is the connection string that we are currently using for connecting to Oracle 8i.
    This setting has been working for us. give it a try.
    connection string : jdbc:oracle:oci8:userid/password@server
    Note that this connection string is only if you use the Oracle OCI driver. The OCI driver requires a shared library or DLL on the server.
    The thin driver for Oracle is more commonly used as it doesn't require any additional libraries. The connection string is as already listed above:
    jdbc.oracle.thin:@server:port:SID
    There is no need to put the user and password into the connection string in the adapter config, putting it into the user and password fields works just fine.
    Regards,
    Suryanarayana

  • TIME_OUT in SAP when accessing external Oracle table thru native SQL

    Hi,
    I have a problem in one of my native SQL statement. It takes a long time accessing the table considering that the number of records to be retrieved is only small.
    Something happened on the Oracle system. But, stilll to be confirmed. Before, there wasn't any issue. Looking further, I found that when the value in the where clause equated is a literal (meaning the value is not declared in DATA or CONSTANTS in the ABAP Program)
    Example
    1.
    EXEC.
    WHERE FIELD = '1'
    ENDEXEC.
    instead of
    2.
    CONSTANTS: c_1 value '1'.
    EXEC.
    WHERE FIELD = c_1
    ENDEXEC.
    i found that when the way of coding is same as Example 1, a time-out error occurs. But when in Example 2, no issue.
    Can someone explain this? is their something that could affect SAP with respect to Oracle configuration?
    Thanks!

    I wonder if you could share the outline of your code to access an external oracle database.   I've just been given the assignment to do just that, but don't know where to start.
    thx,
    Mike DeGuire

  • Insert data 32K into a column of type LONG using the oracle server side jdbc driver

    Hi,
    I need to insert data of more than 32k into a
    column of type LONG.
    I use the following code:
    String s = "larger then 32K";
    PreparedStatement pstmt = dbcon.prepareStatement(
    "INSERT INTO TEST (LO) VALUES (?)");
    pstmt.setCharacterStream(1, new StringReader(s), s.length());
    pstmt.executeUpdate();
    dbcon.commit();
    If I use the "standard" oracle thin client driver from classes_12.zip ("jdbc:oracle:thin:@kn7:1521:kn7a") every thing is working fine. But if I use the oracle server side jdbc driver ("jdbc:default:connection:") I get the exception java.sql.SQLException:
    Datasize larger then max. datasize for this type: oracle.jdbc.kprb.KprbDBStatement@50f4f46c
    even if the string s exceeds a length of 32767 bytes.
    I'm afraid it has something to do with the 32K limitation in PL/SQL but in fact we do not use any PL/SQL code in this case.
    What can we do? Using LOB's is not an option because we have client software written in 3rd party 4gl language that is unable to handle LOB's.
    Any idea would be appreciated.
    Thomas Stiegler
    null

    In rdbms 8.1.7 "relnotes" folder, there is a "Readme_JDBC.txt" file (on win nt) stating
    Known Problems/Limitations In This Release
    <entries 1 through 3 omiited for brevity >
    4. The Server-side Internal Driver has the following limitation:
    - Data access for LONG and LONG RAW types is limited to 32K of
    data.

  • SAP SRM Prod with Oracle DB and AIX 5.3 Performance Issue.

    Hi Basis Gurus,
    Today my SAP PRD system all of a sudden was running slow and users had difficulties executing TCodes as it took minutes before the screen appeared.My system is SAP SRM 4.00, Oracle Release 11.2.0.1.0 and AIX 5.3.
    From Basis point of view , we noticed that all the work process were hanged due to RFCs' occupying it.Couldnt investigate further on the system as we needed to restart asap because users needed to log on. A quick check on SICK shows no errors.What we managed to find out is that we needed to check this parameter below and set it accordingly:-
    rdisp/rfc_min_wait_dia_wp:-
    Definition
    Number of work processes kept free for other users.
    Use
    This parameter is used to reserve a number of dialog work processes for dialog mode. It prevents parallel RFCs from occupying all the processes.
    The parameter rdisp/wp_no_dia specifies the absolute number of dialog work processes.                               
    Unit: number of dialog work processes
    Default value: 1
    Example
    If 10 dialog work processes are configured for the instance (rdisp/wp_no_dia = 10) and the parameter rdisp/rfc_min_wait_dia_wp  = 3 is set, parallel RFCs can occupy a maximun of 7 dialog work processes. Three dialog work processes always remain free for dialog mode.
    There are 20 DIA processes in our system, perhaps reserving a minimum of about 5 work processes for DIA users will be useful via the parameter.
    So my first question would be is there any other suggestions besides adjusting the mentioned parameter above in order to ensure that no work processors going into hang state due to RFCs' occupying it as this issue always happens at the end of the month only when there are massive users accessing it.
    When we went for a restart of the system we encountered another issue. Steps to the issue are as below:-
    1) Did a proper shutdown of Oracle and SAP.
    2) When we start using startsap script, it doesn't start DB so we started DB manually but listener was having problem
        so we stopped all.
    3) We also did a cleanipc, it too throws below error:-
    sidadm> cleanipc <systemno> remove
                   exec(): 0509-036 Cannot load program cleanipc because of the following errors:
                   0509-130 Symbol resolution failed for cleanipc because:
                   0509-136   Symbol memmove (number 106) is not exported from
                   dependent module /usr/sap/sid/SYS/exe/run/libsapu16.so.
                   0509-192 Examine .loader section symbols with the
                   'dump -Tv' command.
    4) Also the Listener file has no contents,it's null file.
    5) This is another error :-
        exec(): 0509-036 Cannot load program /oracle/sid/112_64/bin/tnslsnr because of the following errors:
        0509-150   Dependent module /oracle/sid/112_64/lib/libttsh11.so could not be loaded.
        0509-101   The module has too many section headers
        or the file is damaged
    The libttsh11.so file was empty dated 25th timestamp as below in PRD:-
    -rw-rr    1 sid   dba               0 Nov 25 07:12 libttsh11.so
    Further checking has let me to understand this is an Oracle Bug from this link:-
    http://gavinsoorma.com/2009/12/11-1-0-6-clusterware-upgrade-to-11-1-0-7/
    This Oracle bug only happens in an Upgrade time and how could this happen to my Production system during a restart process.
    Also this system was restarted during the last weekend's maintainance window and it came up with no issues.
    6) We copied over the libttsh11.so from our QA environment to PRD and did a Startup:-
    -rwxr-x---    1 sid   dba        65967496 Nov 25 07:40 libttsh11.so (This is the copied over file from QA)
    7) After Startup everything has been in order till now.
    My second question is what went wrong with the libttsh11.so file. How could it be 0 size in PRD when no signs of changes had happen to the PRD system. Is this a proven Oracle Bug or something else since I have never encountered anything like this before. Hope all the Gurus here could shed some light into my 2 questions as I am looking for positive answers.
    Thank you.
    Regards,
    John

    Hi,
    Firstly I would suggest you to upgrade your database from Oracle Release 11.2.0.1.0 to Oracle Release 11.2.0.2 . This is the recommended Oracle 11g database version  for SAP solutions. Many of your problem will get resolved with it.
    Question 1:
    So my first question would be is there any other suggestions besides adjusting the mentioned parameter above in order to ensure that no work processors going into hang state due to RFCs' occupying it as this issue always happens at the end of the month only when there are massive users accessing it.
    For immediate resolution the approach you have followed is correct viz limiting number of dialog processes for RFC. Secondly you need to analyze why RFC processing takes so much time. You need check which programs are getting executed by those RFC.
    Generate EarlyWatch report for more detailed view
    Question 2:
    My second question is what went wrong with the libttsh11.so file. How could it be 0 size in PRD when no signs of changes had happen to the PRD system. Is this a proven Oracle Bug or something else since I have never encountered anything like this before.
    The libttsh11.so library cannot be found in the related directory.
    Cause
    The file system is mounted using CIO option, but per Note 257338.1 Direct I/O (DIO) and Concurrent I/O (CIO) on AIX 5L, an ORACLE_HOME on a filesystem mounted with "cio" option is not supported.
    Such a configuration will cause, installation, relinking and other unexpected problems.
    Solution
    Disable the CIO option on the filesystem.
    References
    NOTE:257338.1 - Direct I/O (DIO) and Concurrent I/O (CIO) on AIX 5L
    Hope this helps.
    Regards,
    Deepak Kori

  • Local oracle access with jdbc thin

    hello there
    it need help despratly,
    im developing an applet to talk to remote oracle dbs using jdbc
    thin
    but i also want an applet to be able to talk to a local oracle db
    on the same hardisk.
    for a remote connection the follwing stringis used at my
    university
    static final String connect_string =
    "jdbc:oracle:thin:scott/[email protected]:1521:DSC1";
    but what do i subsitute for thr host as i want to access the db
    on my hard disk?
    i need as much help ASP, as im well behind my schedule for this
    project.?
    also i take it that to allow this and access to remote servers
    other than the web server, the applet needs to be signed, is this
    possible with jdk1.1.x compatble browsers?
    yours
    richard sergio marchesi
    email - [email protected]
    or
    email - [email protected]
    null

    The thin driver reqiures a TCP listener to be running. If you are
    using Personal Oracle for the 'local' RDBMS then it doesn't have
    a listener (with the default installation). Start the listener
    and you should be able to connect. You will also want a local
    webserver of some sort to serve the applet to you as well, but
    anything (even TinyWeb) will do for that.
    null

  • Migration software from SAP R/3 to Oracle eBusiness Suite

    Is there any Oracle product which can migrate an Oracle 9i R2 database for SAP R3 to eBusiness Suite?
    Has any one successfully integrated an SAP R/3 system with eBusiness Suite?

    Check the following links:
    How to migrate data from SAP to EBS? What's your solution and tools?
    Re: How to migrate data from SAP to EBS? What's your solution and tools?
    Oracle Helping SAP Customers to get “OFF SAP”
    http://www.oracle.com/corporate/press/2005_jun/sap.html
    SAP shops migrate to Oracle Applications
    http://www.dba-oracle.com/oracle_news/news_sap_migrate_oracle_applications.htm

  • Oracle Database 10g JDBC Samples on OTN

    Review the OTN's new Oracle Database 10g JDBC Samples that illustrate new features introduced with Oracle10g JDBC Driver. The features illustrated are Connection Cache, Named Parameter Support, IEEE Datatypes, Thin Driver support for PLSQL Index by Tables and Web Rowset. Also watch out for samples on Datalinks, New Encryption Algorithms, Globalization Support, Shortcuts for CLOB manipulation and more to be hosted shortly.
    The samples are available at,
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/oracle10g/index.html

    I suppose that is nice.
    It would be even nicer if the drivers actually conformed to JDBC so that one could for example reliably use blobs in a J2EE server with CMP.

  • Problem:I can't get oracle MajorVersion using jdbc in 9.2.0.1.0!

    I can't get oracle MajorVersion using jdbc in 9.2.0.1.0,how can i do and how many oracl version can't get MajorVersion?
    thanks,erveryone! online waiting

    What errors are you getting? Can you post the codew you are using to get MajorVersion.

  • SetString/executeBatch fails in Oracle 10g OCI JDBC driver

    Hi,
    I am using Oracle 10g OCI jdbc driver for batch updates.
    Following is the the code that I am using
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.jdbc.pool.OracleDataSource;
    public class BatchUpdates
    public static void main(String[] args)
    Connection conn = null;
    Statement stmt = null;
    PreparedStatement pstmt = null;
    ResultSet rset = null;
    int i = 0;
    try
    String url = "jdbc:oracle:oci:@kctutf8";
    try {
    String url1 = System.getProperty("JDBC_URL");
    if (url1 != null)
    url = url1;
    } catch (Exception e) {
    OracleDataSource ods = new OracleDataSource();
    ods.setUser("kctuser");
    ods.setPassword("kana");
    ods.setURL(url);
    conn = ods.getConnection ();
    stmt = conn.createStatement();
    try { stmt.execute(
    "create table mytest_table (col1 number, col2 varchar2(20))");
    } catch (Exception e1) {}
    pstmt = conn.prepareStatement("insert into mytest_table values (?, ?)");
    pstmt.setInt(1, 1);
    pstmt.setString(2, "row 1");
    pstmt.addBatch();
    pstmt.setInt(1, 2);
    pstmt.setString(2, "row 2");
    pstmt.addBatch();
    pstmt.setInt(1, 3);
    pstmt.setString(2, "row 3");
    pstmt.addBatch();
    pstmt.setInt(1, 4);
    pstmt.setString(2, "row 4");
    pstmt.addBatch();
    pstmt.setInt(1, 5);
    pstmt.setString(2, "row 5");
    pstmt.addBatch();
    pstmt.executeBatch();
    rset = stmt.executeQuery("select * from mytest_table");
    while (rset.next())
    System.out.println(rset.getInt(1) + ", " + rset.getString(2));
    catch (Exception e)
    e.printStackTrace();
    finally
    if (stmt != null)
    try { stmt.execute("drop table mytest_table"); } catch (Exception e) {}
    try { stmt.close(); } catch (Exception e) {}
    if (pstmt != null)
    try { pstmt.close(); } catch (Exception e) {}
    if (conn != null)
    try { conn.close(); } catch (Exception e) {}
    When I run this class I get the following output
    1, row 1
    2, row 3
    3, row 5
    4, null
    5,
    But It should have been
    1, row 1
    2, row 2
    3, row 3
    4, row 4
    5, row 5
    The same class runs fine if I use Thin driver.
    Can anyone please help me solve this issue.
    Note: This happens only in case we use setString with Varchar2 in the DB. This works fine if I have two number columns
    Thanks,
    Raja.S

    Please post this question to the Java forum. It is located under "Technologies".

  • How to configure SAP 4.7 to Oracle 9i Real Application Cluster ?

    We are using SAP 4.7 running on Oracle 9i with HP-UNIX clustering.
    If we change our existing SAP 4.7 for Oracle 9i Real Application Cluster, is it very complicated ?
    Do we need to re-install SAP and Oracle ?

    Both 4.7 and Oracle 9 are already out of support.
    If you plan to use RAC then I'd first upgrade the application and the database and then implement RAC. You won't have support for your environment without additional costs.
    Markus

Maybe you are looking for