Does SQL Server Management Studio have a message output limit of size?

If the output of messages with PRINT or RAISERROR has a limit on the size of the buffer for the window, and if possible, it can be changed.

I searched everywhere, but did not see a tree for trees!

Calibration: . I am interested in the amount of data that the output window can display before you start deleting previously displayed messages. Maybe he just keeps going, but there must be some limit, no?

+3
source share
3 answers

, , , . , , . SQL :

declare @count int 
set @count = 0 
while (@count < 80000) 
begin
 print cast(@count as varchar(10)) + replicate('x', 7900)
 set @count = (@count + 1) 
end

80000 ~ 7900 . ( ). , , .

, PRINT, RAISERROR , .

print replicate('x', 7997) + 'end' -- Output : ...xxxxend
print replicate('x', 7998) + 'end' -- Truncated Output : ...xxxxen

declare @err varchar(max)
set @err = replicate('x', 2044) + 'end' -- Total length 2047
raiserror(@err, 1, 0) -- Output : ...xxxxend

set @err = replicate('x', 2045) + 'end' -- Total length 2048
raiserror(@err, 1, 0) -- Output Truncated with ellipses : ...xxxx...
+4

: , , SSMS (, ) . , .

+2

, , SSMS (, ) . , /, .

, , , , , (var) char XML. (65535 2 SSMS 2008).

0

Source: https://habr.com/ru/post/1778275/


All Articles