Re: Easiest way to transfer data from Oracle to SQL Server using a file.

From: Joe Maloney <mpir_at_bellsouth.net>
Date: 2 Jul 2003 06:28:12 -0700
Message-ID: <d17bad25.0307020528.3a2d27bd_at_posting.google.com>


etspiars_at_aol.com (Shawn Spiars) wrote in message news:<42ddd2f6.0307011646.22ee4f7c_at_posting.google.com>...
> joseph.buhl_at_vspan.com (joe buhl) wrote in message news:<f87cf429.0306250707.637670db@posting.google.com>...
> > "Linus Nikander" <linus_at_nikander.net> wrote in message news:<It3Ka.6317$GK.113_at_news2.bredband.com>...
> > > As I stated in my original post i MUST go via a file of some sort so that
> > > really isn't an option for me. Any suggestions there ?
> >
> > Yes Mark Powell already posted your solution. Construct a SQL*plus
> > script that generates a delimited file. I think he posted a "how to"
> > link. Then bcp the file into sql server.
> >
> >
> > jab
>
> You may try a product called dbwidget (http://www.yazoosoft.com). It
> has an unload feature that unloads a tables data definition language
> and creates insert statements for the data in the table. It works
> with several different
> databases including Oracle and MS SQL Server.

Depending on your table, these easiest may be (in SQL*PLUS):

set linesize 512 /* width of table, but there are limits */ set pagesize 0 /* may have to set it high instead, say 50000, will generate a blank line at that point */
set headings off
set feedback off
set time off
set timing off
set pause off
spool table_name.asc
select * from table;
spool off

THis will list the file in ascii text, fixed width fields, to a spool file. There are commands for column width and formatting, but I don't know your table structure. Received on Wed Jul 02 2003 - 15:28:12 CEST

Original text of this message