Solving a timeout error for SQL query

后端 未结 5 2042
星月不相逢
星月不相逢 2020-12-16 20:52

I am getting this error:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

5条回答
  •  心在旅途
    2020-12-16 21:41

    This is probably a connection issue with your database, for example if you had the following connection string:

    "Data Source=MyDatabaseServer...
    

    Then you need to make sure that:

    • The machine MyDatabaseServer is connected to the network and is accessible from the machine you are running your application from (under the name "MyDatabaseServer")
    • The database server is running on MyDatabaseServer
    • The database server on MyDatabaseServer is configured to accept connections from remote machines
    • The firewall settings both on the local machine and MyDatabaseServer are correctly set up to allow SQL Server connections through
    • Your username / password etc... are correct

    You can also try connecting to the given database instance using SQL Server Management Studio from the client machine as a diagnosis step.

    There are plenty of articles that address SQL Server connectivity issues - do a Google search for the specific error message that comes up or failing that as a specific question on Server Fault

提交回复
热议问题