Author |
Topic |
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2006-08-18 : 09:46:56
|
Hi there we have Domain\Users loginsand SQL LoginsIn security logins i have windows login domain\JACKand sql logins JACKIf i select domain\JACK and select databases and tick one of them it comes back asalready exits in the current databaseIf i go to JACK It says not found in the users collection.What the best way for me to grant access to the Domain\Jack Should i leave all databases unchecked and then on JACK just select these.We use sql logins for one of our applications as it does not work with Windows NT Domain logins.Thanks |
|
dewacorp.alliances
452 Posts |
Posted - 2006-08-18 : 15:34:43
|
HiCheck in your database user instead. See if there is domain\JACK in that list. You may need to delete from that or changing the SID instead.Hope this help.quote: Originally posted by TRACEYSQL Hi there we have Domain\Users loginsand SQL LoginsIn security logins i have windows login domain\JACKand sql logins JACKIf i select domain\JACK and select databases and tick one of them it comes back asalready exits in the current databaseIf i go to JACK It says not found in the users collection.What the best way for me to grant access to the Domain\Jack Should i leave all databases unchecked and then on JACK just select these.We use sql logins for one of our applications as it does not work with Windows NT Domain logins.Thanks
|
 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2006-08-19 : 08:23:47
|
Thanks for replying...So on the DOMAIN\JACK if databases selected remove these...andthen on sql login JACK select databases.Then When developer JACK uses DOMAIN\JACK he be able to see and do what he likes with the databases ...It that correct. |
 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-08-19 : 11:50:55
|
first verify if domain/jack is aliased as jack in the databaseif yes, you may only want to limit the alias/name jack to the sql login jackwhen you grantdbaccess to domain/jack, specify as domain/jack also to avoid the confusion, by default when you use enterprise manager to grant database access to a domain user, it strips off the domain nameHTH--------------------keeping it simple... |
 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2006-08-19 : 12:02:25
|
Ok i haveDOMAIN\JACK no databases selected.SQL LOGIN JACK DATABASEA selected.I login into sql query and i cannot access DATABASEAI then select SQL LOGIN and select DATABASEA and still cannot access as im in as DOMAIN\JACK.How do i do the aliais bit.first verify if domain/jack is aliased as jack in the databaseif yes, you may only want to limit the alias/name jack to the sql login jackwhen you grantdbaccess to domain/jack, specify as domain/jack also to avoid the confusion, by default when you use enterprise manager to grant database access to a domain user, it strips off the domain nameThanks.. |
 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-08-19 : 12:05:26
|
go to query analyzeruse databasenamegoexec sp_grantdbaccess 'domain/jack','domain/jack'exec sp_grantdbaccess 'jack','jack'go--------------------keeping it simple... |
 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2006-08-19 : 12:22:59
|
i keep seeing thishttp://www.data-based-systems.com/Articles/Microsoft%20Security.htmwhere is the SQL Security Manager..? Im in EM So i ran that in query....i ran the above...sp_grant commandNow in the database users i get Name DOMAIN\JACK Login DOMAIN\JACK and JACK JACKIn Security Logins both the DOMAIN\JACK is selected with database and the SQL Login selectedSo it looks like in EM you cannot do it but running the command you can.So you can have both...So that command...is like me going to EM to the database and doing add user .....(i have not got into the quick short cuts in query yet)....So to deny them i just run ...which command. sp_denyaccess ..Is that what the alias means...? i login as domain\JACK in explorer and can see DATABASE |
 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2006-08-19 : 12:25:20
|
So in EM it strips off the DOMAIN when trying to add the DOMAIN\JACK ...so thats why you get theUser already exists if try to do it in EM..But doing it at the database user ...it works.........Thats great.....I did not know that... |
 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2006-08-19 : 12:49:47
|
If you get a chance ....if you can explain the linefirst verify if domain/jack is aliased as jack in the databaseFor me that would be appreciated. |
 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-08-19 : 13:38:36
|
you can also do the grantdbaccess in EM, but don't do it directly on the security>logins, goto the db>users and add the account there, you will have a textbox for including the domain namefor alias...1. using em, goto databasename>usersrun this in QAuse databasenamegoselect user_name() as 'db user name',system_user as 'login' -- the db user name represents the alias, loginame is the actual account nameyou can use a different name for your user inside the database to define the login, or you can create a role for itI find it quite useful especially in identifying what the login's 'business' in the database (if existing in other databases as well)--------------------keeping it simple... |
 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2006-08-19 : 18:21:26
|
Thanks i appreciate your help today |
 |
|
|