First of all, sorry for my English - not native - it may includes mistakes.
If this topic is not in the right forum, please tell me (I couldn’t find a better place?).
At work, I am using Avast Business Antivirus Pro (actual version: 19.7.2573 (build: 19.7.4674.542)).
I am also using Microsoft SQL Server Management Studio 18 (on Windows 10 64b) to connect on a local instance (let’s say PCserialnumber\instancename) It worked from May to the beginning of November - could connect to my databases etc.
Recently, I couldn’t connect to the instance, getting the error #258 (Server can’t be found or not accessible).
When I disable Avast (all shields), it works fine. When I enable back all shields, it stops working. It also works when I disable the Avast firewall only.
I have this issue also for Network Sharing Center to access my own shared files (PCserialnumber\sharedfileblabla).
I have checked a lot of topics about MSSQL before finding out it was Avast having trouble… ticking some boxes, removing others… but instead of breaking Avast, I prefer to ask you for this specific request - and it can then later help other people who could encounter this issue.
Thank you, hope you can help me asap.
Best regards.
Hello again,
Removed the local port, with same other parameters, still not working
Edit: the error is still #258 ; if I go to SQL Server Configuration Manager, and put “port 1433” for the alias of the instance, the error will be #1225 (same message I think)
The firewall is on public, but I can not switch it to private (nor the network (LAN)) – I have found somewhere the “geek:area” thing in search option, unticking “Enable automatic profile switching”, but it still doesn’t give me the right to go from public to private (if I only need to click on the button [Private Network (……… ==>) Public Network] ?).
I have connected without Avast (removed the firewall) to my SQL Instance
Went to Management > Logs > Actual logs (not the real English names but you should find them), click on “FILTER”, and searched for “listening”
Found some messages “Server is listening on [‘any’ 49883]” – My port was 49883 instead of the standard 1433! (Dynamic port)
Closed the connection
Put back the firewall on Avast for the test
Added to Avast the port 49883 as below:
Name: TCP 49883 SQL Test
Action: Allow
Protocol: TCP(6) (I also tried TCP/UDP)
Direction: In/Out
Address: none (empty)
Local port: none (empty)
Remote port: 49883
ICMP Type: none (empty)
Profile: All
And then I could connect to MSSQL ! << End of the solution >>
I figured out that I can see the dynamic port in SQL Configuration Manager ==> SQL Server Network Configuration ==> “blabla for your instance” (In french : “Protocoles pour INSTANCENAME” ==> clicked on TCP/IP (activated) ==> IP Address ==> Bottom : Dynamic TCP Ports : 49883
Every other things I have done during this post, have been “removed”, and it is still working fine for now.
Thanks for the infos Infratech Solutions !
Hope this can help other people.
Cheers
Edit: I will just do some other tests like restarting the computer, restarting the instance, etc. to check if the port change a lot or not