How can we help you today? How can we help you today?

Cleaning temporary database removes my permissions

I'm trying to test the Invoke-DatabaseBuild cmdlet.

I have tried using Windows auth and sql auth.  In both cases, I add my user to the db_owner role for the temporary database.

Then I run the cmdlet

The output is:
Cleaning database 'test_build' on server 'MyServer\MyInstance'.
WARNING: The error 'The server principal "MyDomain\MyUser" is not able to access the database "test_build" under the current security context.' occurred when executing the following SQL:
@ERROR <> 0 SET NOEXEC ON

When i check the temporary database, I can see my user has now been removed from the database and therefore can't proceed with the build.  How do prevent the clean database module from removing my user? 




Ryan Cooper
0

Comments

1 comment

  • way0utwest
    I don't think you can. Clean is clean, remove all objects because users are a part of what we deploy.

    way0utwest
    0

Add comment

Please sign in to leave a comment.