0
C:\>sqlcmd -S(local) -U(sa) -P(password) -i F:\sql.sql

HResult 0x3, Level 16, State 1 Named Pipes Provider: Could not open a connection to SQL Server [3]. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in stance-specific error has occurred while establishing a connection to SQL Server . Server is not found or not accessible. Check if instance name is correct and i f SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.

How I resolve this problem
3

1 Answer 1

1

Execute this query on this folder window->system32, because every sql command executes in this folder..

C:\Windows\system32>sqlcmd -S(local) -U(sa) -P(password) -i F:\sql.sql
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.