How to revoke access to a schema for a specific user ?

Thorsten Hock 0 Reputation points
2025-04-30T11:12:49.1666667+00:00

I did create new schemas and they are all visible when I connect as admin to the Azure SQL database.

I use this query to revoke permissions for the user 'userReport':

-- Revoke any existing permissions on the tables
REVOKE SELECT, INSERT, UPDATE, DELTE ON SCHEMA::bronze TO [userReport];

I am getting this as a result and I don't know why, as I am admin and I can see the schemas:

Msg 15151, Level 16, State 1, Line 27
Cannot find the schema 'bronze', because it does not exist or you do not have permission.
Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Nandan Hegde 35,026 Reputation points MVP
    2025-04-30T11:49:32.1633333+00:00

    First of all the syntax seems to be wrong . The DELET keyword is not correct, make it as DELETE.

    And as a step to debug, can you login via the admin account and execute Select * from sys.schemas and check whether that schema is visible in output

    0 comments No comments

  2. Thorsten Hock 0 Reputation points
    2025-04-30T14:01:36.1466667+00:00

    Problem solved.

    The SSMS lost connection to the SQL server. After reconnecting the old query window did work, but delivered these strange error messages.

    A complete restart of the SSMS and a new query window did it ... now I'm able to query the schemas and to alter permissions for the user.

    Thanks for your support !


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.