When I try to connect to MS SQL, I got this error:
> pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC Driver 13 for SQL
> Server]SQL Server Network Interfaces: Error Locating Server/Instance
> Specified [xFFFFFFFF]. (-1) (SQLDriverConnect); [HYT00]
> [Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired (0);
> [08001] [Microsoft][ODBC Driver 13 for SQL Server]A network-related or
> instance-specific error has occurred while establishing a connection
> to SQL Server. Server is not found or not accessible. Check if
> instance name is correct and if SQL Server is configured to allow
> remote connections. For more information see SQL Server Books Online.
> (-1)')
How can I resolve this error and finally connect to the database?
解决方案
In my case, it was solved by activating SQL Server (SQLEXPRESS) in services. It turns out, it doesn't turn on automatically when the computer starts.