Showing posts with label format. Show all posts
Showing posts with label format. Show all posts

Friday, February 24, 2012

.dbf file import (duplicate Field Names)

I am importing a file creating by an application which exports the file into .dbf format. Very unfortunately, this .dbf file can have fields with IDENTICAL column_names. Utilizing ActiveX, I create an ado connection to the .dbf file using a visual foxpro drver. However, and not unexpectantly, I can not do the 'select *' from the file if there are duplicate names.

Can anyone make recommendations here that might help?

Oh, this is SQL200 in case that impacts what you might advise!!!!

Anyone out there from MSFT want to make some suggestions?|||

Hi Ellen,

I find it surprising that the DBF file can have duplicate field names. What application created it? Is it a FoxPro DBF or a DbaseIV or Paradox DBF?

I assume you are able to read the table structure with something other than SQL Server, is that correct?

Are you using ODBC or OLE DB? The latest FoxPro and Visual FoxPro OLE DB data provider is downloadable from msdn.microsoft.com/vfoxpro/downloads/updates .

Sunday, February 19, 2012

.bak file format?

Hi.

I was wondering if anybody could piont me to a reference for the .bak
file format.

I need to upload a huge amount of data from a unix machine into an MS
SQLServer database and have tried lots of different things with mixed
results.

I occurs to me that if I can generate a .bak file on the unix side,
move it over to the MS side and 'restore' the database, that would
probably be the fastest possible method.

Thanks,

-jimAssuming that you are referring to the MS-specific binary .bak DB backup
file format, I would be very surprised if MS releases those types of
details. It could/would prevent them from changing the format..

Even aside from this, generating a .bak file on the Unix side is
unlikely. There are potential big-endian, little-endian issues. You do
know that SQL Server runs only on Windows, yes?

Is there another DB on the unix side? Could you hook up to it as a
linked server w/ an OLE DB driver or something?

I would export in ascii delimited CSV format or something, and then
import into SQL server w/ the integration services import/export wizard.

hth

Allen Jantzen

jims wrote:

Quote:

Originally Posted by

Hi.
>
I was wondering if anybody could piont me to a reference for the .bak
file format.
>
I need to upload a huge amount of data from a unix machine into an MS
SQLServer database and have tried lots of different things with mixed
results.
>
I occurs to me that if I can generate a .bak file on the unix side,
move it over to the MS side and 'restore' the database, that would
probably be the fastest possible method.
>
Thanks,
>
-jim
>

|||jims (jim@.asrc.cestm.albany.edu) writes:

Quote:

Originally Posted by

I was wondering if anybody could piont me to a reference for the .bak
file format.
>
I need to upload a huge amount of data from a unix machine into an MS
SQLServer database and have tried lots of different things with mixed
results.
>
I occurs to me that if I can generate a .bak file on the unix side,
move it over to the MS side and 'restore' the database, that would
probably be the fastest possible method.


It would take you ages until you have produced that .bak file. Your data
will be stale by then.

The fastest way to load lots of data into SQL Server is bulk copy. You have
a lot more options if you first put the file in a place where you can access
it from Windows. The simplest is probably to use the command-line tool
BCP. You need to format the data in a way so that BCP can read it. (But
BCP is flexible.)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx