Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Location
    Allentown pa
    Posts
    41

    Unanswered: Change owner user defined datatype

    Hello, We had a developer that created some user defined data types. He is no longer with our company and we want to change owner of those user defined data types so we will be able to delete his UUID. Is their a way to change the owner of the user defined data types from his ID to dbo. I don't see a way to change them with sp_changeobjectowner



    Thanks in advance
    Jef Wain
    Jeff Wain

  2. #2
    Join Date
    Jun 2003
    Posts
    269

    Thumbs up

    Here is the example, this code will change user defined datatype's owner from 'test' to 'dbo' which created by 'test' user
    Code:
    exec sp_configure 'allow updates', '1'
    
    reconfigure WITH OVERRIDE
    
    go
    
    BEGIN TRANSACTION
    
    update systypes set uid = user_id('dbo') where uid = user_id('test')
    
    COMMIT TRANSACTION
    
    exec sp_configure 'allow updates', '0'
    
    reconfigure WITH OVERRIDE
    
    go
    I love cursor,though I never use it.Cos' I dont want to misuse it.
    ----------------------------------------------

    ----cheers
    ----http://mallier.blogspot.com

  3. #3
    Join Date
    Aug 2003
    Location
    Allentown pa
    Posts
    41

    Thanks

    Thank you very much
    Jeff Wain

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    sp_changeobjectowner will also do this, in a way that is supported by Microsoft.

    -PatP

Posting Permissions

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