Management Studio Truncates Coloumns That Are Larger Then 8192 Bytes

This is a problem which has no solution with SSMS. You can run your script with sqlcmd, it does not truncate result set columns when set correct parameter.  
With the script below you can save the result set without truncation to a file.

sqlcmd -d "MyServer" -d "MyDatabase" -o "c:\resultset.txt" -i "c:\Query.sql" -y o

The key parameter is "-y" parameter. The default value is 250 bytes, 0 means no limit.

No comments:

Post a Comment