![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
We have a linked server connection between two servers (MS SQL Server 2005), but we have problems transferring large text fields across this connection. That is to say, INSERT is fine, but SELECT replaces large text fields (> 64mb) with an empty string - with no warning. Do you know if this is an SQL Server or a network setting? And (more importantly) do you know how this limit can be increased? |
#3
| |||
| |||
|
|
I ran this on my servers at home: * *declare @bobben varchar(MAX) ... |
#4
| |||
| |||
|
|
On 28 Jun, 23:15, Erland Sommarskog <esq... (AT) sommarskog (DOT) se> wrote: I ran this on my servers at home: * *declare @bobben varchar(MAX) ... Thanks, but I guess I should have been more precise. In fact, I am using the data type nvarchar(max) and the value being truncated has length > 66000000 (i.e. > 128mb). I have no problem selecting 70mb from a varchar(max) column. |
#5
| |||
| |||
|
|
o * What happens if you run my stupid test query: * * declare @bobben nvarchar(MAX) * * select @bobben = res from *openquery(SERVER, 'SELECT * * * *replicate(convert(nvarchar(MAX), ''1234567890''), 7000000)as res') * * select datalength(@bobben) o *Which version of SQL Server do you use for the local server? The * *remote server? (The remote is also SQL Server, right?) |
|
Also, when you run your query, can you run Profiler on the remote query, and add the Errors and Warnings event category to the trace? |
#6
| |||
| |||
|
|
I get 0 from both my linked servers! (... but if I write 3000000 instead of 7000000, the result is 60000000.) One is a SQL Server 2008 Express Edition on a (virtual) 64 bit Windows Server 2008 located in a so-called DMZ in the same building. The other is a SQL Server 2005 Standard Edition on a (virtual) 32 bit Windows Server 2003 somewhere far away. My local server is similar (to the second one). |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
OK, I was able to reproduce it, and I also have an idea what is going on. [...] This may simply be a hard limit. On the other hand, if I run the batch from a 64-bit machine, I get back 140 millions - even if the remote server is 32-bit. |
|
I also ran the test on a virtual machine with only 516 MB of memory in total. In this case the batch produced an error. I would suggest that in the case we get back 0, this is a bug; an error message should be produced. |
|
One more thing: I didn't see this first, but there is a big fat error message in the SQL Server error log on the localserver about PAGE_FAIL_ALLOCATION. |
#9
| |||
| |||
|
|
On Jul 1, 12:11*am, Erland Sommarskog <esq... (AT) sommarskog (DOT) se> wrote: I also ran the test on a virtual machine with only 516 MB of memory in total. In this case the batch produced an error. I would suggest that in the case we get back 0, this is a bug; an error message should be produced. I agree. Will you inform Microsoft? |
|
On Jul 1, 12:15*am, Erland Sommarskog <esq... (AT) sommarskog (DOT) se> wrote: One more thing: I didn't see this first, but there is a big fat error message in the SQL Server error log on the localserver about PAGE_FAIL_ALLOCATION. Strange. I did not see any such entries in my logs (and I can not find any info on PAGE_FAIL_ALLOCATION on the web). Did this happen when you tried with 516 MB of memory? |
![]() |
| Thread Tools | |
| Display Modes | |
| |