Reading milliseconds from Sql server into oracle 10g

Hi,
We have a very time sensitive pressing requirements to be addressed immediately.
We need to read the date time column from sql server 2008 into oracle 10g.
We have a dblink established between the two servers and have tried to use sql server and sql native client 10 driver to read the dates from sql into oracle.This we are able to do very successfully.
The issue is in reading milliseconds stored in sql server.The millisecond part comes in as 00000 from sqlserver to oracle.These milliseconds are needed to identlfy the unique records.
For instance
SQL SERVER Oracle
source_id source id
01/01/2012 6:30:35:456 01/01/2012 6:30:35:000000.
Im issuing my query through Toad via Oracle to remote sql server using a dblink which connects using HS ODBC connection to sql server 2008(remote).
We have no control over sql server Db as this is remote third party DB.We just have select access to their tables to bring into our own oracle DB.
Any insight or help will be much appreciated.

Hi,
Could you please send the following information -
- what version of HSODBC are you using ? Is it a 10.2 version ?
- what is the SQL*Server datatype of the column you are reading ?
- from Oracle could you issue -
describe sql_server_table@hsodbc
- what is the Oracle datatype shown for the column ?
Could you also run your tests using SQLPLUS instead of TOAD ? We don't support TOAD and need to know if the problem also happens when using SQLPLUS, to avoid it being a TOAD problem.
Also, 10.2 HSODBC is now desupported and you should be using the 11g Database Gateway for ODBC (DG4ODBC) which is a direct replacement for HSODBC. To use DG4ODBC your RDBMS needs to be at 10.2.0.4 or higher and DG4ODBC should be installed in a completely separate ORACLE_HOME from the existing 10.2 install.
Regards,
Mike

