|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have a client who just installed SQLEXPRESS and I was having him test by
using sqlcmd at a c:\> prompt. he got an error "No connection could be made because the target machine actively refused it" The only way I could get him connected was to supply the Server name: sqlcmd -S <MachineName>\SQLEXPRESS I am able to connect to a Developer Edition default instance on my machine with just sqlcmd and no -S switch. Any ideas about what could be the difference? Starting the SQL Browser service for him did not . Thanks in advance. -- Todd C |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Todd,
SQL Server Express by default does not install a default instance, but a named instance. That is why the <MachineName>\SQLEXPRESS. It needs to know the instance name. One shortcut is to use: SQLCMD -S .\SQLEXPRESS The . stands for the local machine name. RLF "Todd C" <ToddC@discussions.microsoft.com> wrote in message news:E91C3D02-400F-46B7-B638-9E90038987EE@microsoft.com... >I have a client who just installed SQLEXPRESS and I was having him test by > using sqlcmd at a c:\> prompt. > he got an error "No connection could be made because the target machine > actively refused it" > The only way I could get him connected was to supply the Server name: > sqlcmd -S <MachineName>\SQLEXPRESS > > I am able to connect to a Developer Edition default instance on my machine > with just sqlcmd and no -S switch. > > Any ideas about what could be the difference? Starting the SQL Browser > service for him did not . > > Thanks in advance. > -- > Todd C > |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
I think I found it: SQL Express gets installed as a named instance, even if
it is the first SQL to be installed, so to connect to it via sqlcmd you need the FULL instance name. From BOL: creating an environment variable named SQLCMDSERVER will him. -- Todd C [If this response was ful, please indicate by clicking the appropriate answer at the bottom] "Todd C" wrote: > I have a client who just installed SQLEXPRESS and I was having him test by > using sqlcmd at a c:\> prompt. > he got an error "No connection could be made because the target machine > actively refused it" > The only way I could get him connected was to supply the Server name: > sqlcmd -S <MachineName>\SQLEXPRESS > > I am able to connect to a Developer Edition default instance on my machine > with just sqlcmd and no -S switch. > > Any ideas about what could be the difference? Starting the SQL Browser > service for him did not . > > Thanks in advance. > -- > Todd C > |
|
![]() |
| Outils de la discussion | |
|
|