0

So.. I have an SSDT project where I test deployments against an instance of MSSQL Express 2017 that comes standard with VS 2017. Now I want to use the same instance to test my python ETL scripts and so i'm trying to set up an ODBC connection.

Unfortunately MSSQL Express is fighting back.

I get the following error when trying to connect to my local instance via ODBC from the python interpreter in VS:

Traceback (most recent call last):
File <stdin>, line 1, in <module>
pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (53); [08001] [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute (0)')

So - check the fire wall and connection settings right? Good enough, so i launch SQLServerManager14.msc and i get:

enter image description here

Not to be defeated - its powershell time:

PS C:\WINDOWS\system32> $mc = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer
PS C:\WINDOWS\system32> $mc

ConnectionSettings : Microsoft.SqlServer.Management.Smo.Wmi.WmiConnectionInfo
Services           : {}
ClientProtocols    : {np, sm, tcp}
ServerInstances    : {}
ServerAliases      : {}
Urn                : ManagedComputer[@Name='MDGJAMIE']
Name               : MDGJAMIE
Properties         : {}
UserData           :
State              : Existing

Hmm, no active instances, but that's weird because SSDT can deploy to the local instance. Also, SSMS can connect to the local instance.

Any idea how to get the standard VS version of SQL Express up to snuff?

Jamie Marshall
  • 1,885
  • 3
  • 27
  • 50
  • Is this a SQL Express Service install, or a LocalDb installation. By default VS just installs LocalDb https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-2016-express-localdb?view=sql-server-2017 – David Browne - Microsoft Jul 03 '18 at 22:26
  • Its a LocalDb - my bad for not clarifying. Was not fully aware of all that was in your link, taking it all in now. – Jamie Marshall Jul 03 '18 at 22:34

0 Answers0