Python - Can't connect to MS SQL
<p>When I try to connect to MS SQL, I got this error:</p>

<pre><code>&gt; pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC Driver 13 for SQL
&gt; Server]SQL Server Network Interfaces: Error Locating Server/Instance
&gt; Specified [xFFFFFFFF].  (-1) (SQLDriverConnect); [HYT00]
&gt; [Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired (0);
&gt; [08001] [Microsoft][ODBC Driver 13 for SQL Server]A network-related or
&gt; instance-specific error has occurred while establishing a connection
&gt; to SQL Server. Server is not found or not accessible. Check if
&gt; instance name is correct and if SQL Server is configured to allow
&gt; remote connections. For more information see SQL Server Books Online.
&gt; (-1)')
</code></pre>

<p>How can I resolve this error and finally connect to the database? </p>

<p>In my case, it was solved by activating <code>SQL Server (SQLEXPRESS)</code> in services. It turns out, it doesn't turn on automatically when the computer starts.</p>

<p><a href="http://i.stack.imgur.com/D6hsT.jpg" rel="nofollow"><img src="http://i.stack.imgur.com/D6hsT.jpg" alt="enter image description here"></a></p>

python sql-server database database-connection pyodbc