? about users
am 07.01.2008 14:30:17 von BrianHow do I setup a user to access the my sql server database. I do not want
to give him the admin account login.
How do I setup a user to access the my sql server database. I do not want
to give him the admin account login.
Brian (brian@work) writes:
> How do I setup a user to access the my sql server database. I do not want
> to give him the admin account login.
It would certainly help to know more about your database and your server
and the context it exists in. And what you want the user to do in the
database.
But assuming that your user has a Windows login to connect with you would
do:
CREATE LOGIN [Domain\Name] FROM WINDOWS;
go
USE db;
go
CREATE USER [Domain\Name]
Then you would assign the user the permissions he need. (Which I can't
detail, because I don't know what he needs.)
If you are in a workgroup, it's probably better to use an SQL login.
And, oh, the above syntax is for SQL 2005; another thing you did not detail
was the SQL Server version.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx