User Defined Data Type | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

User Defined Data Type

Does anyone know how to change the owner of a User Defined Data Type? Thanks,
Ben
http://vyaskn.tripod.com/administration_faq.htm#q12
Unfortunately, there is no easy way to alter or modify a user defined data type. To modify a user defined data type, follow these steps: Alter all the tables, that are referencing this user defined data type (UDT), using ALTER TABLE…ALTER COLUMN command and change the data type of the referencing column to an equivalent (or the intended) base data type. Drop the user defined data type using sp_droptype. Recreate the user defined datatype with the required changes using sp_addtype. Again, use the ALTER TABLE…ALTER COLUMN syntax to change the column’s datatype to the user defined data type.
Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>