0
votes
  1. Error SQL72014: .Net SqlClient Data Provider: Msg -2, Level 11, State 0, Line 0 Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

  2. Error SQL72045: Script execution error. The executed script:

This above error occurred randomly not often if try to run my script at next time it will be working fine so do you have faced or solution?

1
Are you running this script in DevOps? Please post the script.Nick.McDermaid
no running script through .net package. actually restore database to same Azure sql server so while restore the above error occurreduser12550308
If this has nothing to do with DevOps, please remove the tag. You might just have to extend your command timeout. Does it timeout at exactly the same duration every time?Nick.McDermaid
don't know it was happen randomly not every time ..so need to resolved that issue but in local sql server that script was running very well .user12550308
If my answer is helpful for you, please accept(mark) it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.). This can be beneficial to other community members. Thank you.Leon Yue

1 Answers

-1
votes

As you said, the error is happened randomly not every time, it's very hard solve it.

There are many reasons may cause the error. Such as, if you restore the database from a big DACPAC file, it may take a long time and cause the Timeout error. OR if the internet environment is not unstable, Script execution also will be stopped.

What's the important is that your database has be restored successfully, don't you?