Skip to main content
2 of 2
added 43 characters in body
SqlWorldWide
  • 13.6k
  • 3
  • 29
  • 54

sp_add_jobstep add more than 4000 Character in @command parameter

sp_add_jobstep is well documented here. I understand parameter @command is type NVARCHAR(MAX).

I am creating a SQL Agent Job using a Stored Procedure. Passing the value for @command parameter via a variable. I am getting truncated at 4000 character.

My variable is also declared as NVARCHAR(MAX)

Any workaround to add more than 4000 characters in @command parameter?

SqlWorldWide
  • 13.6k
  • 3
  • 29
  • 54