How to Increase Maximum Characters Displayed in SSMS

In this post I’m showing you how to increase the maximum characters displayed in SQL Server Management Studio (SSMS).

By default, the max number of characters displayed in a single column of a query in SSMS when outputting as text is 256 characters. This means sometimes if we run a specific procedure or query, the output will be truncated and we won’t get the full output.

Topics covered:
Changing Query Output to Results to Text
Increasing SSMS Maximum Characters for Results To Text

Changing Query Output to Results to Text

We can amend our query outputs in SSMS to Results to Text, rather than the default grid layout. Sometimes this is useful, particularly if we want to copy the text output to somewhere else.

Changing to Results to Text can be done by clicking the top bar menu button as shown in the screenshot below:

SSMS Results to Text Option

If using text output rather than grid, you may encounter issues with truncated query outputs if a column contains more than 256 chars. The screenshot below shows an example of this, displaying 256 out of 550 characters in the column contents:

SSMS Maximum Characters Results to Text

The steps below in this post will help for fixing this issue if you encounter it, by increasing the characters allowed for output.

Increasing SSMS Maximum Characters for Results To Text

To increase your SSMS Maximum Characters for Results to Text, follow these steps.

1. Click Tools at the top menu bar and select Options.

SSMS Open Options Menu

2. Navigate to Query Results > SQL Server > Results to Text.

SSMS Results to Text Max Chars

3. Open a new query Window and re-run your query or procedure.

SSMS Results to Text Full

This should be all go for you now!

There’s one particular example that comes to mind for when I need to enable this. It’s for when I need to run sp_scriptdynamicupdproc which generates a script to run to change the way Replication works for a specific table/article. The output script for this SP always needs much more than the default character output for SSMS.


Recent Posts
Categories
Tags

Always On Availability Groups (AAG) (4) AWS (4) AWS Redshift (6) Database Admin (72) Database Backups & Recovery (14) Database Mirroring (2) Error Messages (5) Failover Cluster Instances (FCI) (1) Git Commands (6) Importing & Exporting Data (2) Linked Servers (3) Linux Administration (2) Logging & Monitoring (1) Microsoft Patching (2) MySQL (4) Postgres (6) PowerShell Scripts (2) SQL Certificates & Encryption (3) SQL Server Agent (5) SQL Server CDC (2) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (17) SQL Server Networking (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance Tuning (6) SQL Server Processes (SPIDs) (7) SQL Server Replication (2) SQL Server Scripts (13) SQL Server Security (4) SQL Server Storage (10) Windows Admin (20) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (18)