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


SQL Default Schema for Users in the Local SQL Groups


SQL Default Schema for Users in the Local SQL Groups

Author
Message
Pete-L
Pete-L
SSC Veteran
SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)SSC Veteran (260 reputation)

Group: General Forum Members
Points: 260 Visits: 400
Hello,

I've just seen some strange behaviour and was hoping someone here could help explain why.

I have a DB1 and SCHEMA1, in DB1 is TBL1

I create a user DOMAIN\User1 and DOMAIN\User2 set their default DB to DB1 an SCHEMA1 (select, update, delete, insert)

When DOMAIN\User1 runs

SELECT * FROM TBL1



It returns SQL error 208 Invalid object name

When DOMAIN\User2 runs

SELECT * FROM TBL1



It executes correctly, I therefore compared the SQL permissions and found that they are idential.

To resolve the problem I had to remove DOMAIN\User1 from the local SQL groups (SQLServerMSSQLUser$SERVER$MSSQLSERVER and SQLServerSQLAgentUser$SERVER$MSSQLSERVER). Once I had done this and restarted SQL the problem went away.

Does anyone know if a user is a member of these groups does it default the schema to dbo the same way with the sysadmin role?

Thanks,
Peter
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