Generate SQL script with EM

  • Hi, when I try to generate SQL script with EM for UDF, the result file is empty. Impossible for me to script our UDF with EM.

    Any idea ?

    (SQL server 2000 sp3a and sp4)

    Thank you

    Danny (calico) 

  • In sysobjects find an ID of the record where the field 'name' is the same as the name of you UDF. Then find the record(s) in syscomments with the same ID and check what is there. Can you see the text of your UDF in the 'text' field?

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • Yes, in syscomments I can see the text of my UDF in the 'text' field.

    Danny (Calico)

     

  • Does that mean you need more help?

  • Yes 🙂

    I would like to Generate SQL Scripts of those UDF with EM and keep the result file. But the result file is empty for those UDF. I suspect something is corrupted or disable.

    Those UDF are nested UDF (bad design !)

    Last week I used the free utility "SQL Dependency Viewer" from Red-Gate and I noticed that some of those UDF are identified by the tool as Stored-Proc instead of UDF. Hum ... very strange   

    Any idea ?

    danny (Calico) 

     

  • Ok, i found why I was not able to Generate SQL Script with EM for my UDF.

    On SCRIPT FORMATTING OPTION I was selecting "Only script 7.0 compatible features". If I dont click on this option, I can now Generate SQL Script with EM for my UDF.

    Thank you for your support

    Danny (Calico)

     

  • Ya... udf were introduced with sql 2k :-).

    Glad you found the solution.

Viewing 7 posts - 1 through 6 (of 6 total)

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