Hi Mashkoor Ali,
This error usually means that the client can't find the SQL Server instance.
This normally happens when at least one of the following problems exist:
The name of the computer hosting the SQL Server;
Instance does not resolve the the correct IP;
The TCP port number is not specified correctly.
You can reference to troubleshoot and fix the issue: troubleshoot-connecting-to-the-sql-server-database-engine,
resolving-could-not-open-a-connection-to-sql-server-errors
Best Regards.
yuxi
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com