Sql-server – Create Synonym error for a user-SQL Server

permissionsschemasql serversynonyms

I have a user who has permission to create synonym in my sql server 2016 database.That user also has data reader permission.
When the user tried to create synonym as shown below.

USE [DEMODB]
GO
CREATE SYNONYM [dbo].[MYSYN] FOR [SERVER01].[DEMODB].[dbo].[CHILD]
GO

The user gets the below error message.
The specified schema name "dbo" either does not exist or you do not have permission to use it.

I checked the login/user settings.
And the login belongs to public server role and user is mapped to the database with default schema as [dbo]

And also create synonym permission is granted for that database for that user as mentioned earlier.

How can i fix this.

Best Answer

As noted in Microsoft's documentation for CREATE SCHEMA:

"To create a synonym in a given schema, a user must have CREATE SYNONYM permission and either own the schema or have ALTER SCHEMA permission."