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
 General SQL Server Forums
 New to SQL Server Programming
 create username problem

Author  Topic 

Anand.A
Posting Yak Master

109 Posts

Posted - 2011-10-13 : 02:26:29
i create user name(ie,sysadd) to access only one particular db(ie,account_db)

in that server role i choose public
and user mapping i choose that particular db(account_db)..and i revoke guest permission for all db..

but now i connect by using that new username(sysadd) means i can access that particular db(account_db)...if i choose another db means it will show "not accessible"...but i cant access that particular db(account_db) tables..

anand

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-13 : 02:32:40
whats the error when you try to access it?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Anand.A
Posting Yak Master

109 Posts

Posted - 2011-10-13 : 02:49:16
no error

if i connect by using sa in that account_db there is 50 tables..

but i used(sysadd) username to connect that in that particular db(Account_db) no table is there in that particular db(Account_db)

anand
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-13 : 02:59:46
its because you've mapped it to public. try mapping it to db_datareader role on account_db

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Anand.A
Posting Yak Master

109 Posts

Posted - 2011-10-13 : 03:19:28
The SELECT permission was denied on the object '<>', database '<>', schema '<>'.

anand
Go to Top of Page

Anand.A
Posting Yak Master

109 Posts

Posted - 2011-10-13 : 04:44:30
ya very thanks i got that idea thanks

anand
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-13 : 05:43:40
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Anand.A
Posting Yak Master

109 Posts

Posted - 2011-10-13 : 05:57:52
please try to solve this problem

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=166630

anand
Go to Top of Page
   

- Advertisement -