Bootstrap FreeKB - Visual Studio - Resolve "Could not open a connection to SQL Server"
Visual Studio - Resolve "Could not open a connection to SQL Server"

Updated:   |  Visual Studio articles

This error can appear in many places, such as a .PHP web browser, a Command Line Prompt, Adminer, and SQL Server Management Studio.

This error might only appear after resolving error No extension. None of the supported PHP extensions (SQLSRV, MSSQL) are available..

Steps to Resolve: In SQL Server Configuration Manager:

  1. Select SQL Server Network Configuration
  2. Select Protocols for SQLEXPRESS
  3. Right click on Named Pipes and select Enabled
  4. Right click on TCP/IP and select Enabled
  5. Select SQL Server Services
  6. Right click on SQL Server Browser and select Properties
  7. Click on the Service Tab and set Start Mode to Automatic. Apply, OK.
  8. Right click SQL Server (SQLEXPRESS) and select Restart
  9. Right click SQL Server Browser and select Start

Then, create a login, and make the login a user.

  1. CREATE LOGIN username WITH PASSWORD = 'supersecretpassword'
  2. CREATE USER [username] FOR LOGIN [username]

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter c5ed80 in the box below so that we can be sure you are a human.