Link to home
Start Free TrialLog in
Avatar of ballioballi
ballioballi

asked on

Export one table from sqlserver to oracle 10g

I have to export just one table from a Sql server database to Oracle.

I heard that it can be done using ODBC driver.

Can some one able to give me the steps to create.

Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

I would attempty this:
* if you have the oracle client installed on the sql server box, you can create a linked server in sql server, pointing to the oracle database
* create the table to be imported in oracle as needed.
* run a query like this in sql server
INSERT INTO OPENQUERY(your_linked_server, 'SELECT col1, col2, col3 ... FROM table_owner.table_name WHERE 1= 0 ' )
 SELECT field1, field2, field3 ...
   FROM your_sql_table
  WHERE ..

Open in new window

here is a little help to create linked server. example show linked server of Access but you can use same thing, change provider and credentials.

http://www.sqlhub.com/2009/03/linked-server-in-sql-server-2005-from.html
Avatar of ballioballi
ballioballi

ASKER

No, I don't have any oracle client on the sql server.

if Oracle server is in your network, even you can create linked server and can use the same query explained in example link
SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I like to go for the ODBC driver instead.
Appreciate if anyone used it?


when I wrote "oracle client", that was referring to a "minimal install" with the ODBC part and the oracle tns client part.
That is an old production sql server box and No install is permitted.
I can do anything on the Oracle Box instead.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you could create an intermediate sql server, with a linked server to both the mssql and the oracle database...

on oracle, you could investigate on creating a heterogeneous connection, but I never yet adventured me into that (although I would like to do that once :)

the ms access can also work, if the table(s) not toooooo large.
The table is small table.
rrjegan17,

Export import wizard needs to use ODBC .. that is what I am asking to set it up.

Thanks,

Can you kindly install Oracle ODBC driver in your windows machine from the link below:

http://www.oracle.com/technology/software/tech/windows/odbc/index.html

Once you install that you will find this ODBC driver in your Import / Export Wizard.

Hope this helps.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial