sql  server 2005 security

Posted on 2007-08-01
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?
Question by:yanci1179
    LVL 35

    Accepted Solution


    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'


    Author Comment

    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?
    LVL 12

    Assisted Solution

    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.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    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, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now