How to change the owner of a User-Defined Data Type?

  • Hello,

    What is the best way to change the owner of a user-defined data type?

    I know sp_changeobjectowner does not work for this type of object and I've already seen and tried the steps outlined in the following KB article but it did not work: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q327123

    I followed the article exactly as it says down to step 7. The only difference is that my base data type is varchar so I used that (instead of the datetime as used in the ALTER TABLE example outlined in step 7).

    When I try to drop the UDDT as outlined in step 8 - I get the following msg:

    "Error 15180: Cannot drop. The data type is being used"

    I re-ran the following code to make sure:

    USE database name

    SELECT TABLE_CATALOG, TABLE_NAME, COLUMN_NAME, DOMAIN_NAME

    FROM INFORMATION_SCHEMA.COLUMNS

    WHERE DOMAIN_NAME = 'data type'

    and it returns no values. It would seem that after changing these columns in step 7- I should be allowed to drop the tables. However, this is not the case.

    Has anyone had any experience with this in the past?

    I'd appreciate any feedback...

    Thanks,

    John

  • This was removed by the editor as SPAM

  • did you refresh all views that might have used the column with the datatype ?

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Nevermind...turns out there was a stored proc that used this UDDT as a parameter. I didn't notice it at first because sp_depends did not return this as a dependency....wierd

    Thanks for your help though!

    John

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

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