|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 3:53 AM
Points: 117,
Visits: 421
|
|
Hi all,
I cant connect to a sql express instance via sqlcmd and was hoping for some ideas!
Command line:
sqlcmd -S ./Offline -U sa -P 123abc456
So far:
SQL Browser is enabled TCP/IP is enabled Remote connections is enabled firewall is turned off.
I can connect from the SQLCMD from the server with SQL Express on to another instance.
I can connect from SSMS on a client machine to the SQL Express instance
Im getting the following error:
Error: Microsoft SQL Server Native Client 11.0 : Named pipes Provider: Could not open a connection to SQL Server Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired. Error: Microsoft SQL Server Native Client 11.0 : a network-related or instance-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 if SQL server is configured to allow remote connections. For more information see BOL.
Hope someone can help!
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 1:24 AM
Points: 151,
Visits: 1,038
|
|
Try sqlcmd -S .\Offline -U sa -P 123abc456 in windows environment, mostly you use backslash \ not slash /
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 3:53 AM
Points: 117,
Visits: 421
|
|
Well you are a genius...
very simple.. and rather annoying on my part....
thank you!
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, February 11, 2013 1:53 AM
Points: 2,
Visits: 6
|
|
I am having the same problem. I've installed SQL Server 2012 on a Windows 8 machine. SQL Browser is enabled. Remote connections are enabled. Firewall has rules for SQL Server ports etc.
My SQL Server is called DELL-D830\SQLEXPRESS My Server is on 192.168.200.149.
If I do sqlcmd on the machine local to the SQL Server, no problem, everything works fine.
If I do sqlcmd from a remote machine using command
sqlcmd -S DELL-D830\SQLEXPRESS -U andy -P andy
or
sqlcmd -S 192.168.200.149\SQLEXPRESS -U andy -P andy
Have also tried
sqlcmd -H 192.168.200.149 -S .\SQLEXPRESS -U andy -P andy
With all commands I try I get the same error messages as reported at the start of this thread.
Any ideas what I've missed or are there any known problems with MSSS on Windows 8?
cheers
Andy
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 6:18 AM
Points: 242,
Visits: 882
|
|
@andy.gardner
When you say "remote connections are enabled" are you referring to the TCP/IP protocol in Configuration Manager? If not, check it - it is disabled by default for SQL Express.
Have you also checked that you can ping and telnet from the remote machine?
P.S. Just noticed you have added your question to an old thread - For future reference you will often get a quicker response if you start a new one.
 FREE DOWNLOAD www.sqlcopilot.com
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, February 11, 2013 1:53 AM
Points: 2,
Visits: 6
|
|
| Thanks Richard. Yes I have enabled TCP/IP for remote connections. And I can ping the hosting machine from the remote machine.
|
|
|
|