Solved

Table create permissions on SQL Server 2005

Posted on 2016-11-30
9
43 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 28

Expert Comment

by:Pawan Kumar
ID: 41907048
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
ID: 41907142
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 28

Expert Comment

by:Pawan Kumar
ID: 41907193
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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

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

Thanks
0
 
LVL 28

Expert Comment

by:Pawan Kumar
ID: 41908323
Can you please provide me the screen shot the current access setting he has ?
0
 

Author Comment

by:Morpheus7
ID: 41908355
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 28

Accepted Solution

by:
Pawan Kumar earned 500 total points
ID: 41908361
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
ID: 41908768
That's great, many thanks.
0
 
LVL 28

Expert Comment

by:Pawan Kumar
ID: 41909648
Welcome Morpheus !!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SHOWPLAN permission denied in database 'AdventureWorks'. 13 111
Sql Permission 6 67
SQL Encryption question 2 62
Help Required 2 39
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

820 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