hi,
[quoted text, click to view] Tokatrash wrote:
>
> I use the database on a Windows 2003 SBS server.
> So i believe that the group Builtin\Administrators was allready there.
> But how do i grant a regular user or a power user the privileges to
> use the databases?
> As soon as i add a user to the Builtin\Administrators it all works
> fine, but then they have privileges to control the whole server, and
> that's not an option.
>
for each "user" you want to log on SQL Server, you have to manage his/her
WinNT login... or, with a higher granularity, you can manage the WinNT group
he/she is member of... and this is the 1st phase of security management in
SQL Server, which is managed via login's related procedures (in SQL Server
2005 a new DML syntax has provided via CREATE LOGIN ... instead of the
legacy sp_addlogin and sp_grantlogin)... the WinNT login just has been
granted login permision to the SQL Server instance...
the second authentication phase is at database level, where each login will
be granted database access mapping to a database user... registered users
can access the specified database as they will be by default member of the
"public" database role... but usually "public members" will not be
authorized al lot of permissions on database objects..
the mapping is performed in the JOIN database..sysusers.sid =
master..syslogins.sid , so the only link is the provided Login's sid, it's
Security IDentification number so, the second phase regards a database
security implementation... in order to access a specified database the
simple login existance does not provide database access, but a (database)
user must be mapped to the corresponding login.. and is about verifying that
at each object level (including database, tables, views, columns, procedures
and so on) the Login/User association is permitted access to...
so the objects access permissions comes to play... where you define them
granting users/roles SELECT/DELETE/EXECUTE (and so on) privileges at an
object level (or column level for tables and views)..
logins member of the sysadmin server role do not require all this, as
sysadministrators can perform whatever task/action on a SQL Server instance,
but "normal users" should be mapped that way... obviously you should not
resort on sysadmin membership for "traditional" database activities like
querying the database :D
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org DbaMgr2k ver 0.19.0 - DbaMgr ver 0.63.0 and further SQL Tools
--------- remove DMO to reply