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
S. S. Rawat
  • 5,943
  • 4
  • 43
  • 59

1 Answers1

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
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
S. S. Rawat
  • 5,943
  • 4
  • 43
  • 59