Hi sns,
There are many possible reasons for this error:
1, The Windows Firewall is On. Turn it Off.
2, The provided farm account must have sufficient permission on the SQL server instance,
- Database Creator.
- Security Admin.
Open SQL Server Management Studio. Below “Security” > Logins and Right-click the account you are using, select Properties. From the left side, Click on “Server Roles”.
- Check the below roles
- dbcreator.
- securityadmin.
3, SQL Server Network Configuration TCP/IP is disabled.
- Go to the SQL Server VM and spin up SQL Server 2016 Configuration Manager.
- Select SQL Server Network Configuration and click Protocols for MSSQLSERVER. TCP/IP is disabled by default. Enable it.
4, Write a firewall rule that will enable incoming connections to 1433 port which is where SQL Server listens to.
- Go to Control Panel -> System and Security -> Windows Firewall. Select Advanced Settings option.
- Click ‘Inbound Rules’ and select ‘New Rule’ option.
- This will open up the inbound rule configuration wizard. Select the radio button ‘Port’ and click Next.
- Select the TCP radio button and specify the port 1433 in specific local ports text box.
- Specify the action that has to be taken as part of the rule, select ‘Allow the connection’ radio button.
- In profiles page, select the check box ‘Domain’ and click Next.
- Specify the name for the rule and click Finish.
- Make sure that you restart the SQL Server service for the changes to take effect.
For more information, please refer to:
For your second question, please give more information to make it more clearly.
Thank you for your understanding!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.