user defined data types within SQL Jobs?

  • When attempting to parse a job step in SQL Server Agent: Add Job Step I get an error finding a user defined data type. (Cannot Find Data Type <Type Name>)

    The same user defined type works perfectly well in a stored procedure. Is there a particular way to reference this within a job or are only system types useable?

  • Rob-350472 (10/26/2010)


    When attempting to parse a job step in SQL Server Agent: Add Job Step I get an error finding a user defined data type. (Cannot Find Data Type <Type Name>)

    The same user defined type works perfectly well in a stored procedure. Is there a particular way to reference this within a job or are only system types useable?

    i think the issue is that the stored procedure (and the user defined datatype) exist in a database other than MSDB, where the job exists.

    so if the job is trying to use that datatype, it throws an error since it doesn't exist in MSDB.

    we'd have to see the code to be sure, but that's probably where your issue lies.you might need to create the datatype in MSDB as well, or change the code a bit for whatever it is testing.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks Lowell, I was asking this on behalf of a colleague so I shall pass this on to him 🙂

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply