SQL Server Management Studio:增加结果集中显示的字符数
我有以下场景:我们有存储过程,可以将我们的开发数据库与客户数据库进行比较,并告诉我们差异是什么(因此,我们必须在客户计算机上更新什么)。
现在,我编写了一些额外的代码来自动生成所需的 CREATE/ALTER/DROP 语句,使客户数据库达到与我们的开发数据库相同的状态。
我的代码工作正常,但 SQL Server Management Studio 存在问题:在使用文本输出时,我无法告诉它在结果集中每列显示超过 8192 个字符。有没有办法增加这个数字?
感谢您的帮助!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可以通过转到“工具/选项”菜单并打开树控件上的“查询结果”分支来更改大小。然后,在“结果到文本”叶下是“一列中的最大字符数”值。但我认为最大是8192。
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.
管理工作室无法做到这一点。有一个配置选项,但这是最高限制:(
其他人问了这个问题< /a> 之前。
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.
如果您确实想继续使用 SSMS,请将输出分解为多个列。
If you really want to stay with SSMS, breakup your output to more than one column.
不要认为这可以做到。
为了查看您的存储过程,我将使用另一个没有该限制的工具。
Dont think it can be done.
For viewing your stored procedure, I would use another tool which doesn't have that limitation.
在 Visual Studio 2010 数据库项目中,您可以添加“架构比较”文件。您只需指向“源”数据库和“目标”数据库,系统就会自动查找任何差异,并且还可以生成必要的 sql 代码来更新目标数据库。
可能还有一些免费软件数据库比较工具可以做同样的事情......
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 ...
由于字符限制,我在 SSMS 中查看转换为
nvarchar(max)
到XML
列时遇到问题。但是,在 Azure Data 中运行完全相同的查询工作室可以工作。I was having trouble viewing converted
nvarchar(max)
toXML
columns in SSMS because of the character limitation. However, running the exact same query in Azure Data Studio works.