2012年3月20日星期二

BCP problem - help?

I'm attempting to run bcp to copy some files into a database and
receiving a format file error (below). I'm using someone else's format
file that I know already works for them, and I don't know what the
issue is. Below is the error, my bcp statement and format file....can
anyone tell what the problem is? (Note - some of the Collation
values are wrapped b/c of my newsreader - in the format file they are
all on the appropriate line and tab delimited). Thanks.
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]I/O error while reading BCP
format file
bcp TIGER..TIGER_01 in "c:\documents and settings\user\my
documents\geocoding\TGR37001.RT1" -f "c:\documents and settings\user\my
documents\geocoding\tiger1.txt" -S HOSTNAME -U sa -P Password -e
"c:\documents and settings\user\my
documents\geocoding\errors\TGR37001.RT1.error.txt" -m50000
8.0
44
1SQLCHAR01""1RTSQL_Latin1_General_CP1_CI_AS
2SQLCHAR04""2VERSIONNULL
3SQLCHAR010""3TLIDNULL
4SQLCHAR01""4SIDE1NULL
5SQLCHAR01""5SOURCESQL_Latin1_General_CP1_CI_AS
6SQLCHAR02""6FEDIRPSQL_Latin1_General_CP1_CI_AS
7SQLCHAR030""7FENAMESQL_Latin1_General_CP1_CI_AS
8SQLCHAR04""8FETYPESQL_Latin1_General_CP1_CI_AS
9SQLCHAR02""9FEDIRSSQL_Latin1_General_CP1_CI_AS
10SQLCHAR03""10CFCCSQL_Latin1_General_CP1_CI_AS
11SQLCHAR011""11FRADDLNULL
12SQLCHAR011""12TOADDLNULL
13SQLCHAR011""13FRADDRNULL
14SQLCHAR011""14TOADDRNULL
15SQLCHAR01""15FRIADDLSQL_Latin1_General_CP1_CI_AS
16SQLCHAR01""16TOIADDLSQL_Latin1_General_CP1_CI_AS
17SQLCHAR01""17FRIADDRSQL_Latin1_General_CP1_CI_AS
18SQLCHAR01""18TOIADDRSQL_Latin1_General_CP1_CI_AS
19SQLCHAR05""19ZIPLNULL
20SQLCHAR05""20ZIPRNULL
21SQLCHAR05""21AIANHHFPLNULL
22SQLCHAR05""22AIANHHFPRNULL
23SQLCHAR01""23AIHHTLILSQL_Latin1_General_CP1_CI_AS
24SQLCHAR01""24AIHHTLIRSQL_Latin1_General_CP1_CI_AS
25SQLCHAR01""25CENSUS1SQL_Latin1_General_CP1_CI_AS
26SQLCHAR01""26CENSUS2SQL_Latin1_General_CP1_CI_AS
27 SQLCHAR02""27STATELNULL
28SQLCHAR02""28STATERNULL
29SQLCHAR03""29COUNTYLNULL
30SQLCHAR03""30COUNTYRNULL
31SQLCHAR05""31COUSUBLNULL
32SQLCHAR05""32COUSUBRNULL
33SQLCHAR05""33SUBMCDLNULL
34SQLCHAR05""34SUBMCDRNULL
35SQLCHAR05""35PLACELNULL
36SQLCHAR05""36PLACERNULL
37SQLCHAR06""37TRACTLNULL
38SQLCHAR06""38TRACTRNULL
39SQLCHAR04""39BLOCKLNULL
40SQLCHAR04""40BLOCKRNULL
41SQLCHAR010""41FRLONGNULL
42SQLCHAR0 9""42FRLATNULL
43SQLCHAR010""43TOLONGNULL
44SQLCHAR09"\r\n"44TOLATNULL
The error message indicates an I/O error, are there any network problems, can
SQL Server see the file, does SQL Server have permissions to access the file?
http://sqlservercode.blogspot.com/
"Corey Bunch" wrote:

