Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Dear alli want to limit user to database , i have many database & many user, i have Domain , Active Directory(AD) , windows 2003 Enterprise R2,SQL server 2005 Enterprisei want to use AD user with SQL,for example :user: "bps@shaar.local"when add user "bps" assign(user mapping) some Database to this user & server roles have public & sysadmin check box & in status= permission to connect to database engine: is Grant / login: is Enabledplease find picture of error in top of txtplease help me how can i use domain user with domain password with ADi want login to SQL with AD user & AD password
Sachin.Nand
2937 Posts
Posted - 2011-11-06 : 08:16:29
The image is not visible to me.To create a login from your AD run this
Create Login YourADUSER from Windows
And then select the database where you want to add a user mapped to that login
Create a user UserName from Login YourADUSER
Then use sp_addrolemember to add the user to a specific role
sp_addrolemember 'db_ddladmin','UserName '
PBUH
jeffw8713
Aged Yak Warrior
819 Posts
Posted - 2011-11-06 : 10:18:01
Also, it looks like you are trying to use a local windows account (local to that system). You don't want to do that, you want to use the domain login.CREATE LOGIN [shaar\bps] FROM WINDOWS;GOUSE {database} -- change this to the right databaseGOCREATE USER [shaar\bps] FROM LOGIN [shaar\bps];GOThen, add the user to the appropriate roles.Jeff
Sachin.Nand
2937 Posts
Posted - 2011-11-06 : 10:27:03
@jeffI am trying to understand how your answer is different then mine..PBUH
behnam
Starting Member
2 Posts
Posted - 2011-11-06 : 13:30:05
thansk for allsome of my user use remotly frome out site & some another user use in local domaini w to login with e Sql Server Authentication login method
Sachin.Nand
2937 Posts
Posted - 2011-11-06 : 13:33:35
So whats the issue ?Just create a login with sql authentication.Creat login yourusername with password=yourpasswordPBUH