Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

i have a SQL Server server 2008 r2. I wish to create a two new Login for a client who wishes to have access to their one database. But I don't want to give them access to the other my databases.

thank you

share|improve this question

1 Answer 1

Method 1: T-SQL

 USE [master]
 GO
 CREATE LOGIN [test] WITH PASSWORD=N'test', DEFAULT_DATABASE=[xyz],      
 CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
 GO
 EXEC master..sp_addsrvrolemember @loginame = N'test', @rolename = N'sysadmin'
 GO
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.