Solved

Table create permissions on SQL Server 2005

Posted on 2016-11-30
9
10 Views
Last Modified: 2016-12-01
Hi,

How would I grant create and alter table to a role in SQL Server 2005?  The development team wish to use the Entity Framework in their application and this requires that role has the create and alter table permissions. Any guidance would be appreciated.

Thanks
0
Comment
Question by:Morpheus7
  • 5
  • 4
9 Comments
 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
Comment Utility
Try..

USE YourDBName;  
GRANT CREATE TABLE TO Pawan;  
GO

USE YourDBName;  
GRANT ALTER TABLE TO Pawan;  
GO


Note - Pawan is your user name
0
 

Author Comment

by:Morpheus7
Comment Utility
Hi,

Many thanks for the response. I have given the role create table permissions, but they are still unable to create a table. I am unable to apply the alter script.

Thanks
0
 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
Comment Utility
This means you do not have access to perform  these operations.

Are you the admin on the SQL Server. Also ask the person to disconnect SSMS and connect again.
0
 

Author Comment

by:Morpheus7
Comment Utility
Hi,
I am sa on the server. I have asked the user to disconnect and reconnect but the error persists.

Thanks
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
Comment Utility
Can you please provide me the screen shot the current access setting he has ?
0
 

Author Comment

by:Morpheus7
Comment Utility
Hi,

One thing I have realises is that role that requires access does not have a schema associated with it. Should it have one?

Thanks
0
 
LVL 17

Accepted Solution

by:
Pawan Kumar Khowal earned 500 total points
Comment Utility
Try this..

GRANT ALTER ON SCHEMA::dbo TO UserName

CREATE ROLE PawanPawan
GO

GRANT CREATE TABLE TO PawanPawan
GO

GRANT ALTER ON SCHEMA::dbo TO PawanPawan
GO 

EXEC sp_addrolemember 'PawanPawan', UserName
GO

Open in new window


https://msdn.microsoft.com/en-us/library/ms187940.aspx
http://www.sqlservercentral.com/Forums/Topic1107353-359-1.aspx
0
 

Author Closing Comment

by:Morpheus7
Comment Utility
That's great, many thanks.
0
 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
Comment Utility
Welcome Morpheus !!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now