Re: BCP Troubles



dataguy (barry_noble@xxxxxxxxxxxxxxx) writes:
> We are trying to move data from a product called TABLEBase that runs on
> the mainframe and we are experiencing problems trying to BCP the data
> into SQL Server. The SQL server we are tying to BCP into is SQL 2000.
> We are using BCP from a command prompt.
>
> Here is what happens.
>
> the first time it doesn't load anything and we get no messages.The only
> way I got it to work was to run BCP and have it create a ForMaT file.
> I compared the ForMat file I created by hand,to the ForMat file I
> created from BCP they are identical. (I used a product called beyond
> compare to check it). After I created the ForMaT file and loaded the
> data, I then deleted the data and ran it with the original ForMaT file
> (no changes) and the data loaded fine this time.
>
> Has anyone else run into this before? It is driving us nuts!

Is this repeatable? From your description, it sounds as it happened
once.

Or does the first attempt of every file fail silently? Do you really
have to use your own format file in between for the load to work?

Normally, I would ask for CREATE TABLE, format file and sample data file,
but I'm not sure that would be useful this time.

What I can say, that I cannot recall ever having run into that BCP
fails without message. As a matter of fact, BCP never completes
silently. So it sounds like the first time BCP is not executed at
all. Is it in a command file?


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

.



Relevant Pages

  • Re: BCP import
    ... How can I tell BCP to ignore the surrounding double-quotation marks? ... You need to use a format file where you specify the double quotes as ... SQL Server MVP Linda Weirzbiecki. ... the integer column is not enclosed in quotes. ...
    (microsoft.public.sqlserver.programming)
  • Re: BCP Troubles
    ... But please put the sample data and format file in a zip ... > file first prior to doing the BCP in.. ... BCP's error messages are sometimes very obscure. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: bcp problem
    ... You could try using a format file, where the column delimiters would be ... qualifiers be part of the delimiter and thus get stripped out. ... If you want to stick with bcp, then just try using the Bulk Insert Task, as ... > f text 16 nulls ...
    (microsoft.public.sqlserver.dts)
  • Re: Create Job to dump SP results into a text file.
    ... I am glad to hear that the osql works fine now. ... I use BCP to create a format file for the output (this could be ... ', type a name to generate the format file, I use ... create a table 'authorsx' to hold the result set of the stored ...
    (microsoft.public.sqlserver.programming)
  • RE: BCP genric error
    ... I issue the bcp I get ... How does the format file look like? ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)