SQL Connection Error

I am currently trying to execute SQL scripts from our SQL compare automatically through the octopus deploy server with the help of powershell. I am using the Invoke SQL command to call the database server and provide the file path that is there on the build server.

However I am getting an error saying the time elapsed before the operation completed.

Hi @ashita.mandapaka,

Sorry to hear you’re having issues with your SQL scripts! The first thing I would check here is to ensure that the deployment target you are using has access to your SQL server, in most cases, the machine may not have access due to network security devices blocking access.

Since you’re doing the updates with PowerShell, I recommend logging onto the deployment target as the user that is running the tentacle service on that machine and see if you can run them outside Octopus itself. If network security does allow the connection, running this manually might give you some more context as to why it is failing.

If you would like to give this a try, and if you’re still having trouble, please let us know and we’ll help you dig in further!

Thank You for replying , it seemed that our Database was having connection issues and hence my script was timing out since it could not connect to the DB.

1 Like

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