Maximilian Mayerl
Maximilian Mayerl

Reputation: 11359

SQL Server Management Studio: Increase number of characters displayed in result set

I have the following scenario: We have stored procedures which compare our developement database to our customer databases and tell us, what the difference is (so, what we have to update on the customer machine).

Now I wrote some additional code to automatically generate the CREATE/ALTER/DROP statements needed to bring the customer database to the same status as our developement database.

My code works fine, but I have a problem with SQL Server Management Studio: I can't tell it to display more than 8192 characters per column in the result set while using text output. Is there a way to increase this number?

Thanks for your help!

Upvotes: 2

Views: 9631

Answers (6)

MorganR
MorganR

Reputation: 659

I was having trouble viewing converted nvarchar(max) to XML columns in SSMS because of the character limitation. However, running the exact same query in Azure Data Studio works.

Upvotes: 0

F43G4N
F43G4N

Reputation: 175

In Visual Studio 2010 Database projects you can add a "Schema comparisson" file. You simply point to a "source" database and "target" database and the system automatically finds any differences and can also generate the necessary sql code to update the target database.

There might also be some freeware database comparisson tools available that might be able to do the same thing ...

Upvotes: 0

JeffO
JeffO

Reputation: 8043

If you really want to stay with SSMS, breakup your output to more than one column.

Upvotes: 1

Oded
Oded

Reputation: 498934

No way to do that from management studio. There is a configuration option, but that is the top limit :(

Other have asked this question before.

Upvotes: 1

kevchadders
kevchadders

Reputation: 8335

Dont think it can be done.

For viewing your stored procedure, I would use another tool which doesn't have that limitation.

Upvotes: 0

JonH
JonH

Reputation: 33143

You can change the size by going to the Tools/Option menu and opening the Query Results branch on the tree control. Then under the Results to Text leaf is the the “Maximum number of characters in a column” value. But I think the max is 8192.

Upvotes: 6

Related Questions