?
Solved

sql  server 2005 security

Posted on 2007-08-01
3
Medium Priority
?
188 Views
Last Modified: 2007-08-02
Using SQL 2005 is there a way to give access to create databases and users (read/write data on the databases they create) but not allow to delete the databases or the users or not having access to backup databases or having access to any other databases? or not allowing traces etc.  I was not sure how to do this so I gave the user sa privalages.  i need to change the rights, any idea?
0
Comment
Question by:yanci1179
3 Comments
 
LVL 35

Accepted Solution

by:
David Todd earned 1200 total points
ID: 19614301
Hi,

I just found that a user who had db_owner role on a couple of databases couldn't start a trace. I needed to grant alter trace to this user.

That is, a good compromise of what you asked for can be achieved by giving the users db_owner, and nothing else. They wont be able to create a database though ...

execute sp_addrolemember
      @rolename =  'db_owner'
      , @membername = 'loginname'
go

HTH
  David
0
 

Author Comment

by:yanci1179
ID: 19614568
will securityadmin give rights to create accounts as well as GRANT, DENY, and REVOKE; I was going to give this one and dbcreator role; any idea?
0
 
LVL 12

Assisted Solution

by:patrikt
patrikt earned 800 total points
ID: 19614861
Right to create database is server right and can be granted to Login.
Open Security/Logins and find your user in question. In its proprties go to Securables and Add server object in Securables list. In Permissions list you can find "Create any database" right as long as other serverwide rights.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question