I\'m trying to change the owner of a table:
sp_changeobjectowner \'OWNER.TABLENAME\', \'dbo\'
But when executing I get the error message:
If dropping the table is an option, you can drop and recreate under the desired user. Just specify dbo in the create script. For example:
USE [X]
GO
/****** Object: Table [dbo].[TableName] Script Date: 4/21/2014 1:26:37 PM ******/
CREATE TABLE [dbo].[TableName](
[Field1] [bigint] NOT NULL,
[Field2] [nvarchar](50) NOT NULL,
[Field3] [datetime] NOT NULL
) ON [PRIMARY]
GO