2

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!

Maximilian Mayerl
  • 11,253
  • 2
  • 33
  • 40

5 Answers5

5

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.

JonH
  • 32,732
  • 12
  • 87
  • 145
  • 6
    Works great, though these options won't take effect untill you open a new query window... – Arjan Einbu Mar 16 '11 at 08:02
  • @JonH is right! you can configure the maximum number of characters in MSSQL Management Studio as follows: Go to "Tools" > "Options" > "Query Results" > "SQL Server" > "Results to Grid" > "Non XML data", adjust the value to the length you want. The maximum number of characters in MSSQL Management Studio 19 is 2097152. Once you have made the changes, you will need to re-create or reopen any already opened query windows for the new configuration to take effect. – Ziad Salem Jun 29 '23 at 13:21
1

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.

Community
  • 1
  • 1
Oded
  • 489,969
  • 99
  • 883
  • 1,009
1

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

JeffO
  • 7,957
  • 3
  • 44
  • 53
0

Dont think it can be done.

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

kevchadders
  • 8,335
  • 4
  • 42
  • 61
  • Yes, unfortunately you seem to be right. Accepting this answer for the suggestion about a different tool. – Maximilian Mayerl Dec 15 '09 at 16:02
  • It is possible to increase the maximum charachters up to 2097152 (I tested in MMSQL Management Studio 19) under "Tools > Options > Query Results > SQL Server > Results to Grid" – Ziad Salem Jun 29 '23 at 13:06
0

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 ...

F43G4N
  • 159
  • 1
  • 1
  • 9