Similar Messages

  • Faster way to migrate data from SQL Server to Oracle 10g

    We have to migrate data from SQL Server to Oracle 10 g.
    One particular table on SQL Server has records around 1.25 millions.
    We tried moving data using DTS package, but looks it will take hours with current speed of 300 records/minute.
    This table has TEXT column, which has XML strings stored. I am not sure, if this is the reason for slow migration.
    Would you please suggest better options to migrate it faster?
    Thanks in advance !!!

    Have you tried Migration work bench?

  • Importing Database from SQL Server into Oracle 8i

    Hello Friends,
    Cuurentlly we are using SQL Server as our application database, Now we want to switch on at Oracle 8i,bcz of some problems,
    If anybody had done so,then please help me in solving this problem,
    I wana Import whole database from SQL server to Oracle
    Lot of thanks

    Hi,
    Use the SQL Server Enterprise Manager to export all the tables from SQL to oralce.
    When selecting the target database use the Oracle native driver (the name is not on top of my head) and not the ODBC one.
    You will have problems with datatypes. Make sure to edit the mappings for the proper datatype if required.
    If you have ntext columns, make sure they are translated to CLOB and not long.
    Regards,
    Wasim.

  • Using Oracle Forms Importing Data From SQL Server into Oracle Tables.

    Dear All,
    We are using Oracle Forms 10g in windows XP and having OAS 10g and Oracle database 9i.
    How can we import data from SQL Server 2005 into Oracle tables using Oracle Forms?
    Thanks & Regards
    Eidy

    I have no idea what "Oracle Hetrogenius Services" is, so I can't help you with that, sorry.
    SQL Developer might also assist you. SQL Developer can connect to SQL Server as well as Oracle and has some tools for migration. See the documentation for details:
    http://download.oracle.com/docs/cd/E12151_01/doc.150/e12156/toc.htm
    For additional help on using SQL Developer for this task, please consult Support or the SQL Developer forum: SQL Developer
    Hope this helps,
    Jacob

  • How to import  from sql server to oracle 10g

    Hi,
    I have given some file with no extention and the client told me that
    it has two tables in it emp and dept. which he extracted from sql server.
    Now I have the file with me.
    I have a local oracle database .
    Is it poosible to load that file into the oracle 10g database.
    If possible please send me the details. If not please tell me the details reqd to do the things.
    Thanks in Advance

    Well, what format is the file in? If it is a text file you should be able to use SQL*Loader.
    Can you view the file using (for example) Wordpad?
    Or from the command line (ie in a DOS box) just say
    TYPE myfileThen post the format for a few lines here, between and (use square brackets instead of curly)
    Regards Nigel

  • Load Data from SQL Server to Oracle 10g using Sql*loader utility

    I am trying to lod data from sql server 2005 to oracle 10g.
    What is the best way to do it?
    Can sql*loader utility do it?
    what is the difference of using sql*loader utility and migration tool fom sql developer ?
    Thanks
    Edited by: user11313758 on Sep 30, 2009 4:30 PM

    Hello:
    You could consider using Oracle Heterogeneous Services to do this. If your Oracle database is on a Windows platform the link below shows you how to make a connection to SqlServer from an Oracle database.
    http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
    Varad

  • Migration from SQL server to Oracle 10g

    Hi, I am new here,
    I would like to ask how to use SQL developer MWB to migration SQL Server to Oracle?
    I have go through the doc(s) like: getting start, user's guild, etc. and have following problems
    (1), where should the SQL developer installed? in SQL Server side? Oracle side? or any PC with connection to the databases?
    (2), do I need to get some plug-in(s) for MWB to work? If yes, which plug-in do I need and where are they?
    Thank you very much.

    Hi Chocobo,
    I put together a Quick Guide myself
    http://dermotoneill.blogspot.com/2008/06/sql-developer-migration-workbench-151_11.html
    I updated it to answer your questions.
    Hope that helps
    Dermot.

  • Periodic Importing of data from SQL Server into Oracle Database

    I would like to know how I can use the SQL Developer tool to import data from a SQL Server database across the internet into an Oracle Database on a periodic basis? I understand there is a Migration Workbench, but it seems to be only a one off activity.
    What I would really like is to be able to import data for example, very 30 minutes from multiple tables/views in a SQL Server Database into an Oracle Database (overwriting or modifying existing same data) without the need for Heterogeneous Connectivity, as my Oracle Database is not my LAN.
    Thank you for your kind ideas and suggestions.

    To be honest the best way to do it is DG4ODBC or DG4MSQL. All other solutions need manual interaction.
    The gateways DG4ODBC and DG4MSQL are independant from the Oracle database and also from the SQL Server location. In a worst case scenario you have an Oracle database on machine A, the gateway on machine B and the SQL Server on machine C.
    Gateways were built to exactly do what you want. As you have access to the Oracle database the only part you need to define within the Oracle database is a db link. If you specify the full tns connect identifier there is even no need to edit the tnsnames.ora file.
    Even if you excluded the gateway in your last sentence the best solution would be the gateway.
    Another option you can use is the SQL Server linked server mechanism. It allows you to link another server using OLEDB driver. In your case you can then link the Oracle db into your SQL Server and then insert/update/delete and select Oracle tables from the SQL Server. Using now a trigger will replicate the data immediately to the Oracle db.

  • From SQL Server to Oracle 10g

    Hi!!
    My IT staff have been using SQL Server for quite a time and we have set up all our procedures under this platform, for example, our initial concern in this phase of the migration is: Under SQL Server we use templates that we use to import data into our tables in SQL Server DB, after uploading that data, we run some stored procedures and finally a view.
    Is there any thing similar to a template under Oracle 10g?
    I have been reading about the tools that 10g offers for data upload/download, but what about data files that doesn't have any field separator? All my fields have the same number of characters, that's why I use templates to import data on SQL Server.
    Any ideas?
    Best Regards,
    M Guirao

    sybase to oracle migration questions(I have read the documentation)

  • Migrate Data action hanging migrating from sql server to Oracle 10g

    Hi,
    I am currently migrating a SQL Server 2005 db to Oracle 10g using SQL Developer 1.2.1. I have created the migration repository, captured the SQL Server db objects, and created the target schema. There are about 109 tables captured. During Data migration, however, the data move hangs. I have run the data move a couple of times now and it does not hang while migrating any particular table, but seems to be more to do with the length of time it is taking to migrate. Could this be an issue with SQL Server connections being lost? The SQL Server db is quite large. Row counts of 100k plus.
    Message was edited by:
    user596259

    Probably. There is an offline option for migrating data under the migration menu. Generate Scripts for the data move using the appropriate converted model and u can export the data to bcp export files and load it with teh generated SQL Loader scripts.

  • Reading BLOB from SQL Server 2005 using DB Link from Oracle 10g

    Hi All,
    I am trying to read a table's data from SQL Server 2005 using ODBC DB Link created in Oracle 10g (10.2.0.3/4) database. I am not using oracle gateway.
    I am able read all data except for the BLOB data from SQL server 2005. It gives error given below when I try to execute query SELECT * from T_TRANSACTION_DATA@sdeslink inside a stored procedure:
    ORA-22992: cannot use LOB locators selected from remote tables
    Kindly help how to read BLOB from SQL server 2005 inside Oracle 10g.
    Best Regards!
    Irfan

    Irfan,
    If you can read the blob data using 10.2 HSODBC then there should be no problem using the 11g gateway.
    I recommend you download the latest version which is 11.2.0.3 available from My oracle Support as -
    Patch 10404530: 11.2.0.3.0 PATCH SET FOR ORACLE DATABASE SERVER
    This is a full version and does not need a previous version to have bene installed. When installing it needs to be in a completlely separate ORACLE_HOME from the existing 11.2 install.
    For the Ora-22992 problem have a look at this note in My Oracle Support -
    Ora-22992 has a workaround in 10gR2 (Doc ID 436707.1)
    Regards,
    Mike

  • One way replication from MS sql server to Oracle 10g

    Hi,
    We are using Sql server 2005 windows 2003 32 bit and Oracle 10g 10.2.0.3 on linux 64 bit
    Is it possible to replcate table data on real time from sql server (2005 32 bit or sql server 2000 32 bit)to oracle 10g running on linux 64 bit?
    If yes then what are the steps.
    It will be one way replication from sql server to oracle.
    Which option is best sql server dts or Oracle Stream replication to replicate table data?
    Regards,

    If you want to push data from SqlServer, then ODBC, Linked tables, DTS etc.
    If you want to pull data from Oracle, then Heterogenous Services / Gateway.

  • Migration from MS SQL Server to Oracle 10g

    Hi,
    In our application, we are planning to refresh data every one hour from MS SQL Server to Oracle 10g. Can anyone tell me what approach can be followed?
    Thanks & Regards,
    Faizal MK

    Hello,
    migrations can be done with the Migration Workbench that is included in the SQL Developer: http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
    But your question sounds more like a replication of data than a migration. Please read as a starter the following note in My Oracle Support (former Metalink):
    Note 283700.1: How to replicate Data between Oracle and a Foreign Datasource
    That note describes ways for the replication in both directions. Please let me know whether this is helpful for you.
    Best regards
    Wolfgang Kobarg-Sachsse

  • Loading data from SQL server to Oracle database

    i want to create one table in oracle db from table in sql server. Table is huge it got 97,456,789 records.
    I created db link (HS) in oracle database which is pointing to sql server. i can select that table from oracle thru db link.
    select * from "dbo"."t1@dblink;
    i fired below create table.
    create table t2 nologging parallel (degree=3) as select * from "dbo"."t1@dblink;
    and its taking long time.... but its running...
    is there any alternate method to do this and and populate table in oracle db faster.
    Please advise. thanks.

    vhiware wrote:
    create table t2 nologging parallel (degree=3) as select * from "dbo"."t1@dblink;
    and its taking long time.... but its running...I doubt that parallel processing will be used as this is unique to Oracle (using rowid ranges typically) and not SQL-Server.
    is there any alternate method to do this and and populate table in oracle db faster.Part of the performance overhead is pulling that data from SQL-Server to Oracle across the network link between them. This can be sped up by compressing the data first - and then transferring that across the network.
    For example: using +bcp+ to export the data on the SQL-Server box to a CSV file, compress/zip the file, scp/sftp the file to Oracle, and then unzipping it there. Parallel and direct load processing can now be done using SQL*Loader to load the CSV into Oracle.
    If this is a Linux/Unix base system, then the unzip/decompress process can be run in parallel with the SQL*Loader process by creating a pipe between the two - where the unzip process writes uncompressed data into the pipe and SQL*Loader reads and loads data as it becomes available via the pipe.
    Alternatively, you can do you own PQ processing. Let's say the data is date ranged. You can create a procedure on Oracle that looks something like this:
    {code}
    create or replace procedure CopyDay( day date ) is
    begin
    insert /*+ append */ into local_tab select * from remote_tab@remotedb where col_day = day;
    -- add logging info, commit, etc.
    end;
    {code}
    You can now start 10 or more of these for different days and run it in the background using DBMS_JOB.

  • Migrating a table with BLOB field from SQL-Server to Oracle.

    Hi All,
    I'm trying to create a Class to migrate data from SQL-Server to Oracle, this table has a BLOB field.
    The Code:
    package br.com.infox;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class Migrador {
         public static void main(String[] args){
              try {
                   // Conex�o com o SQL Server
                   Class.forName("net.sourceforge.jtds.jdbc.Driver");
                   Connection conSQL = DriverManager.getConnection ("jdbc:jtds:sqlserver://10.10.2.9/protocolo","prot","suinf2002");
                   // Conex�o com o Oracle
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection conORA = DriverManager.getConnection ("jdbc:oracle:thin:@10.10.2.2:1521:des","protocolo","protocolo");
                   Statement stSQL = conSQL.createStatement();
                   String querySQL = "SELECT * FROM DOC_INCORPORADO";
                   ResultSet rsSQL = stSQL.executeQuery(querySQL);
                   String queryORA = "INSERT INTO PROT_VITALICIAMENTO (NU_PROCESSO, ANO_PROCESSO, CD_USUARIO, DT_ENVIO," +
                             "DE_COMPLEMENTO, NM_ARQUIVO, ARQUIVO, NU_SEQ, CD_TIPO_ARQUIVO, MES, ANO) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
                   PreparedStatement psORA = conORA.prepareStatement(queryORA);
                   while (rsSQL.next()){
                        System.out.println("Linha: " + rsSQL.getRow());
                        psORA.setInt(1, rsSQL.getInt("nu_processo"));
                        psORA.setInt(2, rsSQL.getInt("ano_processo"));
                        psORA.setInt(3, rsSQL.getInt("cd_usuario"));
                        psORA.setDate(4, rsSQL.getDate("dt_incorporacao"));
                        psORA.setString(5, rsSQL.getString("complemento"));
                        psORA.setString(6, rsSQL.getString("nm_arquivo"));
                        psORA.setBinaryStream(7, rsSQL.getBinaryStream("arquivo"), (int)rsSQL.getBlob("arquivo").length());
                        psORA.setInt(8, rsSQL.getInt("num_seq"));
                        psORA.setInt(9, rsSQL.getInt("cd_tipo_arquivo"));
                        psORA.setInt(10, rsSQL.getInt("mes"));
                        psORA.setInt(11, rsSQL.getInt("ano"));
                        psORA.executeUpdate();
                   stSQL.close();
                   psORA.close();
                   conORA.close();
                   conSQL.close();
              } catch (Exception e){
                   e.printStackTrace();
    The ERROR:
    java.sql.SQLException: Exce��o de E/S: Connection reset
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
         at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
         at br.com.infox.Migrador.main(Migrador.java:41)
    What's the problem of these Class?
    Thank's.

    Depending on the version of the database you have, you could use transportable tablespaces.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#9370

Maybe you are looking for