Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    8

    Unanswered: data truncated when stored procedure run from sql server agent

    I have a stored procedure which loops thru about 180 tables and inserts the data into one table used for reporting purposes. One field is a ntext field. If I execute the stored procedure from query analyzer the entire contents of the ntext field is available. When I run as scheduled task (every 1/2 hour) from sql server agent, the data in the ntext field is truncated.

  2. #2
    Join Date
    Apr 2008
    Location
    Warrington, UK
    Posts
    15
    I think Agent runs with different settings for use options, in particular the TEXTSIZE parameter - e.g. see here:

    http://www.developmentnow.com/g/113_...er-success.htm

    Something like "SET TEXTSIZE 64000" might fix it.

  3. #3
    Join Date
    Nov 2004
    Posts
    8

    Set Texsize solved the problem

    Thanks for the suggestion. This had been a long standing puzzle to several of us.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •