![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
If I specify my server, it works. Shouldn't the plain command work since it is supposed to start the default instance of SQL Express on my computer? |
|
SSMS works: it starts up and I can log in. |
#3
| |||
| |||
|
|
Gene Wirchenko (genew (AT) ocis (DOT) net) writes: If I specify my server, it works. Shouldn't the plain command work since it is supposed to start the default instance of SQL Express on my computer? No. Admittedly, this is a little confusing. A default instance is an instance ^^^^^^^^ |
#4
| |||
| |||
|
|
Admittedly, this is a little confusing. A default instance is an instance ^^^^^^^^ ITYM "unnecessarily". I think one could be forgiven for thinking that Microsoft does not want its product used. |
#5
| |||
| |||
|
|
Gene Wirchenko (genew (AT) ocis (DOT) net) writes: Admittedly, this is a little confusing. A default instance is an instance ^^^^^^^^ ITYM "unnecessarily". I think one could be forgiven for thinking that Microsoft does not want its product used. No, the current behaviour is correct in my opinion. SQL Express should |
|
not be installed as a default instance, at least no by default, and SQLCMD should not try to guess what you want. What if you later install a default instance, and SQLCMD without any arguments suddenly started to connect to a difference instance? |
|
If ./SQLEXPRESS to much to type for you, I think SQLCMD can get the default server from a environment manual. Books Online should have the details. ^^^^^^ |
#6
| |||
| |||
|
|
Microsoft has chosen to call a nameless instance a default instance. Was there really any need for this obfuscation? |
#7
| |||
| |||
|
|
I do not. "default" means the one selected when nothing is specified. I think that most people would think that when there is only one, that it should be the default. |
|
Microsoft has chosen to call a nameless instance a default instance. Was there really any need for this obfuscation? |
|
If ./SQLEXPRESS to much to type for you, I think SQLCMD can get the default server from a environment manual. Books Online should have the details. ^^^^^^ ITYM "variable" here. No such option, |
#8
| |||
| |||
|
|
On Tue, 26 Oct 2010 15:13:57 -0700, Gene Wirchenko wrote: I do not. "default" means the one selected when nothing is specified. I think that most people would think that when there is only one, that it should be the default. Don't forget that SQL Server is a server product by nature. The client tools don't necessarily expect the server to be on the same computer as where they are running. In such a setup, it's hard to come up with any sensible default, so I think not having a default to connect to is the right choice. |
|
Microsoft has chosen to call a nameless instance a default instance. Was there really any need for this obfuscation? Probably the fact that if you change no options during installation of SQL Server, you get a nameless instance. It's not the default to connect to, but the default to install. |
|
If ./SQLEXPRESS to much to type for you, I think SQLCMD can get the default server from a environment manual. Books Online should have the details. ^^^^^^ ITYM "variable" here. No such option, Wrong. Excerpt from Books Online: "If you do not specify a server_name [ \instance_name ] when you start sqlcmd, SQL Server checks for and uses the SQLCMDSERVER environment variable." |
#9
| |||
| |||
|
|
Probably the fact that if you change no options during installation of SQL Server, you get a nameless instance. It's not the default to connect to, but the default to install. Nameless instance is not the default. |
|
If ./SQLEXPRESS to much to type for you, I think SQLCMD can get the default server from a environment manual. Books Online should have the details. ^^^^^^ ITYM "variable" here. No such option, Wrong. Excerpt from Books Online: "If you do not specify a server_name [ \instance_name ] when you start sqlcmd, SQL Server checks for and uses the SQLCMDSERVER environment variable." Not wrong. I looked at the command options, and there was no such option. Your detail is YA detail that is not obvious to someone starting and is just another gotcha. |
#10
| |||
| |||
|
|
Now I don't understand. I thought this was about environment variables, but now you say that this is not a command option. Just for the record, when running sqlcmd.exe ... * You can use the -S command line option to specify server name or server + instance name to connect to. This is documented in Books Online. When you run sqlcmd with the -? option, -S in included in the overview, but [\instance] is missing (tested on SQL Server 2005; I have no idea if this is fixed in later edition, but I'll run a test later) |
|
* Or you can set the SQLCMDSERVER environment variable before running sqlcmd.exe. This environment variable will only be used if the -S option is not specified. This is documented in Books Online. |
![]() |
| Thread Tools | |
| Display Modes | |
| |