Hi, i’m having a problem ,
I am automating a database restore system and i wrote a powershell script to execute SQL command (stored proc) who’s only parameter is path to the folder where backups reside. I am running into an issue because the path is a network path (\server\folder\folder).
While the script works great in powerhsell ISE it consistently fails to execute using octopus. The only way it works is if i pass a path to a folder on a local drive. Even simple command like “ls \server\folder\folder” fails when running on tentacle.
The tentacle is running on service account with local admin rights and network share is read only open to Everybody.
I also ran the script with service account credentials on the sql server machine itself and it worked.
Suggestions?
NOTES:
Script:
EXEC dbo.spDBRestore @BKFolder = N’\server\folder\folder’
Error:
Exception calling “ExecuteScalar” with “0” argument(s): "Invalid zero-length device name. Reissue the BACKUP statement with a valid device name.