Asked by:

SQLCMD output line limit

Question

Is there a limit to the size of a line that sqlcmd can output? I have a stored procedure that runs fine and produces output with ragged long lines - when I run it from sqlcmd and output the file lines are truncated.

All replies

You can use -y to adjust the truncation limit for large variable length data types (default is 1MB), and -Y to adjust truncation limit for fixed length data types (default is 256). Please refer to BOL for more information:http://msdn.microsoft.com/en-us/library/ms162773.aspx