Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connect to Default SQL Server Instance
Message
De
18/05/2016 02:33:23
 
 
À
18/05/2016 01:06:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01636305
Message ID:
01636552
Vues:
91
This message has been marked as the solution to the initial question of the thread.
Sorry if I didn't make myself clear: your question was "'MyMachine\MSSQLSERVER' works if the SQL Browser service is running"? and I said "Yes" (with a "but").

Tested with all variants I could think of and working as expected:

MyMachine
MyMachine,1433
MyMachine\MSSQLSERVER
MyMachine\MSSQLSERVER,1433

(plus localhost and real IP).

That is, all are able to connect to the server.

>OK, if I understand what you're saying:
>
>- If you have only the default MSSQLSERVER instance installed on a host, AND
>- you DO have the SQL Browser Service installed on the same host
>
>Then, a client can connect to it using "MyMachine\MSSQLSERVER" in the connection string, instead of just "MyMachine".
>
>If that's what you're saying, thanks for testing and confirming.
>
>If you haven't tested it please let me know, and I'll make a note to myself to test next time I'm working with a default instance.
>
>>Yes, although the question is not about having named instances - as you were told, all instances are named, including the default one - but having multiple instances in the same machine, each and all of them listening to different ports.
>>
>>
>>>I was hoping someone would be able to test, to see if 'MyMachine\MSSQLSERVER' works if the SQL Browser service is running - that's what I'd like to know.
>>>
>>>>When you use 'MyMachine\MSSQLSERVER', you are trying to connect to a named instance. You have to use MyMachine onlyto connect to default instance.
>>>>
>>>>>When installing SQL Server, you have a choice to install either:
>>>>>
>>>>>- a "default" instance, which nominally is called "MSSQLSERVER"
>>>>>- or, a "named" instance which can be called anything else
>>>>>
>>>>>If you use a named instance, you have to install the SQL Server Browser service, which I gather acts as a sort of DNS so that client computers can find the named instance on the network. The SQL Browser service does not need to be installed if the only instance on a given machine is the default instance.
>>>>>
>>>>>Suppose a machine is named MyMachine:
>>>>>
>>>>>Connect to Default instance, SQL Browser service not present
>>>>>- You can just use the machine name MyMachine as the instance name in connection strings -> Works
>>>>>
>>>>>Connect to a Named instance "MyInstance", SQL Browser service present
>>>>>- You use an instance name of MyMachine\MyInstance in connection strings -> Works
>>>>>
>>>>>Connect to Default instance, SQL Browser service not present
>>>>>- Attempt to use instance name i.e. MyMachine\MSSQLSERVER -> Fails
>>>>>
>>>>>My question is this: if, with just the default instance installed on a given machine, if the (not technically required) SQL Browser service is installed, is it possible to connect to the default instance using MyMachine\MyInstance, or is it still necessary to use just the machine name MyMachine?
>>>>>
>>>>>i.e. Connect to Default instance, SQL Browser service present
>>>>>- Attempt to use instance name MyMachine\MSSQLSERVER -> ???
>>>>>
>>>>>All of my dev instances are named instances, I don't have a default instance installation to test. Does anyone know or can test the above scenario?
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform