显示标签为“causing”的博文。显示所有博文
显示标签为“causing”的博文。显示所有博文

2012年3月11日星期日

Bcp in problem

Is it possible that there is something in your data file
that is causing bcp to think that it has reached an EOF
marker?
Something else you can try is using the -F option to
specify which is the first row to start importing, and
maybe setting this value to 1 million or maybe even 2
million and see what happens.
This should help to eliminate the possibility that there
is something wrong with the data file at that point in
the file where it seems to stop.
I hope that this helps.
Matthew Bando
BandoM@.CSCTechnologies dot com

>--Original Message--
>Hi,
>I am loading a table with 7 million records using bcp
in, however, what i noticed it that the bcp in process
terminates when it reaches around 2.5 million rows.
>I don't feel there should be any such limitation on bcp,
however would like to know if anyone have come across
this problem and how they have worked around to resolve
this problem.
>Thanks.
>.
>
I feel this should be the cause ... as the data is huge i will extract it once again with some special row delimeter and retry.
Will update once done.
Thank you all for your inputs.
"Matthew Bando" wrote:

> Is it possible that there is something in your data file
> that is causing bcp to think that it has reached an EOF
> marker?
> Something else you can try is using the -F option to
> specify which is the first row to start importing, and
> maybe setting this value to 1 million or maybe even 2
> million and see what happens.
> This should help to eliminate the possibility that there
> is something wrong with the data file at that point in
> the file where it seems to stop.
> I hope that this helps.
> Matthew Bando
> BandoM@.CSCTechnologies dot com
>
> in, however, what i noticed it that the bcp in process
> terminates when it reaches around 2.5 million rows.
> however would like to know if anyone have come across
> this problem and how they have worked around to resolve
> this problem.
>

Bcp in problem

Is it possible that there is something in your data file
that is causing bcp to think that it has reached an EOF
marker?
Something else you can try is using the -F option to
specify which is the first row to start importing, and
maybe setting this value to 1 million or maybe even 2
million and see what happens.
This should help to eliminate the possibility that there
is something wrong with the data file at that point in
the file where it seems to stop.
I hope that this helps.
Matthew Bando
BandoM@.CSCTechnologies dot com

>--Original Message--
>Hi,
>I am loading a table with 7 million records using bcp
in, however, what i noticed it that the bcp in process
terminates when it reaches around 2.5 million rows.
>I don't feel there should be any such limitation on bcp,
however would like to know if anyone have come across
this problem and how they have worked around to resolve
this problem.
>Thanks.
>.
>I feel this should be the cause ... as the data is huge i will extract it on
ce again with some special row delimeter and retry.
Will update once done.
Thank you all for your inputs.
"Matthew Bando" wrote:

> Is it possible that there is something in your data file
> that is causing bcp to think that it has reached an EOF
> marker?
> Something else you can try is using the -F option to
> specify which is the first row to start importing, and
> maybe setting this value to 1 million or maybe even 2
> million and see what happens.
> This should help to eliminate the possibility that there
> is something wrong with the data file at that point in
> the file where it seems to stop.
> I hope that this helps.
> Matthew Bando
> BandoM@.CSCTechnologies dot com
>
> in, however, what i noticed it that the bcp in process
> terminates when it reaches around 2.5 million rows.
> however would like to know if anyone have come across
> this problem and how they have worked around to resolve
> this problem.
>

BCP Import file - how to ignore top line

I have an earlier issue that has now been resolved, but now I am dealing
with a CSV file that is causing problems with my BCP import.
The csv file has column headers in the first row. Unfortunately, they
have spaces in the labels and the BCP utility cannot handle it. My BCP
command line says to start importing on line 2, but it still does not
like the spaces in the top row. Any suggestions besides modifying the
csv file since that is not an option?
*** Sent via Developersdex http://www.examnotes.net ***IGNORE. This has been resolved.
*** Sent via Developersdex http://www.examnotes.net ***

BCP Help - Going Crazy!

