Convert MS SQL server image data type into oracle clob

Hi all! I'm tryng to access to Microsoft SQL server with Oracle via ODBC. Oracle is not able to use the image data type of Microsoft SQL server. Do you know a way to convert this data type in an oracle format? The explicit casting converts image to long raw, but after the conversion Oracle is not able to manage these data type. Thank you very much!
Stefano.

Hi you might want to post your question in General Forum.
General Database Discussions
There's very few users visit this forum.

Similar Messages

  • How to migrate SQL Server image data type to Oracle 8 BLOB data type?

    Hi,
    I have to migrate data from sql server to Oracle 10 g.
    I am unable to migrate image data type from sql server to blob data type in oracle.
    Iam using Oracle Heterogenous Services to migrate the data,Using Merge statement and database link.
    I am getting the following error-
    ERROR at line 7:
    ORA-00932: inconsistent datatypes: expected BLOB got LONG BINARY
    Can any one suggest me how to migrate Image datatype to BLOB???

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • Migration Workbench is messing up data in converted from SQL Server image fields.

    I am working on porting a SQL Server 7 database to Oracle 8i (8.1.6 release 2). In the SQL Server database I have several tables that contain image fields that hold binary data (like Word documents, and other files). When I port the database to Oracle, the data in these fields gets garbled (the resultant records contain the correct amount of data (bytes), yet the data is different). Data in image fields that contain text oriented data ports correctly (i.e. if you just saved a long string in the field). Has anyone else posted a similar problem? Is there a workaround here to get the data stored in these image fields to port correctly?

    The thing is DDL of SQL Server and Oracle are quite different, without the help of MW from SQL Developer. You can't convert SQL server version of DDL to Oracle version. Of course you can accomplish the same thing using other tools like ERwin and Visio. Since SQL Developer is free why bother?

  • Problem: loading SQL Server 'image' data

    Source database: SQL Server 2000
    OS: Windows 2003 (SP1)
    Oracle: 10g (R2)
    Datatype Mapping: SQL Server ‘image’ to oracle ‘BLOB’
    With the help of OMWB, I created the oracle database schema for a SQL Server DB (offline capture). I have problems when I tried to populate the (destination) database with two tables with ‘image’ datatype:
    Frame.img (as on http://www.sdss.org.uk/mybestdr5/en/help/browser/description.asp?n=Frame&t=U)
    And SpecObjAll.img (as on http://www.sdss.org.uk/mybestdr5/en/help/browser/description.asp?n=SpecObjAll&t=U)
    The part of .ctl files (generated by OMWB) for the two ‘img’ columns is like this:
    IMG CHAR(2000000) "HEXTORAW (:IMG)")
    I failed to load the data with the sql_load_script.sh script, and the log file is like this:
    IMG NEXT ***** CHARACTER
    Maximum field length is 2000000
    Terminator string : '<ec>'
    SQL string for column : "HEXTORAW (:IMG)"
    SQL*Loader-309: No SQL string allowed as part of IMG field specification
    I tried to removed ‘CHAR(2000000)’ in the .ctl files:
    IMG "HEXTORAW (:IMG)")
    But this doesn’t work and the log file is like this:
    IMG NEXT * CHARACTER
    Terminator string : '<ec>'
    SQL string for column : "HEXTORAW (:IMG)"
    SQL*Loader-309: No SQL string allowed as part of IMG field specification
    Any help would be extremely appreciated.
    Helen

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • SQL Server Long Text column to Oracle CLOB via DB Link

    Does anyone know how to load a SQL Server Long Text column into an Oracle CLOB column using DB Link? When I try to Select from SQL Server table into Oracle table, I receive the error "ORA-00997: illegal use of LONG datatype".
    Thanks,
    Susan

    Hi,
      This is a known restriction involving long columns -
    (1) LONG datatype not supported with use of DBLINK when insert or update involves a select statement
    (2) LONG datatype cannot be used in a WHERE clause, in INSERT into ... SELECT ... FROM
    constructs, and in snapshots.
    The workround is to use a PL/SQL procedure or try the SQLPLUS COPY command.
    If you have access to My Oracle Support then review these notes -
    Cannot Move A Long From non Oracle database Ora-00997: Illegal Use Of Long Datatype (Doc ID 1246594.1)
    How To Workaround Error: Ora-00997: Illegal Use Of Long Datatype (Doc ID 361716.1)
    Regards,
    Mike

  • Sql server 2000 data type

    In sql server 2000, what data type do I use for a field that
    needs to show two decimal places? It is a weight field, so the
    weight in ounces could be something like 12.25 and it needs to
    store it this way in the database. I'm kind of new to sql server,
    so any help would be greatly appreciated!

    You asked "In sql server 2000, what data type do I use for a
    field that needs to show two decimal places?" and I answered
    "decimal and numeric". How much clearer could I be?
    Numeric data types with fixed precision and scale.
    decimal[(p[, s])] and numeric[(p[, s])]
    Fixed precision and scale numbers. When maximum precision is
    used, valid values are from - 10^38 +1 through 10^38 - 1. The
    SQL-92 synonyms for decimal are dec and dec(p, s).
    p (precision)
    Specifies the maximum total number of decimal digits that can
    be stored, both to the left and to the right of the decimal point.
    The precision must be a value from 1 through the maximum precision.
    The maximum precision is 38.
    s (scale)
    Specifies the maximum number of decimal digits that can be
    stored to the right of the decimal point. Scale must be a value
    from 0 through p. The default scale is 0; therefore, 0 <= s
    <= p. Maximum storage sizes vary, based on the precision.
    I recommend that you load SQL Server Books Online on your
    computer, as it is available free from Microsoft as a download and
    it has everything you will probably need to know about SQL Server.
    Or you could just use the online version at
    SQL
    Server 2000 Books Online
    Phil

  • Importing an SQL Server TEXT data type field in Oracle - problem with LONG

    Hello,
    I work in Oracle 9i and I created a view on a distant SQL Server database that contains a TEXT data type field. But I have a problem when I select that field in Oracle; I have the following error message: "ORA-00997: forbidden use of LONG data type".
    Could anybody have a solution for me, to solve that problem?
    Thanks a lot!

    It is very difficult to suggest anything without seeing your code.  I don't even know if what you are seeing is the actual value or an error code.  Often, negative numbers are indicative of error codes. 
    For instance -1 could mean that you have an invalid reference or path, etc...
    Can you post your code?

  • MS SQL Server 2005 data types

    Hi,
    I have some code that executes a stored procedure in SQL Server 2005 database from Weblogic 8.1. There is a Spring framework layer in between. I am having problems passing a datetime parameter to the SP (ther server thinks it's a varchar). According to the BEA documentation here http://edocs.bea.com/wls/docs100/jdbc_drivers/mssqlserver.html#wp1088746, a datetime parameter should be passed as java.sql.Types.TIMESTAMP. I've tried TIMESTAMP, DATE, TIME, and none of them work. But, that documentation says it's only for SQL Server 2000. What about 2005? Does anyone know?
    Thanks in advance.

    We use SQL2005 & WebLogic 8.1, but we use the Microsoft JDBC driver form here
    and it all works fine with timestamps. We use this datatype to pass them down java.sql.Timestamp
    http://www.microsoft.com/downloads/details.aspx?familyid=C47053EB-3B64-4794-950D-81E1EC91C1BA&displaylang=en
    The MS driver has some enhancements specifically for SQL2005 for performance and handling the new data types. We've always been told to use the vendors driver in preference to the BEA supplied one - that came from BEA!
    Pete

  • How to migrate 'table' data type into oracle solution?

    Say, I have following sample code in Sql Server:
    Declare @v1 table(old_value int, new_value int)
    insert into @v1 select old_value, new_value from aTable where....
    declare cur cursor for
    select new_value from @v1 where old_value=...
    what should I use in oracle to convert above code? I was thinking about nested table, but it seems not very suitable here. Any better solutions out there?

    It's been a while since I've done any SQL Server development, but if I recall correctly, a table data type in Transact SQL is used for storing temporary result sets.
    In your example, you seem to be temporaily storing the results of a query in a Transact SQL table, and then opening a cursor to iterate over the results.
    In Oracle PL/SQL, there is usually no need to do this, just open a cursor:
    create or replace procedure test_proc as
    begin
    for curs_rec in (select old_value, new_value from myTable) loop
    ... process each row ...
    end loop;
    end test_proc;
    If you really want your results in an array which your code can iterate over, look into the BULK COLLECT clause of the SELECT statement:
    create or replace procedure test_proc as
    TYPE array_type IS TABLE of myTable%ROWTYPE INDEX BY BINARY_INTEGER;
    my_array array_type;
    begin
    SELECT * BULK COLLECT INTO my_array FROM myTable;
    for idx in my_array.FIRST..my_array.LAST loop
    dbms_output.put_line(my_array(idx).col1);
    end loop;
    end test_proc;
    Note that I have not actually compiled the above code, so there may be syntax errors :)
    Also, prior to 9i you can not BULK COLLECT into a table based on a rowtype (you need to created an array for each attribute).
    SQL Server also allows function which return table types. This is similar to PL/SQL pipelined table functions (available in 9i and higher - see the PL/SQL guide), which can be used to materialize rows which can be processed like any other result set.
    SQL Server also has a concept of temporary tables which is totally different than Oracle's temporary tables. SQL Server developers must often resort to using temporary tables in their stored procedures; in Oracle, this is rarely necessary.

  • SQL Server 2005 data pull from Oracle

    Hi, I am learning how to use Oracle and I ran into this problem.
    My database is running on SQL Server 2005.
    I have an ODBC connection to Oracle. I also have a VB .Net script that queries the Oracle table that the data resides in.
    When the job is running, and if it stalls, I do not get a timeout error. It locks down my database and no other source systems can feed data to me; these are back logged in the queue.
    Is there an easier way for me to make a connection that will pull data on a consistent basis? Please help ...
    Student Learner

    Learning how to use Oracle does not include taking data from Oracle and putting it into SQL Server.
    From your description of what is happening I agree with BluShadow. This is not an Oracle issue. This is a coding in VB .NET issue.
    Posting the statements you are executing against some unknown version of Oracle would be a good starting point.

  • Can a SQL Server dump be loaded into oracle?

    Hi All,
    I'm wondering, if we have a sql server DB dump, is there anyway to load the data into Oracle? (other than loading the dump into a sql server and then using OMWB? )
    Thanks in advance,
    Sudheer

    Yes, you can migrate just the table structure if you want. After you have sucessfully created an Oracle Model using the capture wizard. You can invoke the "Generate Migration Scripts..." from the Action menu.
    This will create a SQL script, which you can modify as necessary and then execute from SQL*Plus or SQL Developer.
    Donal

  • Convert Data type from Oracle Data time string to SQL Date time data type

    I have a time stamp column pulled from oracle into a SQL server db table varchar datatype column.
    Now i want to change that column to date time.
    Following is the data present in the table:
    01-APR-11 02.15.00.026000 AM -08:00
    01-APR-11 04.15.00.399000 AM -08:00
    01-APR-11 06.15.00.039000 AM -08:00
    I want to convert this data into sql server datetime data type.
    Please advice.
    Thanks,
    Sam.
    I am unable to find the solution in other sites which is why I have posted it in Oracle forum for seeking solution.
    Thanks in Advance.
    Sam.

    Sam,
    How are you actually loading the data into SQL*Server - are you using something like an Oracle gateway, BCP or another Microsoft utility of some sort ?
    If you are using an Oracle problem then we may be able to help but if using a Microsoft utility then you should really follow up with Microsoft to know what format the data should be in to use a Microsoft utility.
    Regards,
    Mike

  • GregorianCalendar datetime format convert to  sql server date time format

    please help me
    my GregorianCalendar date time format is like this. *08/01/29 02:25:59* . I try to insert my database(sql server 2000 )
    data type is datetime ,in my database table display like this *2029-08-01 02:25:59.000* .can you help me to insert correct date in my database table like ( . *08/01/29 02:25:59*)

    use [PreparedStatement |http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html] and setTimestamp:
    [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html]

  • Insert data from SQL Server 2008 St.Ed to ORACLE 11gr2 St. Edition

    Dear all,
    I'm searching a solution for faster transmission of data of a db SQL Server (2008 St. edition) vs PROD db that is an ORACLE 11gr2 St. edition too.
    Actually this operation spend 1,5 hours but I'd like cut this time because size of the data grow up in future and this time could be a serious problem ....
    Looking on Oracle Enterprise Manager I've seen that main problem is about commit .. SQL Server every record insert into Oracle TBL generate a commit  ... unfortunately I cannot insert when commit must be done ... If will be solved it probably may be solved situation ...
    Thanks in advance for every idea.
    Andrea

    Nardo wrote:
    SQL server is connect with Oracle DB by OLEDB, commit every record is why SQL haven't possibility of manage it ... anyway I'm sorry for delay of the answer, I've solved using sqlloader ... faster and without impact ... must be have hight attention if there will be change any field ... that's all.
    REDO upgrade was done like first step because anyway it was too small.
    Thanks for you answer and sorry again for delay !!!!
    Thanks.
    If you are depending on MS SQL server technology to do this, you are going to be stuck with the performance of that technology.
    A few weeks ago we had a need to load institute a daily load of or DW from a MSSQL database.  The MS-centric person responsible developed a procedure (using MS tools) that took 4.5 hours to load 1.2 million rows.  I ran a session trace and the tkprof report revealed exactly what has already been described.  Single row insert and commit.  I knocked together a PL/SQL procedure that did a single INSERT .. (SELECT .. FROM TABLE@MSSQL). and it ran in 4 minutes.  Using the Oracle transparent gateway for ODBC.

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

Maybe you are looking for