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

Leave a comment

February 22, 2016 by Kenneth Fisher

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,753 other subscribers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: