Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Minimum right to create a table

Author  Topic 

Mikebyrne
Starting Member

13 Posts

Posted - 2008-11-03 : 10:34:55
I'm just wondering what are the minimum privileges a user needs to create a table?

I've selected Alter Any Schema, Create table, Create Schema and this creates the table but have I selected too many privileges??

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-03 : 12:33:56
quote:
Originally posted by Mikebyrne

I'm just wondering what are the minimum privileges a user needs to create a table?

I've selected Alter Any Schema, Create table, Create Schema and this creates the table but have I selected too many privileges??



You can find all theses information in Books online regarding permission .
Go to Top of Page

Mikebyrne
Starting Member

13 Posts

Posted - 2008-11-03 : 14:14:28
I have been looking online and I've also bought SL Server 2005 for Dummies!

I'm just looking for a definitive answer on the minimum rights to create a table
Go to Top of Page

brianjensen
Starting Member

22 Posts

Posted - 2008-11-04 : 08:21:37
"Books online" is not online. It's the documentation you can choose to install with SQL server.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-11-04 : 08:51:59
BOL:
http://msdn.microsoft.com/en-us/library/aa258255(SQL.80).aspx

Permissions
CREATE TABLE permission defaults to the members of the db_owner and
db_ddladmin fixed database roles. Members of the db_owner fixed
database role and members of the sysadmin fixed server role can
transfer CREATE TABLE permission to other users.




_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

Mikebyrne
Starting Member

13 Posts

Posted - 2008-11-04 : 09:19:41
So the Alter Schema and Create Schema privileges are not needed?

Would they only be needed to allow the user to create a database?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-11-04 : 09:29:00
no they're not.

for user to be able to create databases bol says:
Requires CREATE DATABASE, CREATE ANY DATABASE, or ALTER ANY DATABASE permission.

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-04 : 09:40:14
quote:
Originally posted by Mikebyrne

So the Alter Schema and Create Schema privileges are not needed?

Would they only be needed to allow the user to create a database?



They need Create table and ALter schema permission as minimum requirement.
Go to Top of Page

Mikebyrne
Starting Member

13 Posts

Posted - 2008-11-04 : 11:43:17
[/quote]

They need Create table and ALter schema permission as minimum requirement.
[/quote]

Just to clarify, they need a minimum of Create table and Alter schema to create a table?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-04 : 11:46:28
Yes sir. Did you ever search in booksonline for create table statement? You will get info about it.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-04 : 12:03:24
Go through this:
http://msdn.microsoft.com/en-us/library/ms174979.aspx

Here is what it says:

Requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created.

If any columns in the CREATE TABLE statement are defined to be of a CLR user-defined type, either ownership of the type or REFERENCES permission on it is required.

If any columns in the CREATE TABLE statement have an XML schema collection associated with them, either ownership of the XML schema collection or REFERENCES permission on it is required.

Go to Top of Page

Mikebyrne
Starting Member

13 Posts

Posted - 2008-11-04 : 12:14:01
Thanks for all you help guys!
Go to Top of Page
   

- Advertisement -