在SQL Server代理中增加TEXT SIZE [英] Increase TEXT SIZE in SQL Server Agent

查看:158
本文介绍了在SQL Server代理中增加TEXT SIZE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL Server代理对nvarchar(max)之类的文本字段有512个字符的限制.在我在SSMS中运行存储过程后,发现存储过程可以正常工作,而在SQL Server作业中运行时,却无法运行.

SQL Server Agent has a 512 characters limit on texts fields like nvarchar(max). I found this out after seeing my stored procedure is working correctly when I run it in SSMS but not working when is being run by a SQL Server job.

要解决此问题,我知道我可以在存储过程中使用SET TEXTSIZE {number}来增加此数字.但是,我不想在SQL Server作业正在运行的每个存储过程中添加此行.有没有一种方法可以为SQL Server代理本身设置此值?

To fix this I know I can use SET TEXTSIZE { number } in my stored procedure to increase this number. However I don't want to add this line in each and every stored procedure that are being run by SQL Server jobs. Is there a way that I can set this value for SQL Server agent itself?

推荐答案

听到我的辩护MS.请注意,并允许我们增加SQL Agent字体大小.

Hear my plea MS. Be kind to our eyes and allow us to increase the SQL Agent font size.

我使用了一个名为ZoomIt的sysinternals工具.按[Control] + [1]可以拍摄屏幕快照并放大各种放大倍率.与增加Agent的工作和工作相去甚远.步骤,但在紧要关头工作.

I use a sysinternals tool called ZoomIt. Pressing [Control] + [1] takes a snapshot of the screen and zooms in to various magnifications. It's a far cry from increasing the Agent job & steps, but works in a pinch.

另一种解决方法是在查询窗口中返回作业或其步骤.

Another work around is to return the job or it's steps in a query window.

select subsystem, step_id, step_name, command from sysjobsteps where job_id in 
(select job_id from sysjobs where name like '%Some Job with tiny screen letters%')

这篇关于在SQL Server代理中增加TEXT SIZE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