简体   繁体   中英

Granting limited permissions to a user on SQL Server 2008

How can you give rights to a user on particular Databases so he can perform every action on those databases including backup and restore. But this user should not be able to access some other Databases on server. And this user should also have the rights to create new database on server, to create/alter linked server and also create/alter a job in job agent.

What permissions and server roles should I assign to acheive all above? Actually if I assign this user a server role Sysadmin then he can create/alter linked server and SQL jobs but at the same time he can access all databases on server and that I do not desire.

Any help would be appreciated!

Thanks!

It looks like you want the permissions below. You should probably review the links provided to make sure that it's what you need.

As pointed out, this is more of a DBA than a SQL question. There's also quite a lot of documentation out there on how to do this, which invites an RTFM response. Next time you have a question like this, you might want to review the docs first, make a plan, and ask whether your plan will work.

All rights on specific databases: db_owner on that database.

Create/alter linked server: CREATE LINKED SERVER on server. ALTER LINKED SERVER on server.

Create databases, but can't drop/alter ones you don't own: CREATE ANY DATABASE on server. (dbcreator lets you drop/alter others)

http://www.mssqltips.com/sqlservertip/1714/server-level-permissions-for-sql-server-2005-and-sql-server-2008/

Create/alter jobs: SQLAgentUser role on msdb.

http://msdn.microsoft.com/en-us/library/ms188283(v=sql.90).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM