BUG: Default of @@DBTS Causes Access Violation When Using BCPID: Q136371
|
When you use use @@DBTS as a default bound to a column that is defined as
varbinary (8), the server receives an access violation:
Msg 0, level 19, state 0: Server <server name>, line 1: language_exec:
process 9 generated access violation; SQL Server is terminating this
process Operating-system error: ConnectionWrite(WriteFile()).
DB-LIBRARY error: possible network error: error in sending
out-of-band data to SQL server Connection broken" when attempting to
BCP data in.
UPDATE mytable
SET field1 = field1
WHERE timestamp = NULL
CREATE TABLE mytable
(idcol INT IDENTITY (1,1), name VARCHAR (10))
Microsoft has confirmed this to be a problem in SQL Server versions 4.21a and 6.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
The following script causes a handled access violation in SQL Server
version 6.0:
create table testbcp (dt binary (8), str1 char (10), str2 char (10))
go
create default dtdef as @@DBTS
go
sp_bindefault dtdef, "testbcp.dt"
go
use master
go
sp_dboption pubs, "select into/bulkcopy", true
go
use pubs
go
checkpoint
row1col2,row1col3
row2col2,row2col3
6.0
3
1 SQLCHAR 0 0 "" 1 dummy
2 SQLCHAR 0 10 "," 2 str1
3 SQLCHAR 0 10 "\r\n" 3 str2
bcp pubs..testbcp in c:\data.dat /f c:\format.fmt /Usa /P
Additional query words: SQL6 av
Keywords : kbprg SSrvProg kbbug4.21a kbbug6.00
Version : 4.21a 6.0
Platform : WINDOWS
Issue type :
Last Reviewed: April 19, 1999