Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2002
    Posts
    18

    Question Unanswered: Changing ownership of User defined data types?

    We have a database that originally had all objects owned by a vendor id. We are in the process of changing the ownership to 'dbo' and wish to remove the vendor id but have found there are a few user defined datatypes that are also owned by this vendor id. How can I change the ownership of them to 'dbo'? They are currently being used in some of the tables. I tried the sp_changeobjectowner but that doesn't work for these.

    thanks for any advice!

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    right click on the UDT in SSMS and script out its definition. replace [current_owner]. with [dbo]. and apply said script to the database.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    That'd work, except the datatype is used in definition of several tables, which will prevent the script from running successfully.

    What SQL version are you running?
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    well that us why you have to do things in order. data types and then tables.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •