Stored procedure output parameter is VARCHAR(MAX) and the data is truncated to either 4000 or 8000 characters with the JDBC 5.1 SQL Server driver against SQL Server 2008 R2
If a stored procedure has a parameter output set as VARCHAR(MAX), the output of the stored procedure is truncated to either 4000 or 8000 characters against SQL Server 2008 R2 using the JDBC 5.1 SQL server driver. The amount of characters is determined by the "StringOutputParameterType" which is set to either "NVARCHAR" (4000) which is the default or "VARCHAR" (8000).