PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > sqlcmd and SQLEXPRESS
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
sqlcmd and SQLEXPRESS

Réponse
 
LinkBack Outils de la discussion
Vieux 17/07/2008, 20h09   #1
Todd C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut sqlcmd and SQLEXPRESS

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

  Réponse avec citation
Vieux 17/07/2008, 20h15   #2
Russell Fields
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sqlcmd and SQLEXPRESS

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
>



  Réponse avec citation
Vieux 17/07/2008, 20h32   #3
Todd C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: sqlcmd and SQLEXPRESS

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
>

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h52.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08963 seconds with 11 queries