How to get CREATE TABLE Permission for windows authentication users in SQL Server express 2005
I recently installed SQL Server 2005 Management Studio Express. When I login to the Databas开发者_StackOverflowe server machinename\SQLEXPRESS using Windows Authentication.
I am unable to create tables or create databases. How do I grant the permissions for the users logged in as Windows Authentication to be able to create tables / databases?
You can make your user part of the sysadmin role
exec sp_addsrvrolemember 'DomainOrComputerName\UserName','sysadmin'
That will solve your problem but it is overkill and grants the users complete access to your database including the ability to delete your databases and technically they can do anything on your computer they want unless you have limited your SQL Server Service accounts rights. To allow the ability to create tables use
Grant Create Table to [domainName\userName] That will give them the ability to create a table in the database where you run that statement.
精彩评论