• The replicate command truncate to 8000 characters if you are not using varchar(max) or nvarchar(max).

    If you use varchar(max) it works fine though:

    select len(replicate(convert(varchar(max),1),8005))

    Output: 8005