SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Create table permission denied


Create table permission denied

Author
Message
cute_lhen05
cute_lhen05
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 117
Good day everyone,

Iam trying to create roles in the database; what permission should i give in order for the user to allow to create tables in the database without necesarily adding them in as dbo?

thanks
GilaMonster
GilaMonster
SSC Guru
SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)

Group: General Forum Members
Points: 234073 Visits: 46366
Make the person a member of ddl_admin, or grant them CREATE TABLE rights in the database and ALTER rights on the schema.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


cute_lhen05
cute_lhen05
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 117
Thanks for your help! it worked! however there's a message showing everytime the user creates a table like

"you are not logged on as the databae owner or system administrator. You might not able to save the changes to tables that you dont own"

After i click ok, i can still enter the fields/columns for the table then everytime i click on the save icon another warning message appears like

"warnings were encountered during the pre-save validation process and might result in a failure during save. Do you want to continue attempting save?

After i clicked "yes"; the table did saved, however will there be any errors in the tables due to the warning statements i received earlier? why are these statement showing?

Thanks,
Aileen
GilaMonster
GilaMonster
SSC Guru
SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)

Group: General Forum Members
Points: 234073 Visits: 46366
cute_lhen05 (11/26/2009)
Thanks for your help! it worked! however there's a message showing everytime the user creates a table like

"you are not logged on as the databae owner or system administrator. You might not able to save the changes to tables that you dont own"


Simple fix for that. Don't use the GUI table designer.

Isn't there an option to see the warnings generated?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


RunnerIE
RunnerIE
SSC-Enthusiastic
SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)

Group: General Forum Members
Points: 141 Visits: 3192
This might be releated to the same original problem...

I have a stored procedure that runs fine under my (dbo) account, but gives errors from basic users where I have a developmental db that I am now trying to secure properly for wider useage.... if I move the temp table to tempdb do I avoid the error messages and the need to add the user rights as you have outlined in the earlier posts?

Thanks, Brian.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)

Group: General Forum Members
Points: 234073 Visits: 46366
Depends. Permanent table in TempDB or #table?

Do note that creating permanent tables in TempDB is a bad idea and has a number of logistical problems since TempDB is recreated from scratch when SQL starts

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


RunnerIE
RunnerIE
SSC-Enthusiastic
SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)

Group: General Forum Members
Points: 141 Visits: 3192
Are the only logistial issues that I might try to drop a table that doesn't exist after SQL is (re-)started... ?

Is a good workaround to use the IF OBJECT_ID(....) IS NOT NULL to avoid problems with the table disappearing on me? ie..

IF OBJECT_ID(N'tempdb..#temptable', N'U') IS NOT NULL
DROP TABLE #temptable;
GO

I am aware of the #tmptable (i.e. local) vs. ##tmptable (i.e. global table) naming issue but thanks for picking that up just in case.

Thanks again,
Brian.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)

Group: General Forum Members
Points: 234073 Visits: 46366
bbryce (1/12/2010)
Are the only logistial issues that I might try to drop a table that doesn't exist after SQL is (re-)started... ?


No the issue is, if it's a permanent table (not a # table), you might try using it after SQL restarts and it won't be there, neither will the permissions to create and drop.

So, are you thinking about a temp table (CREATE TABLE #temp or CREATE TABLE ##temp) or a permanent table in TempDB (Create Table TempDB.dbo.MyTable)?

If you're thinking about a #table, then there are no concerns.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


RunnerIE
RunnerIE
SSC-Enthusiastic
SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)SSC-Enthusiastic (141 reputation)

Group: General Forum Members
Points: 141 Visits: 3192
It is a temp table I going with so will use #tmptablename (or ##tmptablename) so I'm 'good-to-go'. Thanks for the help on this one, its truely appreciated.

Now - can you just do something about the icy cold weather we are getting in Ireland? Just kidding. I saw on one of your other posts that you are in South Africa... which I'll bet isn't having the same problems right now :-)

Cheers,
Brian.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)

Group: General Forum Members
Points: 234073 Visits: 46366
bbryce (1/13/2010)
Now - can you just do something about the icy cold weather we are getting in Ireland?


Afraid not. I'm still trying to get the weather to confirm to my will. It's proving strangely challenging. :-D Hehe

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search