C:\home\mfincher>osql -Usa -P"MyPassword" -S "MyServer\SqlExpress"
-d master -Q"SELECT DISTINCT name FROM SYSDATABASES"
The result was:
[DBNETLIB]SQL Server does not exist or access denied.
The solution took three steps to remove the default locked-down settings:
1. Select "Start/Programs/Microsoft SQL Server 2005/Configuration Tools/SQL Server Configuration Manager"
Select "SQL Server 2005 Network Configuration/Protocols for SQLEXPRESS" in the left pane. In the right pane, enable "Named Pipes" and "TCP/IP".
2. Select "Start/Settings/Control Panel/Services" panel.
Right click on "SQL Server Browser". In the "General" tab set "Startup type:" to be "Automatic".
In the Services panel make sure the "SQL Server (SQLEXRESS)" service is running.
3. In "Microsoft SQL Server Management Studio Express" (see previous post on how to get), right click on the machine instance (the top item) and select "Connections". The check the box labeled "Allow remote connections to this server".
It's thrilling to see Microsoft take such pains to have a more secure system by default, but it would be nice to have a single, obvious checkbox to allow the system to talk with the rest of the world.