SQL and Windows access rights

  • Hi guys

    Does anyone know the access rights given to a user in order to be able to create tables or access rights to be able to create databases. Also does anyone know the level of access required by a user to be able to run DOS batch jobs? Thanks

     

    M

  • Your question is a bit open but in a nutshell (and if I'm reading you correctly)

    Create table - db_ddladmin

    This will give a user the ability to create/alter/drop tables within a database they have access to.

    Create database - dbcreator

    This will give a user the ability to create a database on the server they have access to.

    DOS batch jobs in general or something with SQL interaction?

  • Create Table can be granted without the use of db_ddladmin. The db_ddladmin can modify any object in a database and set a different owner (to include dbo). So if you want to limit to just table creation, create a role and assign it rights to create table. Put the user in the role.

    DOS batch jobs, I assume you mean through the use of xp_cmdshell. By default only sysadmins have access. However, if you grant access to master you can then grant execute rights to it. If the user is not a member of the sysadmin role, however, you must configure the sql server agent proxy account first. That's the context xp_cmdshell would attempt to run under.

    More here: Books Online: xp_cmdshell

    K. Brian Kelley
    @kbriankelley

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply