Accessing CLOBs in Oracle 8i

From the research i've done, it seems that there are two ways to access CLOBs in Oracle 8i: InputStream or Reader.
The InputStream method uses byte streams and the Reader uses character streams.
Is that correct? I haven't been able to determine the pros/cons of the two approaches. Can anyone shed some light on this for me?

Jack Shirazi claims in his book, "Java Performance Tuning", that in most situations Readers provide better performance than InputStreams.
Read the section, "From Raw I/O to Smokin' I/O", in Chapter 8 for details.

Similar Messages

  • Using dblinks to access CLOB datatype

    Hi ,
    I am using dblink to access data data from remote database. I need to access data form a table on remote database which have fields of type VARCHAR2 and CLOB. Since I can't access CLOB data directly through dblinks, i created a view for that CLOB datatype. Now when I try to retrieve the data from remote tab1 by joining that view and tab1 ,I am getting the error
    ORA-22992: cannot use LOB locators selected from remote tables .
    But if I retrieve the data from view alone, I am able to retrieve the information.
    And if try to access the varchar2 field alone using dblinks that also will work. But if I combine both the view and same table used in that view, it doesn't work.
    I think this can be solved by puting all the required fields(CLOB and non-CLOB) in view. In real situation, the number of fileds that will not have CLOB datatype in tab1 is high.
    Can someone tell some suggestion on how to resolve this?
    Thanks in Advamce,
    Dalia

    I assume that you likely do not have Metalink (Oracle Support) access. Here is the Metalink Note on this topic.
    Subject:  ORA-22992 When Trying To Select Lob Columns Over A Database Link
    Doc ID:   Note:119897.1      
    Type:      BULLETIN
    Last Revision Date:      24-JUL-2002      
    Status:  PUBLISHED
    PURPOSE
    This document discusses whether or not a lob column can be selected over a
    remote database link.
    SCOPE & APPLICATION
    This document is written for all audiences.
    This information is based on the tests made in Oracle 8.1.5 and Oracle 8.1.6
    and the available Oracle documentation on LOB (large Object) data and issues
    logged with Development on the select of a LOB column over a remote database
    link.
    How to select a LOB column over a database link?
    (A) You cannot actually select a lob column (i.e. CLOB column) from a table
         using remote database link.  This is not a supported feature.
    For example,
    You run the following command from the local instance to a remote database
    instance called R816 over a dblink R816 created in the local instance for user
    SCOTT. You have logged in as user Scott and the remote table CLOBT has 2
    columns C1 and C2 as below:
    $ sqlplus scott/tiger@r816utf8
    SQL> create database link r816
          connect to scott identified by tiger
          using 'rtcsol1_r816.us.oracle.com';
    SQL> desc clobt@r816
          Name                          NUll?    Type
          C1                            NOT NULL NUMBER
          C2                                     CLOB
      SQL> select c1, c2
           from clobt@R816;
           ORA-22992: cannot use LOB locators selected from remote tables
      SQL> select c1, dbms_lob.getlength(c2)
           from clobt@R816;
           ORA-22992: cannot use LOB locators selected from remote tables
      Error:  ORA-22992
      Text:   cannot use LOB locators selected from remote tables
      Cause:  A remote LOB column cannot be referenced.
      Action: Remove references to LOBs in remote tables.
    (B) Also, these are the INVALID operations on a LOB column:
         1. SELECT lobcol from table1@remote_site;
         2. INSERT INTO lobtable select type1.lobattr from table1@remote_site;
         3. SELECT dbms_lob.getlength(lobcol) from table1@remote_site;
    In short, you cannot select a lob column using remote dblink. You have to use
    DBMS_LOB package in a programming language like PL/SQL, JAVA to manipulate LOB
    data.
    RELATED DOCUMENTS
    Oracle8i Application Developer's Guide - Large Objects (LOBs) Release 2 (8.1.6)
    Chapter Managing LOBs: LOB Restrictions

  • Oracle Streams b/w MS-Access 2007 and Oracle 10g.

    Can we set up Oracle Streams between MS-Access 2007 and Oracle 10g? Ms-Access as source and Oracle 10g as destination database. If so, can any one please give me little heads up with supported doc's or any source of info.

    Help Help....!!!

  • MS Access 2000 and Oracle 8

    Hello,
    I need to provide access to a Oracle (v 8) table via MS Access 2000. I am doing so via Link Tables in MS Access.
    But I am not able to see the new tables that I created, in the list of tables available for linking from the Oracle schema, in Access.
    How can I rectify this?
    Thank you.
    Raj
    Message was edited by:
    user492218

    I think you'd need to contact Oracle support to get access to older versions of the driver.
    Since 8.0.5 isn't supported any longer, however, is it possible for you to update your Oracle client to one of the supported releases-- 8.1.7 or 9i?
    Justin

  • How can i view the data from Access DB in oracle

    pls tell me that how can i view the data of MS ACCESS DATABASE in ORACLE.i was use ODBC of ACCESS DATABASE AND THEN CREATE DATABASE LINK IN ORACLE BUT NOT YET SUCCEEDED.PLS TELL ME THE PROCEDURE.
    regard's

    hi,
    u nedd to use Oracle Hetrogeneous Services,,
    full details of the procedure u may fing on metalink
    Regards

  • Error While reading CLOB from Oracle using WebLogic Connection Pool, Works fine with out using pool

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

  • How to find users machine / IP who is accessing forms through Oracle AS

    Dear Gurus
    We need to know the users machine / IP who are accessing forms through Oracle 9i Application Server, how can we find that?
    thanks in advance
    regards
    Mehmood

    Mehmood,
    Set serverURL=/forms90/f90servlet/session in the Forms Web configuration default section or add it to the URL to start tracing host name and ip-addresses from clients. The output appears in the servlet log file application.log. sessionperf , perf and debug are the other options instead of session.
    regards,
    Bernhard Jongejan
    http://bernhardjongejan.spaces.live.com

  • How to export a table of data from MS Access 2007 to Oracle 11g

    I have been looking all over trying to find a way to get a table from Access 2007 to Oracle 11g. I tried using the export options in Access but can't get them setup correctly I guess. What are the steps to setting this up correctly or is there another way to export the data?

    MS Access 2007 DB migration To oracle 10g

  • How can I get the content of clob in oracle db?

    In jsp,if I want to get the characters from CLOB column in ORACLE DataBase,what should I do?
    I am waiting for the answer hurrily.Thank you!

    import these two classes:
    import oracle.sql.CLOB;
    import oracle.jdbc.driver.OracleResultSet;To retrieve the clob, use
                  ResultSet rs;
                      get the rs from database
                  int i = 1;  //  this is the column Index in the rs
                  CLOB cl = ((OracleResultSet)rs).getCLOB(i);
                  int len = (int)cl.length();
                  String str = cl.getSubString(1,len);

  • MS Access Crosstab to Oracle SQL

    Gurus,
    I am trying to convert MS Access Query to Oracle SQL, What would be the Oracle query for this MS Access Crosstab Query?
    I am working on Oracle 10g so, I can't take advantage of oracle PIVOT function.
    Thank you
    Edited by: 951334 on Aug 10, 2012 6:52 AM
    Edited by: 951334 on Aug 13, 2012 5:51 AM

    if your crosstab columns are static you can use well-known technique like
    select tablespace_name,
    sum(case segment_type when 'TABLE' then bytes end) TABLES_BYTES,
    sum(case segment_type when 'INDEX' then bytes end) INDEXES_BYTES,
    sum(case segment_type when 'LOBSEGMENT' then bytes end) LOB_BYTES
    from dba_segments
    group by tablespace_name;
    for dynamic crosstab columns you require to build this query dynamically in application

  • How Offiline Data loading is possible from MS Access DB to Oracle DM

    HI All,
    I am new to Oracle.
    I am trying to migrate few tables from MS Access DB to Oracle DB (10g)
    I have used the migration utility from the Sql Developer tool.
    I was successful in creating the schema and also transferring the data for tables.
    But if my data in Access DB is updated everyday then how am i suppose to link this to newly created oracle tables?
    Is there any way to do this?
    And if i want to load the Oracle tables offline using "Generate Offline Data Move Scripts" option in sql developer then how do i do it?
    I tried using the option "Generate Data Move Scripts" right click option on converted object then the utility created few files on my local machine.
    I am not able to make my way fwd.
    Please help me.
    regards,
    Sushil

    Hi Sushil,
    I will try to address each of your questions:
    Q: "if my data in Access DB is updated everyday then how am i suppose to link this to newly created oracle tables? Is there any way to do this?"
    A: Depending on your reasons for maintaining the use of the MS Access database, you have two options.
    1. lf you are continuing to use the MS Access database because the application front end is MS Access forms & reports then you could just create linked tables to the newly migrated Oracle tables. Doing so will mean that any data modified via the frond end forms & reports will be saved directly in the Oracle database.
    2. If you wish to continue saving data to the MS Access database, then transfer it to the Oracle database, then you can just use the "Migrate Data" option in Oracle SQL Developer Migration Workbench to carry out this task. You just need to ensure that you've an open connection to your migration repository, and have the converted model for the migrated database. You will then just transfer the data online, like you have already done.
    Q: "And if i want to load the Oracle tables offline using "Generate Offline Data Move Scripts" option in sql developer then how do i do it?"
    A: To migrate your MS Access data offline, you need to do the following:
    1. Run the Exporter tool for MS Access, and select the "Export for Oracle SQL Developer" option. On the second screen of the tool, browse to the location of your MDB file, provide a location for the output directory and ensure you select the "Export Table Data" option before you click the "Export" button. This option generates a .DAT file for each table containing data in your MDB file.
    2. In Oracle SQL Developer, once you have carried out your migration, select the Migration > Script Generation > Generate Data Move Scripts menu item and select the Converted Model to generate the scripts for. An "MSAccess" folder will be generated in the path specified in the "Generate Offline Data Move Files" dialog.
    3. Navigate to the "MSAccess" folder generated in step 2, and this folder should contain a "oracle_ctl.bat" file, which
    for your converted model.
    4. Edit the "oracle_ctl.bat" file and update the script to replace <Username>/<Password> with the actual username/password combination required to connect to the migrated schema e.g. for a migrated Northwind database, this combination would be northwind/northwind. Save the changes to the file.
    5. Copy the .DAT files generated in step 1 to the /MSAccess/Oracle folder. The .ctl files refer to the .DAT file in order to load the data into Oracle using SQL*Loader.
    6. Open each of the .ctl files and check the file name referenced on the 2nd line of the file e.g. infile '[Categories].null', where the file name is "Categories.null". The ".null" part must be updated to ".dat". This is a known issue and a fix for this will be available in a future release of the Oracle SQL Developer Migration Workbench. Save the changes to the .ctl files.
    7. Open up a Command Prompt & navigate to the /MSAccess folder, and run the "oracle_ctl.bat" file to load the data into the Oracle database tables. If you experience any issues during this process, check the output in the command prompt & try to resolve any reported issues. If you are unable to do so, please refer to the Migration Workbench forum - Database and Application Migrations If you cannot find a solution from the existing threads, please post a new thread, giving the full syntax of any reported error messages.
    I hope this helps.
    Regards,
    Hilary

  • Importing Access Data into Oracle Forms through Forms 10g

    Sirs,
    How can i import the data of Access file into Oracle tables.
    i have the tables in access of approx 10 how can it be imported in oracle with same data structure.
    ThanX in advance

    DECLARE
    kAccess client_ole2.obj_type;
    kdb client_ole2.obj_type;
    ktables client_ole2.obj_type;
    krec client_ole2.obj_type;
    kcurr client_ole2.obj_type;
    begin
    kaccess:=client_ole2.create_obj('Access.application);
    kdb:=client_ole2.invoke_obj(kaccess,'open','D:\acc.mdb');
    ktables:=client_ole2.get_obj_property(kdb,'tables',1);
    //then process teh data of the table which is at 1 using another
    krec:=client_ole2.invoke_obj(ktables,'count');
    for s in 1 .. krec
    loop
    /// code for sinserting the current records data into the oracle tables.
    kcurr:=client_ole2.get_obj_type(ktables,'recordset',s);
    // then access each filed in kcurr and then insert in oracle table
    end loop;
    end;
    the above code is not tested your can alter any syntatical error if any.

  • Upload data from Access Database to Oracle Database In oracle 8i

    hi everybody
    i am trying upload data from Access database to Oracle Database
    i have TT(F1,F2,F3) table in Access Databsse
    and emp(ename,ecode,sal) in oracle Database
    db_ac is my datasource name
    when i connect to Access Database thru this command this show following error
    SQL> connect a/a@odbc:db_ac;
    ORA-00022: invalid session id; access denied
    ORA-00022: invalid session id; access denied
    ORA-00022: invalid session id; access denied
    Error accessing PRODUCT_USER_PROFILE
    Warning: Product user profile information not loaded!
    You may need to run PUPBLD.SQL as SYSTEM
    Server not available or version too low for this feature
    ORA-00022: invalid session id; access denied
    Connected.
    when i am trying copy data as this command it show error and data not copied.
    SQL> COPY FROM A/A@ODBC:DB_AC TO test/test@ora INSERT EMP USING SELECT F1,F2,F3 FROM TT;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    ORA-00022: invalid session id; access denied
    ERROR:
    OCA-00022: general OCA error
    can help me .
    with thanx

    Hi there,<br>
    <br>
    Please kindly use instead the Database Forum at:-<br>
    General Database Discussions<br>
    <br>
    ... to place your question as this is for the Oracle Portal product Export / Import functionality.<br>
    <br>
    <br>
    Kind regards,<br>
    Pedro.

  • Converting Varchar into Clob in Oracle 8i

    Hi All,
    Kindly tell me how can we convert a varchar variable into a Clob in Oracle 8i inside a stored procedure. I searched alot on the net, we have a To_Clob function available from 9i but doesn't exist in 8i. There was also talk about using dbms_lob, but i dont know how to use that to convert it.
    Kindly provide me with the details of how to do this as I am just starting out with Oracle.
    Thanks in Advance,
    Sajid.

    Hi,
    You can use the dbms_lob.to_clob() function(In oracle8i).
    In oracle 9i it is not required.
    Thanks & Regards
    venkata

  • Copy access data into oracle with form builder 9i

    hello
    i need to copy/import data and tables from an MS access database into oracle 9i database. the situation is each time i login to my forms applicatin i will need to do that. any idea pls...
    the access db is frequently updated. so when i login into my forms application it needs to be reimport the data from access db. can any1 pls help me?

    To my opinion, there are 3 potential approaches :
    1. rewrite the application, that data are stored directly in the oracle database
    or the program writes flat files somewhere to the file system which are able getting
    imported from the target instance on daily basis or job driven;
    2. The "Access-driven approach" : link oracle tables into the MS-Access application
    using an ODBC-connection and build a macro in Access which is exporting the stuff to
    the target instance; in order to do so, the Oracle Client and ODBC-Drivers needs to
    get installed on the PC where MS-Access is started to start the exportation process
    (which is probably yours).
    You may then create tables in the target instance and link them from within Access
    using ODBC as the datasource
    3. The "Oracle driven approach". explained in detail here, never tried it, but maybe
    worth a look
    http://www.orafaq.com/node/60
    Basically, install the Oracle Software on a PC, configure an ODBC-Connection and start a
    Listener there;
    The target instance (which may no run on a UNIX system) is now able to commuincate
    with the local running listener on your PC which itself is instantiating a connection to
    the Access "Database" using the ODBC-Connection.
    In this way, your PC acts as a database server from the Oracle Net point of view.
    In theory, this could even work, depending on the ability to connect from the
    instance server directly to the given IP of your PC (Security ?? Hmmmz)

Maybe you are looking for

  • Error message everytime after waking computer

    So I bought a new Lenovo ideapad S415 touch a week ago. installed ram from 4g to 8g ddr3. Then I got Windows 8.1 from 8. After I got 8.1 my laptop ran extremely slow then I somehow fixed it by changing some settings and removed some adware. So after

  • Flash play troubles

    At screen 3 of 3 there seems to be no out   can anyone explain how to finish it Message was edited by: Worker

  • A Possible SetInterval Disaster

    Hi All, I have recently used the SetInterval class in flash 8 to help me create a delay before initiating an action However I was told that it is the issue behind several inconsistency or error that I was facing. And after removing it, some of the pr

  • My Norton toolbar doesn't workm in Firefox 21. It says it is incompatible with said version of Firefox. It is Norton toolbar version 2013.3.4.3.

    Also, there is no "enable" button next to the listing in add-ons list. I have the most current version of Norton Internet Security installed and there are no further updates available on Liveupdate. How do I resolve this issue?

  • User ID ........PM Module

    Dear All, Now, we have different plant sections, Maintenance work center & Planner Groups for Plant Maintenance Module. Can i restrict the users for creating Maintenance Order on equipment of other work center ?? On planner Group its possible....but