Posted by Dan Guzman on 03/11/06 15:47
> Would mind sharing that repro? It sounds like a pretty wild bug to me;
> one of the kind that make you ask "how do they do it?"
>
Unfortunately, I don't have the original script or file I used to repro
Ryan's problem. I changed both with the intention of including simplified
versions with a bug report but I can no longer reproduce the error! I'm
fairly certain this wasn't a procedural error on my part because I copied
the script into a SQL 2005 window and it executed successfully.
I suspect the problem may be data related for some subtle difference I'm now
missing. The SQL script was similar to:
USE tempdb
GO
DROP TABLE x
CREATE TABLE x(x varchar(255) NOT NULL PRIMARY KEY)
GO
BULK INSERT x FROM 'C:\x.txt'
GO
BEGIN TRAN
--TRUNCATE TABLE x
DELETE x
BULK INSERT x FROM 'C:\x.txt'
COMMIT
GO
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns9781F1C942C1DYazorman@127.0.0.1...
> Dan Guzman (guzmanda@nospam-online.sbcglobal.net) writes:
>>> BEGIN TRANSACTION
>>> DELETE * FROM Whatever
>>> BULK INSERT INTO Whatever...(etc)
>>> COMMIT TRANSACTION
>>
>> These statements run consecutively and not in parallel. You shouldn't
>> get a PK violation unless the file contains duplicate data so it looks
>> to me like you found a bug. I can repro this under SQL 2000 but no
>> problem under SQL 2005.
>
> Would mind sharing that repro? It sounds like a pretty wild bug to me;
> one of the kind that make you ask "how do they do it?"
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|