Reputation: 11
I am trying to transfer table from one schema to another and rename objects in synapse pool dw database.
ALTER SCHEMA <new_schema> TRANSFER OBJECT::<old_schema>.<table_name>;
Msg 15151, Level 16, State 1, Line 4 Cannot find the object '<table_name>', because it does not exist or you do not have permission.
Completion time: 2020-10-13T08:06:00.9254770-04:00
I get the error above; however I have proper permissions to rename. Is there any suggestion.
rename object <schema_name>.<table_name> COLUMN <column_name> to <column1_name>
I am getting the below error:
Msg 103010, Level 16, State 1, Line 2 Parse error at line: 1, column: 66: Incorrect syntax near 'COLUMN'.
Completion time: 2020-10-13T07:32:10.5444563-04:00
MSDOCS article followed is https://learn.microsoft.com/en-us/sql/t-sql/statements/rename-transact-sql?view=aps-pdw-2016-au7
Upvotes: 1
Views: 2336
Reputation: 1
Having proper permission to rename does not guarantee permission to move the table into a different schema. This requires "alter" permission on schema <new_schema> and control permission on the table being moved (<old_schema>.<table_name>)
Upvotes: 0
Reputation: 551
Upvotes: 1