Blog Post

You are not logged on as the database owner or system administrator.

,

I had one of my developers ask me why he keeps seeing the following warning when he tries to modify a table:

CreateTableWarning0

Well just like it says he doesn’t have dbo access so he might not be able to save his changes.

Let’s start by creating a user with the following permissions:

USE master
CREATE LOGIN DevCanCreateTables WITH PASSWORD = 'DevCanCreateTables';
USE Test
CREATE USER [DevCanCreateTables] FOR LOGIN [DevCanCreateTables]
GRANT ALTER ON SCHEMA::[dbo]  TO [DevCanCreateTables]  AS [dbo];
GRANT CREATE TABLE TO [DevCanCreateTables]  AS [dbo];

Note: In order to create a stored procedure you must have both CREATE PROCEDURE and ALTER on the schema where you are going to create the new stored procedure.

We go in to create a new table and receive the expected warning. Next we go into the new table properties and change the schema to one we don’t have alter permissions on.

CreateTableWarning1

Now when we try to save we get a new warning

CreateTableWarning2

and an error.

CreateTableWarning3

Nothing surprising here right? If you run into it just remember that it’s just a warning. There is no way to avoid it while using the GUI without getting dbo/sysadmin level permissions, and if you are seeing this warning you probably aren’t going to be getting them. Oh, and there is no such warning if you are using T-SQL to work with your tables. Just saying.

Filed under: Microsoft SQL Server, Security, SQLServerPedia Syndication Tagged: microsoft sql server, security

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating