I am trying to alter my table schema from MySchema.TableName
to dbo.TableName
using the following command -
ALTER SCHEMA MySchema TRANSFER dbo.TableName
I get the following error -
Msg 15151, Level 16, State 1, Line 1
Cannot find the object 'TableName', because it does not exist or you do not have permission.
By searching I also added the following commands to no avail.
ALTER AUTHORIZATION ON SCHEMA::MySchema to dbo;
ALTER AUTHORIZATION ON OBJECT::MySchema.TableName TO SCHEMA OWNER;
ALTER SCHEMA MySchema TRANSFER dbo.TableName
I keep getting the same error.
My table name is correct and so is the database where I am running. Any help?