Hello, i have a problem when i try and bcp in data originating from a 6.5
server onto sql 2000.
The problem appears to be due to a column in the table which is defined as
type Sysname, this is different on the platforms, from being varchar(30) on
sql 6.5 to nvarchar(128) on sql 2000.
I use native for bcp out and in and i also specify -V 65 on the bcp in ie
EXEC MASTER.DBO.XP_CMDSHELL 'bcp testdb.dbo.COMMS_SP_LOOKUP in
COMMS_SP_LOOKUP.bcp -n -V 65 -Usa -P'
The error i get is as follows :
Starting copy...
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unexpected EOF encountered in BCP
data-file
Is there a way of getting around this ?
I suggest you use character mode BCP rather than native mode when copying
data between SQL Server versions.
Hope this helps.
Dan Guzman
SQL Server MVP
"billu" <billu@.discussions.microsoft.com> wrote in message
news:1A91A98C-740A-4840-847E-50985EA50BB1@.microsoft.com...
> Hello, i have a problem when i try and bcp in data originating from a 6.5
> server onto sql 2000.
> The problem appears to be due to a column in the table which is defined as
> type Sysname, this is different on the platforms, from being varchar(30)
> on
> sql 6.5 to nvarchar(128) on sql 2000.
> I use native for bcp out and in and i also specify -V 65 on the bcp in ie
> EXEC MASTER.DBO.XP_CMDSHELL 'bcp testdb.dbo.COMMS_SP_LOOKUP in
> COMMS_SP_LOOKUP.bcp -n -V 65 -Usa -P'
>
> The error i get is as follows :
> Starting copy...
> SQLState = 22001, NativeError = 0
> Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
> SQLState = S1000, NativeError = 0
> Error = [Microsoft][ODBC SQL Server Driver]Unexpected EOF encountered in
> BCP
> data-file
> Is there a way of getting around this ?
没有评论:
发表评论