How to migrate data fSQL server 2005 Tables with image column To ORACLE 11g

Hi ....
I am in the middle of migrating our database from sqlserver 2005 version to ORACLE 11g instance, and i'm facing a problem when trying to load data into one of the oracle table which has blob column and some more. The data file was extracted from sql server 2005 table which has image column and some more. All other columns are sinking with the migration as expected but the image column is not getting loaded into oralce blob.
I tried loading data using sqlloader.
Is there any other way to migrate data directly between these two versions of database?. Pls help...
Edited by: user13310523 on 21-Jun-2010 23:48

Welcome to the forum,
Hi,
To link Oracle with SQL Server follow this steps:
1-Install Oracle ODBC drivers on the server (your local Oracle database) that will access the remote SQL Server database using the database link.
2. Setup the ODBC connection on the local Oracle database using the Windows ODBC Data Source Administrator
3. Test the ODBC drivers to ensure that connectivity is made to the SQL Server database.
4. Ensure that your global_names parameter is set to False.
5. Configure the Oracle Heterogeneous services by creating an initodbc.ora file within the Oracle database.
7. Modify the Listener.ora file.
SID_NAME is the DSN for the remote database.
ORACLE_HOME is the actual Oracle home file path.
PROGRAM tells Oracle to use heterogeneous services.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME=Cas30C) -- Enter the DSN on this line
(ORACLE_HOME = c:\oracle10gdb) -- Enter your Oracle home on this line
(PROGRAM = hsodbc) ) )
8. Modify the Tnsnames.ora file. This is the Oracle database installation accessed by the users to connect to the ODBC drivers
(DESCRIPTION=
(ADDRESS_LIST=
(Address=(PROTOCOL=TCP)
(HOST=
-- (Server x)
(PORT=1521))) -- Enter the port on which the server x Oracle installation
-- is listening
(CONNECT_DATA=(SID=Cas30c)) - Enter the DSN name
(HS=OK) -- Enter this value. It tells Oracle to use hetergeneous services
9. Reload the listener on local Oracle database
10. Create a database link on the local Oracle installation that accesses the heterogeneous connection, which, in turn, connect to SQL Server.
11. Run a SQL Server Select statement from the Oracle installation using the database link
Thanks
BelMan :)

Similar Messages

  • Migration from sql server 2005 tables to oracle tables.

    Hi,
    Kindly give the steps to migrate from sql server 2005 tables to oracle tables.
    Kindly advise
    Oracle database version:
    Oracle Database 10g Release 10.2.0.1.0 - Production
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE 10.2.0.1.0 Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Edited by: 873127 on Jul 18, 2011 9:46 PM

    Are you migrating or taking continual updates?
    If migrating it might be worth considering The SQLDeveloper Migration Workbench (which moves more than just data)..
    http://www.oracle.com/technetwork/database/migration/sqldevmigrationworkbench-132899.pdf
    Cheers
    David

  • How to Migrate Ms SQL Server 2005 to Oracle 9i

    Hi all,
    How to migrate MS-SQLServer to Oracle 9i. in migration work bench lists only SQLSERVER 2000
    Thanks
    Abk

    Oracle Migration Workbench is outdated and replaced by SQL Developer Migration Workbench.
    Have a look at:
    http://www.oracle.com/technology/tech/migration/workbench/index_sqldev_omwb.html

  • How to Compare Data length of staging table with base table definition

    Hi,
    I've two tables :staging table and base table.
    I'm getting data from flatfiles into staging table, as per requirement structure of staging table and base table(length of each and every column in staging table is 25% more to dump data without any errors) are different for ex :if we've city column with varchar length 40 in staging table it has 25 in base table.Once data is dumped into staging table I want to compare actual data length of each and every column in staging table with definition of base table(data_length for each and every column from all_tab_columns) and if any column differs length I need to update the corresponding row in staging table which also has a flag called err_length.
    so for this I'm using cursor c1 is select length(a.id),length(a.name)... from staging_table;
    cursor c2(name varchar2) is select data_length from all_tab_columns where table_name='BASE_TABLE' and column_name=name;
    But we're getting data atonce in first query whereas in second cursor I need to get each and every column and then compare with first ?
    Can anyone tell me how to get desired results?
    Thanks,
    Mahender.

    This is a shot in the dark but, take a look at this example below:
    SQL> DROP TABLE STAGING;
    Table dropped.
    SQL> DROP TABLE BASE;
    Table dropped.
    SQL> CREATE TABLE STAGING
      2  (
      3          ID              NUMBER
      4  ,       A               VARCHAR2(40)
      5  ,       B               VARCHAR2(40)
      6  ,       ERR_LENGTH      VARCHAR2(1)
      7  );
    Table created.
    SQL> CREATE TABLE BASE
      2  (
      3          ID      NUMBER
      4  ,       A       VARCHAR2(25)
      5  ,       B       VARCHAR2(25)
      6  );
    Table created.
    SQL> INSERT INTO STAGING VALUES (1,RPAD('X',26,'X'),RPAD('X',25,'X'),NULL);
    1 row created.
    SQL> INSERT INTO STAGING VALUES (2,RPAD('X',25,'X'),RPAD('X',26,'X'),NULL);
    1 row created.
    SQL> INSERT INTO STAGING VALUES (3,RPAD('X',25,'X'),RPAD('X',25,'X'),NULL);
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> SELECT * FROM STAGING;
            ID A                                        B                                        E
             1 XXXXXXXXXXXXXXXXXXXXXXXXXX               XXXXXXXXXXXXXXXXXXXXXXXXX
             2 XXXXXXXXXXXXXXXXXXXXXXXXX                XXXXXXXXXXXXXXXXXXXXXXXXXX
             3 XXXXXXXXXXXXXXXXXXXXXXXXX                XXXXXXXXXXXXXXXXXXXXXXXXX
    SQL> UPDATE  STAGING ST
      2  SET     ERR_LENGTH = 'Y'
      3  WHERE   EXISTS
      4          (
      5                  WITH    columns_in_staging AS
      6                  (
      7                          /* Retrieve all the columns names for the staging table with the exception of the primary key column
      8                           * and order them alphabetically.
      9                           */
    10                          SELECT  COLUMN_NAME
    11                          ,       ROW_NUMBER() OVER (ORDER BY COLUMN_NAME) RN
    12                          FROM    ALL_TAB_COLUMNS
    13                          WHERE   TABLE_NAME='STAGING'
    14                          AND     COLUMN_NAME != 'ID'
    15                          ORDER BY 1
    16                  ),      staging_unpivot AS
    17                  (
    18                          /* Using the columns_in_staging above UNPIVOT the result set so you get a record for each COLUMN value
    19                           * for each record. The DECODE performs the unpivot and it works if the decode specifies the columns
    20                           * in the same order as the ROW_NUMBER() function in columns_in_staging
    21                           */
    22                          SELECT  ID
    23                          ,       COLUMN_NAME
    24                          ,       DECODE
    25                                  (
    26                                          RN
    27                                  ,       1,A
    28                                  ,       2,B
    29                                  )  AS VAL
    30                          FROM            STAGING
    31                          CROSS JOIN      COLUMNS_IN_STAGING
    32                  )
    33                  /*      Only return IDs for records that have at least one column value that exceeds the length. */
    34                  SELECT  ID
    35                  FROM
    36                  (
    37                          /* Join the unpivoted staging table to the ALL_TAB_COLUMNS table on the column names. Here we perform
    38                           * the check to see if there are any differences in the length if so set a flag.
    39                           */
    40                          SELECT  STAGING_UNPIVOT.ID
    41                          ,       (CASE WHEN ATC.DATA_LENGTH < LENGTH(STAGING_UNPIVOT.VAL) THEN 'Y' END) AS ERR_LENGTH_A
    42                          ,       (CASE WHEN ATC.DATA_LENGTH < LENGTH(STAGING_UNPIVOT.VAL) THEN 'Y' END) AS ERR_LENGTH_B
    43                          FROM    STAGING_UNPIVOT
    44                          JOIN    ALL_TAB_COLUMNS ATC     ON ATC.COLUMN_NAME = STAGING_UNPIVOT.COLUMN_NAME
    45                          WHERE   ATC.TABLE_NAME='BASE'
    46                  )       A
    47                  WHERE   COALESCE(ERR_LENGTH_A,ERR_LENGTH_B) IS NOT NULL
    48                  AND     ST.ID = A.ID
    49          )
    50  /
    2 rows updated.
    SQL> SELECT * FROM STAGING;
            ID A                                        B                                        E
             1 XXXXXXXXXXXXXXXXXXXXXXXXXX               XXXXXXXXXXXXXXXXXXXXXXXXX                Y
             2 XXXXXXXXXXXXXXXXXXXXXXXXX                XXXXXXXXXXXXXXXXXXXXXXXXXX               Y
             3 XXXXXXXXXXXXXXXXXXXXXXXXX                XXXXXXXXXXXXXXXXXXXXXXXXXHopefully the comments make sense. If you have any questions please let me know.
    This assumes the column names are the same between the staging and base tables. In addition as you add more columns to this table you'll have to add more CASE statements to check the length and update the COALESCE check as necessary.
    Thanks!

  • Passing data to different internal tables with different columns from a comma delimited file

    Hi,
    I have a program wherein we upload a comma delimited file and based on the region( we have drop down in the selection screen to pick the region).  Based on the region, the data from the file is passed to internal table. For region A, we have 10 columns and for region B we have 9 columns.
    There is a split statement (split at comma) used to break the data into different columns.
    I need to add hard error messages if the no. of columns in the uploaded file are incorrect. For example, if the uploaded file is of type region A, then the uploaded file should be split into 10 columns. If the file contains lesser or more columns thenan error message should be added. Similar is the case with region B.
    I do not want to remove the existing split statement(existing code). Is there a way I can exactly pass the data into the internal table accurately? I have gone through some posts where in they have made use of the method cl_alv_table_create=>create_dynamic_table by passing the field catalog. But I cannot use this as I have two different internal tables to be populated based on the region. Appreciate help on this.
    Thanks,
    Pavan

    Hi Abhishek,
    I have no issues with the rows. I have a file with format like a1,b1,c1,d1,e1, the file should be uploaded and split at comma. So far its fine. After this, if the file is related to region A say Asia, then it should have 5 fields( as an example). So, all the 5 values a1,b1..e1 will be passed to 5 fields of itab1.
    I also have region B( say Europe)  whose file will have only 4 fields. So, file is of the form a2,b2,c2,d2. Again data is split at comma and passed to itab2.
    If some one loads file related to Asia and the file has only 4 fields  then the data would be incorrect. Similar is the case when someone tries to load Europe file with 5 fields related data. To avoid this, I want to validate the data uploaded. For this, I want to count the no. of fields (seperated by comma). If no. of fields is 5 then the file is related to Asia or if no. of fields is 4 then it is Europe file.
    Well, the no. of commas is nothing but no. of fields - 1. If the file is of the form a1,b1..e1 then I can say like if no. of commas = 4 then it is File Asia.But I am not sure how to write a code for this.Please advise.
    Thanks,
    Pavan

  • How to create a form on a table with 3 columns for a PK

    Hi All,
    We have a table that has 3 Columns that form the Primary Key and I would like to create a form based on that table; unfortuanately on the 'Create Form Page' there's only 2 options that identifies the first and second PK columns.
    Is there a way I could add the third PK column.
    Kind regards
    Mel

    Maybe this can help:
    http://apex.oracle.com/pls/otn/f?p=31517:157
    using instead of trigger on a view.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Cannot alter partitioned table with spatial column in Oracle 11.2.0.2.0

    Hello,
    I possibly discovered a bug in Oracle 11.2.0.2.0
    This script works fine with Oracle *11.2.0.1.0*:
    create table GEO_TABLE (
    ID NUMBER(19) not null,
    PART_NAME VARCHAR2(50) not null,
    GEO_POS MDSYS.SDO_GEOMETRY,
    constraint PK_GEO_TABLE primary key (ID)
    SEGMENT CREATION IMMEDIATE partition by list ( PART_NAME ) (partition P_DEFAULT values (DEFAULT)) enable row movement;
    ALTER TABLE GEO_TABLE ADD (COLUMN2 NUMBER(8) DEFAULT 0 NOT NULL);
    With Oracle *11.2.0.2.0* (on SLES 11, 64bit) i will get this error message on the alter table statement:
    SQL-Fehler: ORA-00600: Interner Fehlercode, Argumente: [kkpoffoc], [], [], [], [], [], [], [], [], [], [], []
    00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
    *Cause:    This is the generic internal error number for Oracle program
    exceptions.     This indicates that a process has encountered an
    exceptional condition.
    *Action:   Report as a bug - the first argument is the internal error number
    Can anyone reproduce this behaviour?
    BANNER
    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 Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Edited by: user7425061 on 19.11.2010 12:04

    Metalink does not have any references for this error - please raise SR with Oracle support.

  • ORA-03237 when creating table with BLOB columns on Oracle 9i

    I am playing with my new Oracle 9i database. I am trying to copy
    tables from my 8.1.6 db. Three tables won't create due to this
    new message. The 9i documentation says it's soemthing to do with
    freelist groups but my DBA says he hasn't set up any.
    The tablespace is one of these newfangled locally managed
    tablespaces (predetermined size 8k).
    I can create these tables if I change the BLOB column to datatype
    VARCHAR2(4000).
    I have raised this through the usual channels, but I thought I'd
    try this site as well.
    Cheers, APC

    victor_shostak wrote:
    Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML.

  • INSERTING DATA INTO A SQL SERVER 2005 TABLE, WHICH HAS A IDENTITY COLUMN

    Hi All,
    I have to insert the data into a SQL SERVER 2005 Database table.
    I am able to insert the data into a normal SQL Server table.
    When I am trying to insert the data into a SQL Server table, which has a identity column (i.e. auto increment column in Oracle) I am getting error saying that can't insert value explicitly when IDENTITY_INSERT is set to OFF.
    Had anybody tried this??
    There are some SRs on this issue, Oracle agreed that it is a bug. I am wondering if there is any workaround from any one of you (refer Insert in MS-SQL database table with IDENTITY COLUMN
    Thanks
    V Kumar

    Even I had raised a SR on this in October 2008. But didn't get any solution for a long time, finally I had removed the identity column from the table. I can't to that now :).
    I am using 10.1.3.3.0 and MS SQL SERVER 2005, They said it is working for MS SQL SERVER TABLE, if the identity column is not a primary key and asked me to refer to note 744735.1.
    I had followed that note, but still it is not working for me.
    But my requirement is it should work for a MS SQL SERVER 2005 table, which has identity column as primary key.
    Thanks
    V Kumar

  • Migrating From Sql Server 2005 to Oracle (Uniqueidentifier Issue)

    If i want to migrate from SQL SERVER 2005 to Oracle, How Oracle will deal with my primary key columns in almost all tables having datatype of UNIQUEIDENTIFIER ???
    is there any concept of uniqueidentifier in Oracle same as in SQL SERVER ????
    Regards

    When you migrate your SP's from SQL Server to Oracle the parser basically does 'as good a job as it can' to migrate them.
    Luckily, using SQL Developer you are able to look at the source SP and converted SP in windows next to each other and see what oracle has done to them.
    You can also paste your SQL Server code into a window and ask SQL Developer to translate it to oracle for you. Use the 'Translation Scratch Editor' on the migration menu if this is something that interests you. I was told that the parser used by the Translation Scratch Editor is different to the parser used when migrating the whole database.

  • How to move data from a staging table to three entity tables #2

    Environment: SQL Server 2008 R2
    I have a few questions:
    How would I prevent duplicate records, when/ IF SSIS is executed many times?
    How would I know that all huge volume of data being loaded in the entity tables?
    In reference to "how to move data from a staging table to three entity tables ", since I am loading large volume of data, while using lookup transformation:
    which of the merge components is best suited.
    How to configure merge component correctly. (screen shot is preferred) 
    Please refer to the following link
    http://social.msdn.microsoft.com/Forums/en-US/5f2128c8-3ddd-4455-9076-05fa1902a62a/how-to-move-data-from-a-staging-table-to-three-entity-tables?forum=sqlintegrationservices

    You can use RowCount transformation in the path where you want to capture record details. Then inside rowcount transformation pass a integer variable to get count value inside
    the event handler can be configured as below
    Inside Execute SQL task add INSERT statement to add rowcount to your audit table
    Can you also show me how to Check against destination table using key columns inside a lookup task and insert only non
    matched records (No Match output)
    This is explained clearly in below link which Arthur posted
    http://www.sqlis.com/sqlis/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx
    For large data I would prefer doing this in T-SQL. So what you could do is dump data to staging table and then apply
    T-SQL MERGE between tables (or even a combination of INSERT/UPDATE statements)
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Steps SSIS and SSAS Migration from sql server 2005 to 2012?

    steps SSIS,SSRS and SSAS Migration from sql server 2005 to 2012? any precautions to take while migration.
    any documentation or any specified steps.

    Hi Vijay,
    According to your description, you want to migrate SQL Server Integration Services and SQL Server Analysis Services from SQL Server 2005 to SQL Server 2012.
    For how to migrate SQL Server Integration Services, please refer to the article:
    http://www.bidn.com/blogs/DevinKnight/ssis/2718/upgrading-packages-to-ssis-2012.
    In addition, since the issue regards SQL Server Integration Services. I suggest you post the question in the SQL Server Integration Services forums at
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlintegrationservices.
    For how to migrate SQL Server Analysis Services, please refer to this article:
    http://www.codeproject.com/Articles/435703/Migration-from-SQL-server-to.
    In addition, since the issue regards SQL Server Analysis Services. I suggest you post the question in the SQL Server Analysis Services forums at
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlanalysisservices. It is appropriate and more experts will assist you.
    Regards,
    Michelle Li

  • How to migrate data from MS Access to Oracle???????

    how to migrate data from MS Access to Oracle???????

    You can use heterogeneous services (HS) connection to MS-Access from Oracle and still use the same PL/SQL (or even a single CTAS statement) or SQL to load directly to Oracle tables. It's transparent, quick and clean as opposed to writing complex control files.
    You might have to set the ODBC connection to your Access database and add the details to Oracle listener.
    Please let me know if you are not sure how to set up the connection.

  • How to insert data into the mysql table by giving as a text file

    Hi,
    Any one know's how to insert data into the mysql table by giving as a text file as the input in JSP.Please respond ASAP.
    Thanks:)

    At least you can try StringTokenizer to parse your text files. Or download a text JDBC driver to parse your files, for instance, HXTT Text(www.hxtt.net) or StelsCSV(www.csv-jdbc.com).

  • How to read data from an internal table into a real table?

    Hello experts,
    I'm relatively new to ABAP and I'm trying to figure out how to read data from an internal table into a table that I created.  I'm trying to use the RRW3_GET_QUERY_VIEW_DATA function module to read data from a multiprovider.  I'm trying to read data from the e_cell_data and e_axis_data tables into a table that I've already created.  Please see code below.
    TABLES MULTITAB.
    DATA:
      query_name TYPE RSZCOMPID,
      s_cubename TYPE RSINFOPROV,
      t_cell_data TYPE RRWS_T_CELL,
      t_axis_data TYPE RRWS_THX_AXIS_DATA,
      t_axis_info TYPE RRWS_THX_AXIS_INFO,
      wa_t_cell_data like line of t_cell_data,
      wa_t_axis_data like line of t_axis_data,
      w_corp_tab like line of t_cell_data.
    s_cubename = 'CORP_MPO1'.
    query_name = 'Z_corp_test'.
        CALL FUNCTION 'RRW3_GET_QUERY_VIEW_DATA'
           EXPORTING
             i_infoprovider           = s_cubename
             i_query                  = query_name
            i_t_parameter            = query_string_tab
           IMPORTING
             e_cell_data              = t_cell_data
             e_axis_data              = t_axis_data
             e_axis_info              = t_axis_info.
    If anyone has any information to help me, I would greatly appreciate it.  Thanks.

    Hi,
    <li>Once you call the function module RRW3_GET_QUERY_VIEW_DATA, lets say data is available in the corresponding tables e_cell_data e_axis_data which you have mentioned.
    <li>Modify your internal table defined for other purpose, with data from e_cell_data e_axis_data like below.
    LOOP AT t_cell_data INTO wa_t_cell_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_cell_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    LOOP AT t_axis_data INTO wa_t_axis_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_axis_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    Thanks
    Venkat.O

Maybe you are looking for

  • CO 1SRJ-001: Too many line items selected via report interface

    Report group/report 1SRJ/1SRJ-001 (CCentres: Rolling Year):  provides an overview for the last 12 periods of actual and plan data. When you access line item report RKAEP000 (KSB1 or KSBP) from report Cost Centres Rolling Year (1SRJ-001) using the rep

  • Organizing Music / Play Lists / Folders

    I have tried looking for the answer to my question in the iTunes forum search engine without much luck what so ever. But I am trying to organize my music and music video library in classifications putting together each form of music or music video in

  • Wrong Board. Please Delete

    Wrong Board. Please Delete. Wrong Board. Please Delete.

  • How can I get through this Adobe Elements 9 error message

    It's been perfectly installed and I'm using a serial number. Everytime I try to go to an old project or create a new one it says "Sorry, a serious error has occured that requires Adobe Premiere Elements to shut down. We will attempt to save your curr

  • Double-Extended Network with two AX - Possible?

    I am in a large apartment with lots of concrete walls. I use a Time Capsule (500G) connected to a cable modem to access the internet, and have two AX set up to extend the network twice. No. 1 is in a hall way and serves to extend the network into the