Access BLOB field in Oracle database

Dear Sir,
I am using Pro* C to access oracle blob fields
I write "12345" to Oracle Blob field, when I read it it is fine.
I then modify this record to "ABC", when I read it, I get "ABC45",
How can I set blob field to the initial state to modify BLOB field correctly ?
Many Thanks
Liang

Initially you write 12345 and when you modify you are modiyfing only 3 bytes from offset 1 and hence the results. When you modify oracle will not erase the complete lob you need to use erase before you modify (write)
Following doc give you an insight into pl/sql lob functions
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_lob.htm#sthref4428
Following is the Pro*C Lobs Guide
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28427/pc_16lob.htm#i998068

Similar Messages

  • Storing a file in a BLOB field in the database through forms

    Hi, I want to have a form that lets the user choose a file he has on his client side and load this file into a BLOB field in the database.
    I know how to use "GET_FILE_NAME" to get the file, the second part is what I'm having problems with. Do I use an OLE object? How do I initailize it? Or what is the best way to go? Thanks.
    --Bassem                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Are you looking for something like this?
    DECLARE
       l_temp  clob;
       l_text  varchar2(2000);
    BEGIN
        l_temp := httpuritype('http://www.oracle.com/PO.xsd').getclob;
        l_text := substr(l_temp, 1, 2000);
        dbms_output.put_line(l_text);
    END;N.B.: Not Tested...
    Regards.
    Satyaki De.

  • "Error while accessing porting layer for ORACLE database via getSessionId()

    Hi,
    My ejb3.0 Entity is created from Emp table in scott/tiger schema of an Oracle 10g database. I am guessing I made some mistake creating the datasource or uploading the driver, because when I run my application, I get a long exception stack trace. The bottom-most entry in the stack trace is:
    Caused by: com.sap.sql.log.OpenSQLException: Error while accessing porting layer for ORACLE database via getSessionId().
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:148)
         at com.sap.sql.jdbc.direct.DirectConnectionFactory.createPooledConnection(DirectConnectionFactory.java:527)
         at com.sap.sql.jdbc.direct.DirectConnectionFactory.createDirectPooledConnection(DirectConnectionFactory.java:158)
         at com.sap.sql.jdbc.direct.DirectConnectionFactory.createDirectPooledConnection(DirectConnectionFactory.java:118)
         at com.sap.sql.connect.factory.PooledConnectionFactory.createPooledConnection(PooledConnectionFactory.java:119)
         at com.sap.sql.connect.factory.DriverPooledConnectionFactory.getPooledConnection(DriverPooledConnectionFactory.java:38)
         at com.sap.sql.connect.datasource.DBDataSourceImpl.createPooledConnection(DBDataSourceImpl.java:685)
         at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.matchPool(DBDataSourcePoolImpl.java:1081)
         at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.matchPooledConnection(DBDataSourcePoolImpl.java:919)
         at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.getConnection(DBDataSourcePoolImpl.java:67)
         at com.sap.engine.core.database.impl.DatabaseDataSourceImpl.getConnection(DatabaseDataSourceImpl.java:36)
         at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:123)
         ... 90 more

    Actually, now (after the GRANT described in my reply before) the Exception has changed to:
    Caused by: com.sap.sql.log.OpenSQLException: Error while
    accessing porting layer for ORACLE database via
    <b>getDatabaseHost</b>().
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException
    (Syslog.java:148)
         at com.sap.sql.jdbc.direct.DirectConnectionFactory.
    createPooledConnection(DirectConnectionFactory.java:527)
         at com.sap.sql.jdbc.direct.DirectConnectionFactory.
    createDirectPooledConnection(DirectConnectionFactory.java:158)
         at com.sap.sql.jdbc.direct.DirectConnectionFactory.
    createDirectPooledConnection(DirectConnectionFactory.java:118)
         at com.sap.sql.connect.factory.PooledConnectionFactory.
    createPooledConnection(PooledConnectionFactory.java:119)
         at com.sap.sql.connect.factory.DriverPooledConnectionFactory.
    getPooledConnection(DriverPooledConnectionFactory.java:38)
         at com.sap.sql.connect.datasource.DBDataSourceImpl.
    createPooledConnection(DBDataSourceImpl.java:685)
         at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.
    matchPool(DBDataSourcePoolImpl.java:1081)
         at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.
    matchPooledConnection(DBDataSourcePoolImpl.java:919)
         at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.
    getConnection(DBDataSourcePoolImpl.java:67)
         at com.sap.engine.core.database.impl.DatabaseDataSourceImpl.
    getConnection(DatabaseDataSourceImpl.java:36)
         at com.sap.engine.services.dbpool.spi.
    ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:123)
         ... 90 more

  • Show photoes using blob field in Oracle DB

    When create Crystal report using Blob field in Oracle 10g DB, the photoes are tif format stored in blod and there are multipages for every record. However in the Crystal Report,it just show the first page of the photo.
    Are there some ways to display all the pages? Or is it necessary to programming using java or .net to display?

    Not capable. CR will only show the first picture and not an album.

  • Error when reading BLOB field from Oracle usin Toplink

    We experience a very annoying problem when trying to read a BLOB
    field from Oracle 8.1.6.2.0 using TOPLink 3.6.3. I have attached the
    exception stack trace that is reported to the console. As far as I can
    judge a fault at oracle.sql.LobPlsqlUtil.plsql_length() happens first and
    then at TOPLink.Private.DatabaseAccess.DatabasePlatform.convertObject().
    The exception is permanently repeating that is very critical for us.
    ServerSession(929808)--Connection(5625701)--SELECT LOBBODY, ID, LABEL, FK_OBJECT_ID, FK_OBJECTTYPE FROM NOTE WHERE (ID = 80020)
    INTERNAL EXCEPTION STACK:
    java.lang.NullPointerException
    at oracle.sql.LobPlsqlUtil.plsql_length(LobPlsqlUtil.java:936)
    at oracle.sql.LobPlsqlUtil.plsql_length(LobPlsqlUtil.java:102)
    at oracle.jdbc.dbaccess.DBAccess.lobLength(DBAccess.java:709)
    at oracle.sql.LobDBAccessImpl.length(LobDBAccessImpl.java:58)
    at oracle.sql.BLOB.length(BLOB.java:71)
    at TOPLink.Private.Helper.ConversionManager.convertObjectToByteArray(ConversionManager.java:309)
    at TOPLink.Private.Helper.ConversionManager.convertObject(ConversionManager.java:166)
    at TOPLink.Private.DatabaseAccess.DatabasePlatform.convertObject(DatabasePlatform.java:594)
    at TOPLink.Public.Mappings.SerializedObjectMapping.getAttributeValue(SerializedObjectMapping.java:43)
    at TOPLink.Public.Mappings.DirectToFieldMapping.valueFromRow(DirectToFieldMapping.java:490)
    at TOPLink.Public.Mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:808)
    at TOPLink.Private.Descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:173)
    at TOPLink.Private.Descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:325)
    at TOPLink.Private.Descriptors.ObjectBuilder.buildObjectsInto(ObjectBuilder.java:373)
    at TOPLink.Public.QueryFramework.ReadAllQuery.execute(ReadAllQuery.java:366)
    at TOPLink.Public.QueryFramework.DatabaseQuery.execute(DatabaseQuery.java:406)
    I have started the application with Oracle JDBC logging on and found that the problem may originate in a possible lack of syncronization in the pooled connection implementation:
    DRVR FUNC OracleConnection.isClosed() returned false
    DRVR OPER OracleConnection.close()
    DRVR FUNC OracleConnection.prepareCall(sql)
    DRVR DBG1 SQL: "begin ? := dbms_lob.getLength (?); end;"
    DRVR FUNC DBError.throwSqlException(errNum=73, obj=null)
    DRVR FUNC DBError.findMessage(errNum=73, obj=null)
    DRVR FUNC DBError.throwSqlException(reason="Logical handle no longer valid",
    SQLState=null, vendorCode=17073)
    DRVR OPER OracleConnection.close()
    so the prepareCall() is issued against an already closed connection and the
    call fails.
    I assume we have been using a JDBC 2.0 compliant driver. We tried out
    drivers that Oracle supplies for 8.1.6, 8.1.7 versions. To be true I
    couldn't find any information about the JDBC specification they conform to. Does it
    mean that these drivers may not be 100%-compatible with JDBC 2.0 Spec?
    How can I find out if they are 2.0 compliant?
    Also I have downloaded Oracle 9.2.0.1 JDBC drivers. This seemed to work
    fine until we found another incompatibility which made us return back to
    8.1.7 driver:
    UnitOfWork(7818028)--Connection(4434104)--INSERT INTO STATUSHISTORY (CHANGEDATE, FK_SET_STATUS_ID) VALUES ({ts '2002-10-17 16:46:54.529'}, 2)
    INTERNAL EXCEPTION STACK:
    java.sql.SQLException: ORA-00904: invalid column name
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.jav
    a:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java
    :1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatemen
    t.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepare
    dStatement.java:589)
    at TOPLink.Private.DatabaseAccess.DatabaseAccessor.executeDirectNoSelect(
    DatabaseAccessor.java:906)
    at TOPLink.Private.DatabaseAccess.DatabaseAccessor.executeNoSelect(Databa
    seAccessor.java:960)
    at TOPLink.Private.DatabaseAccess.DatabaseAccessor.executeCall(DatabaseAc
    cessor.java:819)
    at TOPLink.Public.PublicInterface.UnitOfWork.executeCall(UnitOfWork.java:

    Hello Yury,
    I believe the problem is that TopLink's ServerSession by default executes read queries concurrently on the same connection. It does this to reduce the number of required connections for the read connection pool. Normally this is a good concurrency optimization, however some JDBC drivers have issues when this is done. I had thought that with Oracle JDBC 8.1.7 this issue no longer occurred, but perhaps it is only after version 9. I believe that the errors were only with the thin JDBC driver, not the OCI, so using the OCI driver should also resolve the problem. Using RAW instead of BLOB would also work.
    You can configure TopLink to resolve this problem through using exclusive read connection pooling.
    Example:
    serverSession.useExclusiveReadConnectionPool(int minNumerOfConnections, int maxNumerOfConnections);
    This will ensure that TopLink does not to try to concurrently execute read queries on the same connection.
    I'm not exactly sure what your second problem with the 9.x JDBC drivers is. From the SQL and stack trace it would seem that the driver does not like the JDBC timestamp syntax. You can have TopLink print timestamp in Oracle's native SQL format to resolve this problem.
    Example:
    serverSessoin.getLogin().useNativeSQL();
    Make sure you configure your server session before you login, or if using the TopLink Session Manager perform the customizations through a SessionEventListener-preLogin event.

  • Upload an .doc attachment into a blob field in Oracle

    sir i have to upload a .doc file into a blob field in the oracle database.
    help with any code, or code links
    The code i am having,pls suggest if any changes...
    String QUERY_ENHANCEMENT = "INSERT INTO EKMIS_ENHANCEMENT(USER_ID,ENH_TYPE,MODULE,DESCRIPTION,ATTACHMENT)";
         QUERY_ENHANCEMENT = QUERY_ENHANCEMENT+"VALUES(?,?,?,?,?)";
              PreparedStatement preparedStatement = connection.prepareStatement(QUERY_ENHANCEMENT);
         preparedStatement.setString(1, enhancementTO.getUserid());
         preparedStatement.setString(2, enhancementTO.getType());
         preparedStatement.setString(3, enhancementTO.getModule());
         preparedStatement.setString(4, enhancementTO.getDescription());
         try
              File anyFile = new File(enhancementTO.getPath());
              InputStream is = new FileInputStream(anyFile);
              preparedStatement.setBinaryStream( 5, is, (int)(anyFile.length()));
         catch(FileNotFoundException fnfe)
              System.out.println("Exception while archiving to BLOB/CLOB");
              fnfe.printStackTrace();
         return preparedStatement;

    the html form is like this..
    <table width="780" cellpadding="2" cellspacing="0" border="0">
                   <tr>
                        <td colspan="6" class="SectionHeader">USER COMMENTS/SUGGESTIONS/COMPLAINTS</td>
                   </tr>
                   <tr>
                                       <td height="18" class="boldLabel_RA">
                                            User Id
                                       </td>
                                       <td height="18" class="value_LA">
                                            <input name="userId" type="text" class="big" readonly="true" value="{sessionAttributes/ekmis.UserID}"/>
                                       </td>
                                       <td height="18" class="boldLabel_RA">
                                            User Name
                                       </td>
                                       <td height="18" class="value_LA">
                                            <input name="userName" type="text" class="big" readonly="true" value="{sessionAttributes/ekmis.UserName}"/>
                                       </td>
                                       <td height="18" class="boldLabel_RA">
                                            Select Type
                                       </td>
                                       <td height="18" class="value_LA">
                                            <select class="big" name="type">
                                                 <option value="0"/>
                                                 <option value="E">Enhancement</option>
                                                 <option value="S">Suggestion</option>
                                                 <option value="B">Bug</option>
                                            </select>
                                       </td>
                                  </tr>
                   <tr>
                        <td height="18" class="boldLabel_RA">Select Module</td>
                        <td colspan="5" height="18" class="value_LA">
                             <select name="mod" class="extralong">
                             <option value="0"/>
                                  <xsl:call-template name="getModules" >
                                       <xsl:with-param name="modules" select="requestParameters/param[@name='sat']" />
                                  </xsl:call-template>
                             </select>
                        </td>
                   </tr>
                   <tr>
                        <td colspan="6" class="SectionHeader"/>
                   </tr>
                   <tr>
                        <td height="18" class="boldLabel_RA">Description</td>
                        <td colspan="5" height="18" class="value_LA">
                             <textarea name="description" class="big"/>
                        </td>
                   </tr>
                   <tr>
                        <td height="18" class="boldLabel_RA">Add Attachment</td>
                        <td colspan="5" height="18" class="value_LA">
                             <input name="path" type="file" class="big"/>
                        </td>
                   </tr>
              </table>

  • Problem with Pro*C reading BLOB field from Oracle 10g

    Hello Experts,
    We have a Pro*c application which is reading the BLOB data fields (a PNG image file) from Oracle data base. It holds the BLOB fields returned from the SQL query into a Unsigned Char structure in Pro*C. The program used work fine on AIX 32 – bit 4.3 and Oracle 8.1 environment.
    Recently, we have upgraded the environment to AIX 64-bit 5.3 and Oracle 10g.Since after the Pro*c program has problem in reading the Blob filed.
    Below is the query we are trying to execute –
    EXEC SQL
    SELECT
    signtre_image, image_file_name_ext
    INTO
    :msipLocalImage INDICATOR :msipLocalImage_i,
    :file_name_ext INDICATOR :file_name_ext_i
    FROM
    dcs_sign
    WHERE
    signtre_nbr = :signtre_nbr;
    Here signtre_image is the BLOB fields and msipLocalImage is a Pro*C structure define as below –
    typedef struct tagSignImage
    long len; /* Image length */
    unsigned char img[1]; /* Pointer to first byte. */
    } MOTS_SIGN_IMAGE;
    The quesry does not give any error or exception message in the Pro*C , program just stops at the point of executing the quesry..When we run the query commenting the BLOB filed it works fine. Also, the query runs good when we run it in the Oracle editor.
    There seems to be problem with the way we are reading the BLOB field in the new Oracle 10g enviromet.
    Does any body have any idea what’s wrong with this query? We really need it to work.
    Any Help will be greatly appreciated.
    Thanks,
    - Rajan Yadav

    Thanks a ton for your response.
    We made the necessary changes as suggested by you.This time we got another flavour of error - SQL Error Code - Inconsistent error while reading BLOB.
    Another thing we noticed is that the data field which we are trying to read is defined as LONG RAW instead of a BLOB in data base.
    Are these two things related in any sense or is there anything else which is causing the error.
    Once again Thanks for your help.
    - Rajan Yadav

  • Decrypting an ecrypted data field in Oracle Database

    I am trying to decrypt an ecrypted data field (which is in
    Oracle Database)in Java. Can somebody help me since I am totally
    new to this.
    Thanks

    Ganesh,
    I am writing a program in Java where I am trying to query an
    Oracle Database table for UserID and Password since this
    password is encrypted in Oracle Table so I want to decrypt it in
    my program and then further pass it for the user.
    Thanks
    Anu

  • Can't access tables in other Oracle database schemas

    Hi. We got our Oracle database admin to install APEX in our Oracle database. She created a login and schema for my Oracle database user so that I could work with APEX a little. Here's the information on the version of APEX we have installed:
    Database Version Information
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I've found that my user is only able to access Oracle tables within my own Oracle database schema. Most of our main tables are in 3 other schemas and I'd need access to all tables in all these schemas. Right now whenever I encounter a drop list of values for Schema, only by own schema is available in the list of values.
    Is there something our Admin can do to make these tables in other schemas available to my user account?

    Sharpe,
    This documentation should point you in the right direction. It will show you how to add multiple schemas to a workspace.
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21678/adm_mg_wrkspc.htm#CHDBDCCJ
    Cheers,
    Tyson Jouglet

  • Access Reports, Forms in Oracle Database

    Hi,
    I want to migrate one application from MS-Access to Oracle(8.1.5) Database.
    I know, migration of database is possible,but I want to keep the existing Access reports and forms as it is.
    Is it possible, Can Access reports and forms run under oracle database.

    Initially you write 12345 and when you modify you are modiyfing only 3 bytes from offset 1 and hence the results. When you modify oracle will not erase the complete lob you need to use erase before you modify (write)
    Following doc give you an insight into pl/sql lob functions
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_lob.htm#sthref4428
    Following is the Pro*C Lobs Guide
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28427/pc_16lob.htm#i998068

  • Access vba problem with ORACLE database via ODBC

    I get a problem when using MS-Access 2007 DAO recordset built on table hosted by an Oracle database 10g and connected thru an ODBC link (the id is generated by a sequence/trigger associated to the table).
    The code I use is :
    Private Sub Commande0_Click()
    Dim rs As DAO.Recordset2
    Dim bm As Variant
    'Set rs = CurrentDb.OpenRecordset("select * from table1", dbOpenDynaset, dbSeeChanges, dbPessimistic)
    Me.Recordset.AddNew
    Me.Recordset!libelle = CStr(Rnd)
    Me.Recordset!code = “”
    Me.Recordset!actif = True
    Me.Recordset!idCollege = 1
    Me.Recordset.Update
    Me.Recordset.MoveFirst
    Me.Recordset.Bookmark = Me.Recordset.LastModified
    Dim idtemp As Long
    idtemp = Me.Recordset.idPartenaire
    Me.Requery
    Me.Recordset.FindFirst "idPartenaire = " & idtemp
    Set rs = Nothing
    End Sub
    When I run this code, I get an error 3167 (current record is deleted) on the line :
    idtemp = Me.Recordset.idPartenaire
    If I change the ligne :
    Me.Recordset!code = “”
    By :
    Me.Recordset!code = “xxxx”
    Or if I comment this line, the error does not appear and I get the right value in idtemp variable.
    I tried also with the same table in a SQL Server database table. In this case it works fine in all cases.
    So, I seems that the problem is due to the Oracle ODBC driver.
    I search on Internet but I have not found any explanation or solution.
    Does anybody experiment the same problem (and find a solution)?
    Gilles Roussel.

    There is a dediacted forum for Oracle ODBC driver issues.
    Please post your problem at:
    http://forums.oracle.com/forums/categoryHome.jspa?categoryID=84

  • ACCESS can't TO Oracle Database 10g Release 2 (10.2.0.1) by fedora8

    hi,I'm a japanese,and my english isn't good,but Could you please help me.
    I can't access from windows xp professional to fedora8(linux).
    my windows xp installed Oracle Database 10g Release 2 (10.2.0.1) express edition.
    my fedora8(linux) installed Oracle Database 10g Release 2 (10.2.0.1) express edition.
    I could use from windows to fedora8 on ffftp.
    name of tnsnames.ora file is XE both windows and fedora8.
    port of tnsnames.ora file is 1521 both windows and fedora8.
    error is ORA-12154.
    tnsping ip address of server
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 15-6月 -
    2008 19:14:45
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    エイリアスを解決するためにHOSTNAMEアダプタを使用しました。
    Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTO
    COL=TCP)(HOST=address of server)(PORT=1521)))
    OK (20ミリ秒)
    tnsping XE
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 15-6月 -
    2008 19:19:33
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    エイリアスを解決するためにTNSNAMESアダプタを使用しました。
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    (HOST = サーバのipアドレス)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = XE)))
    OK (20ミリ秒)
    tnsnames.ora is
    windows
    XE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ip address of server)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = XE)
    fedora is
    # tnsnames.ora Network Configuration File:
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ip address of server)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    I'm looking forward to hearing from you!
    Thank you.

    Thank you so much Ankit!
    That's right!
    1. Where is the database residing where you are trying to connect? Is it on SW1 or SL1 or some other Server?
    I'm staying on SW1.
    2. How are you trying to connect? Using sqlplus? Please paste complete commands and error messages.
    I'm using sqlplus and japanese si object browser.
    When I use sqlplus,
    SQL*Plus: Release 10.2.0.1.0 - Production on 水 6月 18 01:33:54 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    username: fedoraserver
    password: ******
    ERROR:
    ORA-01017: invalid username/password; logon denied
    username:
    When I use japanese si object browser,
    username fedoraserver
    password ******
    database XE
    ORA-12154
    Thanks,
    yoshi

  • Problem building a trigger using a BLOB field in Oracle 10

    My case is the following,
    I'm trying to implement an AFTER trigger which uses the :new.blob_field to insert the new value in a table. Because of the documented AFTER restriction and :new use for blob fields, I've though to add other BEFORE trigger that calls a procedure in which I can store the :new value and later insert the temporary value in the table when the AFTER trigger is executed.
    The Idea is the following:
    BEFORE trigger :new -> TEMP
    and then
    AFTER trigger uses TEMP to store in the new table
    So, the final questions are the following:
    -Any other idea to do the same, that is, to use the ":new" value in an AFTER trigger?
    -How can I do this with the temp variable, is this correct?:
    PROCEDURE store_blob ( new_val BLOB ) IS
    BEGIN
    DBMS_LOB.CREATETEMPORARY(new_blob_temp,TRUE, DBMS_LOB.SESSION);
    -- fill with data
    DBMS_LOB.COPY (new_blob_temp,new_val,DBMS_LOB.GETLENGTH(new_val),1,1);
    END store_blob ;
    Because of the design of the application I have to use the AFTER trigger to store the new value so I must find a solution for this type of fields.
    Sorry for the size of the text and also for my english.
    Thanks in advance

    SQL> create or replace trigger trg1 after insert on test_blob for each row
      2  begin
      3  insert into test_blob2 values (:new.a);
      4  end;
      5  /
    Trigger created.
    SQL> insert into test_blob values ('123456789');
    1 row created.
    SQL> desc test_blob;
    Name                                      Null?    Type
    A                                                  BLOB
    SQL> desc test_blob2
    Name                                      Null?    Type
    A                                                  BLOB
    SQL>
    SQL> select dbms_lob.getlength(a) from  test_blob2;
    DBMS_LOB.GETLENGTH(A)
                        5

  • Error in Loading a BLOB Column in Oracle Database from 1 to diff  schema

    Hi ALL,
    I am in a POC where in I have to load a BLOB data from 1 schema to a different schema ie from Staging to Target.
    I load my staging(Oracle Schema ) through Oracle PLSQL. Now I have to load to my ODS.
    I am using the LKM (LKM SQL to Oracle) and IKM (IKM Oracle Incremental Update PLSQL).
    It errors out in the 3rd step 3-Loading-SS_0 Load Data
    The script used and the error message is in the attachment. However if I run the script manually it runs and the Load happens successfully. Also I was able to load the same BLOB objects it the tables were in the same schema(In this case LKM is bypassed).
    Any Thoughts on this?
    The Error I receive is:
    java.lang.NumberFormatException: For input string: "4294967295"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at oracle.jdbc.driver.OracleResultSetMetaData.getPrecision(OracleResultSetMetaData.java:303)
         at com.sunopsis.sql.SnpsQuery.getResultSetParams(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Thanks & Regards,
    Krishna

    Hi,
    Are you at the same database? If yes is better to grant select, at the schemas where is the source, to your Staging Area user.
    Then, at topology, define all physical schemas under the same Data Server.
    If you are at distinct database a good solution is to use a DBLink (KM) because when a SQL to SQL KM is used, the data go thru agent, making a conversion to Java.
    I'm not sure if it can handle LOB's fields... Every time that I needed to use it was in the ways that I described.
    Does it make any sense to you?
    Cezar

  • MS Access Memo fields to Oracle 9i

    I've successfully migrated an Access 97 database to Oracle 9i, but I'm having trouble connecting to certain tables from MS Access. The common feature of these tables is that they have notes fields of type Memo
    These fields have been correctly migrated to CLOB in Oracle, but when I look at them in the Design view of Access, they show as being of type Text
    I've attempted to create another Access linked table to one of these Oracle tables, but the notes field still shows as type Text
    When these linked tables are opened, I get one of two errors:
    "Reserved Error (-7711), there is no message for this error" followed by "SRS Belfast MI can't open this table in Datasheet view"
    or
    "ODBC - call failed" followed by "[Microsoft][ODBC Driver Manager] Function sequence error (#0)" followed by the Datasheet view opening will all the fields displaying #Name? as values
    Any suggestions?

    Hi Richard,
    we have not been able to reproduce this problem in-house. Can you forward the following information to [email protected] please ? :
    1. Information on how to produce a small testcase that causes the same problem.
    2. The error.log file which can be found in %OMWB_HOME%\bin.
    3. Details on the version of the ODBC driver you are using.
    Thank you,
    Tom.

Maybe you are looking for