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 . |
 |
|
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 |
 |
|
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. |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-11-04 : 08:51:59
|
BOL:http://msdn.microsoft.com/en-us/library/aa258255(SQL.80).aspxPermissionsCREATE 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 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.1 out! |
 |
|
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? |
 |
|
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 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.1 out! |
 |
|
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. |
 |
|
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? |
 |
|
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. |
 |
|
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.aspxHere 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. |
 |
|
Mikebyrne
Starting Member
13 Posts |
Posted - 2008-11-04 : 12:14:01
|
Thanks for all you help guys! |
 |
|
|