> I'm attempting to run bcp to copy some files into a database and
> receiving a format file error (below). I'm using someone else's format
> file that I know already works for them, and I don't know what the
> issue is. Below is the error, my bcp statement and format file....can
> anyone tell what the problem is? (Note - some of the Collation
> values are wrapped b/c of my newsreader - in the format file they are
> all on the appropriate line and tab delimited). Thanks.
> SQLState = S1000, NativeError = 0
> Error = [Microsoft][ODBC SQL Server Driver]I/O error while reading BCP
> format file
>
> bcp TIGER..TIGER_01 in "c:\documents and settings\user\my
> documents\geocoding\TGR37001.RT1" -f "c:\documents and settings\user\my
> documents\geocoding\tiger1.txt" -S HOSTNAME -U sa -P Password -e
> "c:\documents and settings\user\my
> documents\geocoding\errors\TGR37001.RT1.error.txt" -m50000
> 8.0
> 44
> 1SQLCHAR01""1RTSQL_Latin1_General_CP1_CI_AS
> 2SQLCHAR04""2VERSIONNULL
> 3SQLCHAR010""3TLIDNULL
> 4SQLCHAR01""4SIDE1NULL
> 5SQLCHAR01""5SOURCESQL_Latin1_General_CP1_CI_AS
> 6SQLCHAR02""6FEDIRPSQL_Latin1_General_CP1_CI_AS
> 7SQLCHAR030""7FENAMESQL_Latin1_General_CP1_CI_AS
> 8SQLCHAR04""8FETYPESQL_Latin1_General_CP1_CI_AS
> 9SQLCHAR02""9FEDIRSSQL_Latin1_General_CP1_CI_AS
> 10SQLCHAR03""10CFCCSQL_Latin1_General_CP1_CI_AS
> 11SQLCHAR011""11FRADDLNULL
> 12SQLCHAR011""12TOADDLNULL
> 13SQLCHAR011""13FRADDRNULL
> 14SQLCHAR011""14TOADDRNULL
> 15SQLCHAR01""15FRIADDLSQL_Latin1_General_CP1_CI_AS
> 16SQLCHAR01""16TOIADDLSQL_Latin1_General_CP1_CI_AS
> 17SQLCHAR01""17FRIADDRSQL_Latin1_General_CP1_CI_AS
> 18SQLCHAR01""18TOIADDRSQL_Latin1_General_CP1_CI_AS
> 19SQLCHAR05""19ZIPLNULL
> 20SQLCHAR05""20ZIPRNULL
> 21SQLCHAR05""21AIANHHFPLNULL
> 22SQLCHAR05""22AIANHHFPRNULL
> 23SQLCHAR01""23AIHHTLILSQL_Latin1_General_CP1_CI_AS
> 24SQLCHAR01""24AIHHTLIRSQL_Latin1_General_CP1_CI_AS
> 25SQLCHAR01""25CENSUS1SQL_Latin1_General_CP1_CI_AS
> 26SQLCHAR01""26CENSUS2SQL_Latin1_General_CP1_CI_AS
> 27 SQLCHAR02""27STATELNULL
> 28SQLCHAR02""28STATERNULL
> 29SQLCHAR03""29COUNTYLNULL
> 30SQLCHAR03""30COUNTYRNULL
> 31SQLCHAR05""31COUSUBLNULL
> 32SQLCHAR05""32COUSUBRNULL
> 33SQLCHAR05""33SUBMCDLNULL
> 34SQLCHAR05""34SUBMCDRNULL
> 35SQLCHAR05""35PLACELNULL
> 36SQLCHAR05""36PLACERNULL
> 37SQLCHAR06""37TRACTLNULL
> 38SQLCHAR06""38TRACTRNULL
> 39SQLCHAR04""39BLOCKLNULL
> 40SQLCHAR04""40BLOCKRNULL
> 41SQLCHAR010""41FRLONGNULL
> 42SQLCHAR0 9""42FRLATNULL
> 43SQLCHAR010""43TOLONGNULL
> 44SQLCHAR09"\r\n"44TOLATNULL
>

没有评论:

发表评论