I tried to execute a SQL file from my db server using powershell sqlcmd using one step in octopus server. I could see this error. Am i missing something here?
whereas this works in windows powershell, but via octopus step using powershell.
Any thoughts would be more helpful.
Command used at one step in octopus deploy via powershell option:
sqlcmd -S $sqlServerName -d $database -b -i “F:\CreateDB\TESTCreateDatabase\CreateDatabase.sql”
also tried this one as well
sqlcmd -s $sqlServerName -i “F:\CreateDB\TESTCreateDatabase\CreateDatabase.sql” -d $database -U “xxxxx” -P “xxxx”
Sqlcmd: Error: Error occurred while opening or operating on file F:\CreateDB\TESTCreateDatabase\CreateDatabase.sql (Reason: The system cannot find the path specified). The remote script failed with exit code 1 on db server xxx
But i could see the sql files available in the same path at my db server xxx.