I have successfully used BCP before. But, this time, I have an entirely
new import csv file and it's causing me so much trouble. I am working
with a CSV file with more fields than the SQL table but I am following
what BOL tells me to do. PLEASE HELP!!!
ERROR: Incorrect host-column number found in BCP format-file
Here are the specs:
SQL2000
tablename: lbar_mlsdata_temp_resi
fields:
ML_NUMBER varchar 255
Property_Type_Desc varchar 255
bcp fmt file:
8.0
3
1 SQLCHAR 0 255 "," 1 ML_Number
SQL_Latin1_General_CP1_CI_AS
2 SQLCHAR 0 0 "," 0 Listing Agent ID
SQL_Latin1_General_CP1_CI_AS
3 SQLCHAR 0 0 "\r\n" 0 Type/Style Desc
SQL_Latin1_General_CP1_CI_AS
CSV FILE:
"ML_Number","Listing Agent ID","Listing Agent Name"
"204980","33404","Cindy W Crutcher"
"300614","16901","Linda C Wilson"
"406804","21109","Glynn A Gregory"
"312289","17314","Linda L Friess"
command line:
bcp databasename..lbar_mlsdata_temp_resi in ""c:\bcptest\resi2.csv"" -f
""c:\bcptest\bcp.fmt"" -F 2 -o ""c:\bcptest\VendorOut.txt"" -U x -P x -S
x
*** Sent via Developersdex http://www.examnotes.net ***The answer to your problem doesn't immediately occur to me. Although it
may occur to someone else here.
Were I you, I would create a table with just the three columns that
match your BCP format spec...and try that. If that works, then run
subsequently a stored procedure to Insert the data into the final
destination table.
FYI it's my understand also that CSV files have no text qualifiers
like: "" and just commas seperating values. I call the file you have a:
quote-comma delimted file. But that probably isn't too relative to your
issue.|||Ok, so I figured out at least part of the ISSUE. The field names in the
BCP fmt file has spaces in them. That was the issue. I should have known
this, but, lesson learned.
I am going to post the new problem to another message.
Thanks!
*** Sent via Developersdex http://www.examnotes.net ***

2012年3月8日星期四

bcp has primary key contraint error

When running a bcp to insert data into a table, I get a violation of primary key contraint. Is there any way to tell what row is causing the problem? The error I'm getting is:
SQLState = 23000, NativeError = 2627
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'table_name'. Cannot insert duplicate key in object 'table_name'.
SQLState = 01000, NativeError = 3621
Warning = [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
BCP copy in failed
Hi
Try the -e option. From Books online:
-e err_file
Specifies the full path of an error file used to store any rows bcp is
unable to transfer from the file to the database. Error messages from bcp go
to the user's workstation. If this option is not used, an error file is not
created.
John
"erika" <anonymous@.discussions.microsoft.com> wrote in message
news:9888AE94-88DC-499B-8EA9-E61C2A72F546@.microsoft.com...
> When running a bcp to insert data into a table, I get a violation of
primary key contraint. Is there any way to tell what row is causing the
problem? The error I'm getting is:
> SQLState = 23000, NativeError = 2627
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of
PRIMARY KEY constraint 'table_name'. Cannot insert duplicate key in object
'table_name'.
> SQLState = 01000, NativeError = 3621
> Warning = [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has
been terminated.
> BCP copy in failed
>

bcp has primary key contraint error

When running a bcp to insert data into a table, I get a violation of primary
key contraint. Is there any way to tell what row is causing the problem? Th
e error I'm getting is:
SQLState = 23000, NativeError = 2627
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Violation
of PRIMARY KEY constraint 'table_name'. Cannot insert duplicate key in obje
ct 'table_name'.
SQLState = 01000, NativeError = 3621
Warning = [Microsoft][ODBC SQL Server Driver][SQL Server]The sta
tement has been terminated.
BCP copy in failedHi
Try the -e option. From Books online:
-e err_file
Specifies the full path of an error file used to store any rows bcp is
unable to transfer from the file to the database. Error messages from bcp go
to the user's workstation. If this option is not used, an error file is not
created.
John
"erika" <anonymous@.discussions.microsoft.com> wrote in message
news:9888AE94-88DC-499B-8EA9-E61C2A72F546@.microsoft.com...
> When running a bcp to insert data into a table, I get a violation of
primary key contraint. Is there any way to tell what row is causing the
problem? The error I'm getting is:
> SQLState = 23000, NativeError = 2627
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of[/v
bcol]
PRIMARY KEY constraint 'table_name'. Cannot insert duplicate key in object
'table_name'.[vbcol=seagreen]
> SQLState = 01000, NativeError = 3621
> Warning = [Microsoft][ODBC SQL Server Driver][SQL Server]The statement
has
been terminated.
> BCP copy in failed
>