0

I am having issue connecting my Laravel project to MS SQL DB.

I am getting this error:

SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: The wait operation timed out.

The MS SQL server is running: Microsoft Windows Server 2019 Standard

The laravel project is running on a Windows IIS server.

Laravel version: 8.20.1

I have followed this guide and created SQL user on the MS SQL server: https://www.microfocus.com/documentation/silk-test/200/en/silktestworkbench-help-en/SILKTEST-7FFBB86A-CREATINGNEWSQLSERVERADMINUSER-TSK.html

I have edited connection details in .env file:

DB_CONNECTION=sqlsrv
DB_HOST=SERVER CONNECTION
DB_PORT=1433
DB_DATABASE=DATABSE_NAME
DB_USERNAME=USER_NAME
DB_PASSWORD=PASSWORD

I have also enabled port 1433 in SQL SERVER NETWORK CONNECTION

Can anyone help with this ?

Zhorov
  • 28,486
  • 6
  • 27
  • 52
htobiassen
  • 61
  • 1
  • 9
  • try to debug with these steps. https://stackoverflow.com/a/50637022/9936356 – LinkedListT Jan 08 '21 at 15:57
  • The port is already set to 1433 – htobiassen Jan 10 '21 at 14:30
  • Microsoft SQL Express uses dynamic ports. Confirm that the client workstation can telnet this port by using the port number in the ODBC connection. The port used by SQL Express may be closed on the Firewall. For more information about it, you can refer to this link: https://support.na.sage.com/selfservice/viewContent.do?externalId=19752&sliceId=1 – Ding Peng Jan 11 '21 at 05:12

0 Answers0