Permissions required for DLM Automation Testing?

DLyesDLyes Dunedin, New ZealandPosts: 16 Bronze 1
Hello,

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?
Tagged:

Comments

  • Sergio RSergio R Posts: 600 Rose Gold 5
    Hi,

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

    Thank you,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
  • 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.