Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mahajanakhil1985
Yak Posting Veteran
71 Posts |
Posted - 2010-02-05 : 07:16:28
|
I am receiving the following error while starting SQLCMD.C:\>sqlcmdHResult 0x2, Level 16, State 1Named Pipes Provider: Could not open a connection to SQL Server [2].Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.Following this, I navigated to SQL Server 2005 Surface Area Configuration-> Surface Area Configuration for Services and Connections->Database Engine->Remote Connections. Then I clicked on Local and Remote Connections and then Using both TCP/IP and named pipes. Then apply and restarted the SQL SERVER Service.Then again same error when tried to create SQLCMD session. Am I missing to do some other configuration? |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-02-05 : 07:22:01
|
You should show the statement... No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
mahajanakhil1985
Yak Posting Veteran
71 Posts |
Posted - 2010-02-05 : 11:11:39
|
Which statement are you talking about? I have already mentioned everything.I also tried to connect to Database Engine for a server named 'INST' as follows:sqlcmd -S Inst -E |
 |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2010-02-06 : 06:43:41
|
In your first post you did C:\>sqlcmdand your second post sqlcmd -S Inst -E both of these are incorrectThe way to make the connection is sqlcmd -S MYSERVERNAME\MYINSTANCE -EOnly use -E switch if you are using Windows Authentication otherwise use the -U -P switchesfor sql server authentication Jack Vamvas--------------------http://www.ITjobfeed.com |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
mahajanakhil1985
Yak Posting Veteran
71 Posts |
Posted - 2010-02-10 : 06:43:11
|
Sorry I forgot to update. Thanks, it worked.Cheers!!! |
 |
|
|
|
|