0

I'm trying to connect new host in SQL Server using IP address, but I got some trouble when I'm trying to log in SSMS 2017. I'm still relatively newbie about using SQL Server. Here's the error message:

error

when I'm trying to login:

error

And here when I check SQLCMD error

I've been trying:

1. Restart Service SQL Server

2. Enable all Protocols for MSSQLSERVER (include TCP/IP and Named Pipes)

3. Allow remote connections

4. Enable SQL Server Browser

  • 1
    Why do you want to use IP address instead of host name? Either way, if you can connect by hostname,you'll be able to connect by IP. When you use a hostname it's simply the DNS that tells your PC what the IP address is for that host. – Thom A Aug 28 '19 at 13:50
  • like i said, i'm still newbie. but I'am just copy from .env laravel. DB_HOST=10.x.x.1xx DB_PORT=1433 DB_DATABASE=db_name DB_USERNAME=username DB_PASSWORD=password. So I just want to access database from web to SSMS – Zaqi Salman Alexa Aug 28 '19 at 13:58
  • Try the answer on this [link](https://stackoverflow.com/questions/52502714/intermittent-odbc-connection-failures/52504914#52504914). I'm sure it'll sort your problem. – Attie Wagner Aug 28 '19 at 14:01
  • Still the same, I've been changed the TCP/IP properties. But thanks for the suggest – Zaqi Salman Alexa Aug 28 '19 at 14:19

1 Answers1

1

Check your SQL Server log to ensure that it's listening on the IP address(es) you expect. You should see an entry during startup like:

Server is listening on [ 'any' <ipv4> 1433].
David Browne - Microsoft
  • 80,331
  • 6
  • 39
  • 67