...bringing you notes from the field...

Tag Cloud


How do I change the owner of my table in SQL Server?

Go to the ms sql server database instance that has the table object and open a new query window. Execute the system stored proc called sp_changeobjectowner. The 2 parameters it needs to run are: (1) the current owner+object name and (2) the target owner. Take a look at the example below:

exec sp_changeobjectowner 'METRO\paula.EmployeeContact', 'dbo'

When the stored proc is completed, refresh the instance. The table will then be owned by dbo. In this example, the table would display as dbo.EmployeeContact


  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback

# re: How do I change the owner of my table in SQL Server?

thanks for the info..really useful 8/4/2009 7:35 AM | sudha

# re: How do I change the owner of my table in SQL Server?

works great! 7/16/2010 5:26 PM | Johny

# re: How do I change the owner of my table in SQL Server?

Thanks dude works a charm!

You just have to disregard the warning message. 8/25/2010 10:13 AM | Ryan