What are the challenges you face when working across database platforms? Take the survey

Permissions required for DLM Automation Testing?


I am using the "Test a database package built by DLM Automation using tSQLt tests" operation using a temporary server type of SQL Server (rather than LocalDB).

I am curious what permissions are required for the user to have to complete this task.

It works great when they are a sysadmin on the database server, but if I try to lock down their permissions to a single database on the server I get the following errors when it tries to clean the database.
Cleaning database 'DBTest' on server 'DBServer'.
##[warning]The error 'The server principal "dlm_user" is not able to access the database "DBTest" under the current security context.' occurred when executing the following SQL:
DROP USER [dlm_user]

Is it possible to restrict the permissions of this user so they aren't a sysadmin? Or is it a necessity?


  • Options
    Sergio RSergio R Posts: 610 Rose Gold 5

    Ideally the user should be a member of the dbo role.

    Thank you,
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
  • Options
    vfrank66vfrank66 Posts: 9 New member
    dbo role or db_owner? 

    I agree with Dlyes, and am having the same issue where permissions outside of sysadmin seem to fail. My error with SQL Change Automation Build - Build database project from source control throws an error "login failure" (abbreviated). I know the account can login so the error should be more helpful like cannot apply security permissions.
Sign In or Register to comment.