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

2012年3月19日星期一

BCP IN with text/ntext column fails! Is this is a bug?

Hi,

We are in process to test SQL Server 2005 migration; everything seems to work very well,
except one job that transfer data between two databases using BCP tool.
In fact the BCP fail only for one table that have ntext column, If I use the table directly in BCP OUT/IN command it works fine, but if I use a View it fail (I'm using view because the ORDER of columns in target database could be different than source database).

This is the error I receive:
SQLState = S1000, NativeError = 606
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Metadata inconsistency. Filegroup id 0 specified for table '' does not exist. Run DBCC CHECKDB or CHECKCATALOG.

Note : If I change the ntext column to nvarchar(max) it works very well

Is this is a known bug ?
Do I have to change my ntext/text columns to nvarchar(max)/varchar(max) types ?

Any advice is welcome
Thank you.

I have repro-ed the proble. However I have a workaround.

Try BCP IN the data from the BCP file into a table with the same column order as the view, and it will work.

Now create a view on this table. This will resolve your problem.

|||

We have the same problem. The problem with the workaround is that it is very inefficient. If you wanted to do this same thing on tables that have millions of rows, it means you now have to create a table, load the new table and then transfer the data from this new table to the one you want, and delete the new table, instead of using a view like you could in SQL 2000, SQL 7.5 and SQL 6.5. Not only is that a lot slower, but it consumes a lot more disk space (assuming your tables with Text or image data contain lots of data)

It seems like an obvious bug to me. The documentation for BCP has always allowed you to specify a view instead of a table. I can't image why anyone would design this to not work for image or text data in SQL 2005.

BCP IN with text/ntext column fails! Is this is a bug?

Hi,

We are in process to test SQL Server 2005 migration; everything seems to work very well,
except one job that transfer data between two databases using BCP tool.
In fact the BCP fail only for one table that have ntext column, If I use the table directly in BCP OUT/IN command it works fine, but if I use a View it fail (I'm using view because the ORDER of columns in target database could be different than source database).

This is the error I receive:
SQLState = S1000, NativeError = 606
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Metadata inconsistency. Filegroup id 0 specified for table '' does not exist. Run DBCC CHECKDB or CHECKCATALOG.

Note : If I change the ntext column to nvarchar(max) it works very well

Is this is a known bug ?
Do I have to change my ntext/text columns to nvarchar(max)/varchar(max) types ?

Any advice is welcome
Thank you.

I have repro-ed the proble. However I have a workaround.

Try BCP IN the data from the BCP file into a table with the same column order as the view, and it will work.

Now create a view on this table. This will resolve your problem.

|||

We have the same problem. The problem with the workaround is that it is very inefficient. If you wanted to do this same thing on tables that have millions of rows, it means you now have to create a table, load the new table and then transfer the data from this new table to the one you want, and delete the new table, instead of using a view like you could in SQL 2000, SQL 7.5 and SQL 6.5. Not only is that a lot slower, but it consumes a lot more disk space (assuming your tables with Text or image data contain lots of data)

It seems like an obvious bug to me. The documentation for BCP has always allowed you to specify a view instead of a table. I can't image why anyone would design this to not work for image or text data in SQL 2005.

2012年3月11日星期日

BCP IN with text/ntext column fails! Is this is a bug?

Hi,

We are in process to test SQL Server 2005 migration; everything seems to work very well,
except one job that transfer data between two databases using BCP tool.
In fact the BCP fail only for one table that have ntext column, If I use the table directly in BCP OUT/IN command it works fine, but if I use a View it fail (I'm using view because the ORDER of columns in target database could be different than source database).

This is the error I receive:
SQLState = S1000, NativeError = 606
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Metadata inconsistency. Filegroup id 0 specified for table '' does not exist. Run DBCC CHECKDB or CHECKCATALOG.

Note : If I change the ntext column to nvarchar(max) it works very well

Is this is a known bug ?
Do I have to change my ntext/text columns to nvarchar(max)/varchar(max) types ?

Any advice is welcome
Thank you.

I have repro-ed the proble. However I have a workaround.

Try BCP IN the data from the BCP file into a table with the same column order as the view, and it will work.

Now create a view on this table. This will resolve your problem.

|||

We have the same problem. The problem with the workaround is that it is very inefficient. If you wanted to do this same thing on tables that have millions of rows, it means you now have to create a table, load the new table and then transfer the data from this new table to the one you want, and delete the new table, instead of using a view like you could in SQL 2000, SQL 7.5 and SQL 6.5. Not only is that a lot slower, but it consumes a lot more disk space (assuming your tables with Text or image data contain lots of data)

It seems like an obvious bug to me. The documentation for BCP has always allowed you to specify a view instead of a table. I can't image why anyone would design this to not work for image or text data in SQL 2005.

2012年2月23日星期四

bcp and invalid character value set

Hello
I've read that there is a bug in sql server 2000 when doing a bcp command
with dates in dd-mm-yyyy format. and to fix it there is a hotfix contained
in sp4 . I ve installed the sp4 but the bug remains anybody has an idea
about this hotfix and from where we can get it
thx
Hi
Can you point to where there is a reference to this "bug"?
The -R flag will use the regional setting of the client machine and there
was a fix in SP1 where this was being ignored.
You will need to make sure that you also have the correct version of the
client tools on the machine that you are using.
John
"Pascal Haddad" <ph@.sabaipc.com> wrote in message
news:u8LAsf6qFHA.3096@.TK2MSFTNGP15.phx.gbl...
> Hello
> I've read that there is a bug in sql server 2000 when doing a bcp command
> with dates in dd-mm-yyyy format. and to fix it there is a hotfix contained
> in sp4 . I ve installed the sp4 but the bug remains anybody has an idea
> about this hotfix and from where we can get it
> thx
>
>

bcp and invalid character value set

Hello
I've read that there is a bug in sql server 2000 when doing a bcp command
with dates in dd-mm-yyyy format. and to fix it there is a hotfix contained
in sp4 . I ve installed the sp4 but the bug remains anybody has an idea
about this hotfix and from where we can get it
thxHi
Can you point to where there is a reference to this "bug"?
The -R flag will use the regional setting of the client machine and there
was a fix in SP1 where this was being ignored.
You will need to make sure that you also have the correct version of the
client tools on the machine that you are using.
John
"Pascal Haddad" <ph@.sabaipc.com> wrote in message
news:u8LAsf6qFHA.3096@.TK2MSFTNGP15.phx.gbl...
> Hello
> I've read that there is a bug in sql server 2000 when doing a bcp command
> with dates in dd-mm-yyyy format. and to fix it there is a hotfix contained
> in sp4 . I ve installed the sp4 but the bug remains anybody has an idea
> about this hotfix and from where we can get it
> thx
>
>

bcp and invalid character value set

Hello
I've read that there is a bug in sql server 2000 when doing a bcp command
with dates in dd-mm-yyyy format. and to fix it there is a hotfix contained
in sp4 . I ve installed the sp4 but the bug remains anybody has an idea
about this hotfix and from where we can get it
thx
Do you have anything more specific on this? What is the behavior that is
failing?
| From: "Pascal Haddad" <ph@.sabaipc.com>
| Subject: bcp and invalid character value set
| Date: Sat, 27 Aug 2005 21:33:25 +0200
| Lines: 9
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <#GfznXzqFHA.3352@.TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.odbc
| NNTP-Posting-Host: 213.175.179.18
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2623
| X-Tomcat-NG: microsoft.public.sqlserver.odbc
|
| Hello
|
| I've read that there is a bug in sql server 2000 when doing a bcp command
| with dates in dd-mm-yyyy format. and to fix it there is a hotfix
contained
| in sp4 . I ve installed the sp4 but the bug remains anybody has an idea
| about this hotfix and from where we can get it
| thx
|
|
|

bcp and invalid character value set

Hello
I've read that there is a bug in sql server 2000 when doing a bcp command
with dates in dd-mm-yyyy format. and to fix it there is a hotfix contained
in sp4 . I ve installed the sp4 but the bug remains anybody has an idea
about this hotfix and from where we can get it
thxDo you have anything more specific on this? What is the behavior that is
failing?
| From: "Pascal Haddad" <ph@.sabaipc.com>
| Subject: bcp and invalid character value set
| Date: Sat, 27 Aug 2005 21:33:25 +0200
| Lines: 9
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <#GfznXzqFHA.3352@.TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.odbc
| NNTP-Posting-Host: 213.175.179.18
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2623
| X-Tomcat-NG: microsoft.public.sqlserver.odbc
|
| Hello
|
| I've read that there is a bug in sql server 2000 when doing a bcp command
| with dates in dd-mm-yyyy format. and to fix it there is a hotfix
contained
| in sp4 . I ve installed the sp4 but the bug remains anybody has an idea
| about this hotfix and from where we can get it
| thx
|
|
|