Execute SQL automation - The specified path either doesn't exist or can't be accessed by the current Windows


We use Octopus for a long time. But now I have to change some permissions and the configuration of some tentacles.

But now I’ve got a problem with the “Redgate - Deploy from Package” (version 11).

On the step “Import-DatabaseBuildArtifact” I got the following error:
“The specified path either doesn’t exist or can’t be accessed by the current Windows account”

July 29th 2019 15:58:55Error Import-DatabaseBuildArtifact : The specified path either doesn’t exist or can’t be accessed by the current Windows
July 29th 2019 15:58:55Error account: ‘D:\DLM\Demo’
July 29th 2019 15:58:55Error At C:\Octopus\Work\20190729135757-74869-203\Script.ps1:269 char:26
July 29th 2019 15:58:55Error + $importedBuildArtifact = Import-DatabaseBuildArtifact -Path $packageExtractPath
July 29th 2019 15:58:55Error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
July 29th 2019 15:58:55Error + CategoryInfo : ObjectNotFound: (D:\DLM\Demo:String) [Import-DatabaseBuildArtifact], Terminat
July 29th 2019 15:58:55Error ingException
July 29th 2019 15:58:55Error + FullyQualifiedErrorId : PathNotFound,RedGate.Versioning.Automation.PowerShell.Commands.ImportDatabaseBuildArtifa
July 29th 2019 15:58:55Error ctCommand
July 29th 2019 15:58:57Fatal The remote script failed with exit code 1

I have checked the path multiple times, but the path does exist on the server with the Octopus Tentacle.
The artifact is also available on that location. So the next question is:“what is the current Windows account”. Is that the same user as the Octopus tentacle windows server is to assigned?
Can someone help me to solve this problem?

Hi @b.korporaal!

You are correct that the deployment actions are attempted as the user that the Tentacle service is configured to run as. From the looks of this error, it would seem that the configured user may not have read access to D:\DLM\Demo folder.

Please let me know how you go with your investigation, and if you have any further questions.

Hi Justin,

Thanks for your reply.

I found the problem. this is because the Octopus server itself creates the redgate database build artifact instead of the tentacles. This Octopus server is part of our domain and can access our hostingservers by VPN.
This Octopus server needs to get access to the hosting servers to do some work.

To solve the problem that the service account of Octopus server (which is a domain account) can have access to our hosting servers (which are workgroup servers) I need to setup credential vault. So the domain account is translated to the workgroup accounts which are needed to get access to the path which is provided at Import-DatabaseBuildArtifact.

Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.