How to add ud Datatypes from one db to another

  • I am creating a userinterface for copying tables from a source database to another database.

    Here I need to add the user defined datatypes defined in the source database to the target database.

    One option mentioned inteh BOL is using sp_configure, any another way?

    Pay Respect to People on your way up. For you will meet the same People on your way down.


    He who knows others is learned but the wise one is one who knows himself.

  • It's scriptable from DMO. Under the table object there is a collection of userdefineddatatype objects, you can iterate through those and call the script method of each individual object.

    You can see the results by scripting it out from EM, you get something like this:

    EXEC sp_addtype N'PhoneX', N'bigint', N'not null'

    GO

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

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

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