February 13, 2012 at 7:58 am
Hi, We have a linkedserver defined between two SQL 2008 R2 SP1 instances.
Same table with some varchar(max) columns are defined on both. (In fact one instance is the other's archive db).
Today we realized that archived data was truncated to 32 characters. w/o truncation error.
Archiving script is like:
Insert Into [S170SQLARSIV].[OnlineTahsilatlar_Arsiv].[dbo].[VEVERITRANSFER]
SELECT *
FROM [VEVERITRANSFER]
WHERE logid IN (Select sayi From #ToTransfer)
I tried to insert a string manually (30 chars):
INSERT [S170SQLARSIV].[OnlineTahsilatlar_Arsiv].dbo.[VEVERITRANSFER]
([requestmessage],[responsemessage],messagedate)
VALUES('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',GETDATE())
([requestmessage],[responsemessage] are varchar(max))
Results in 24 char at the destination, if I try to insert 1000+ chars using REPLICATE('a',2000), first 32 characters are inserted in the destination.
If I run the insert on destination instance itself, it is correct. If I create a new database on the destination again the results are correct. (No truncation). We see from the archive table that sometimes 32 characters, sometimes 64 characters and sometimes real value (1500 char) is inserted. (All have to be 1500 chars.) . varchar(8000), text are working correct at destination.
What can be cause of this, truncation w/o warning is no good, am I missing something?...Thanks..
February 14, 2012 at 3:36 am
Replies here please:
http://www.sqlservercentral.com/Forums/Topic1251727-391-1.aspx
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply