case you can try connecting to the SQL server from the virtual
machine to
help narrow down the possible causes of the error. If you installed
SQL
Server Management studio you can open it and from the
login dialog box choose a server type of "Database Engine", choose or
enter
your server in the server name field (I use "localhost\SQLExpress),
choose
"SQL Server Authentication" for the authentication type, enter sa
for the
login, and enter the password. Then click on the options button at the
bottom right of the dialog. From the connection properties tab
change the
network protocol to TCP/IP. If you can click the connect button and
connect
to the server then you know that TCP/IP is configured correctly on
the SQL
server and the problem most likely is with the
firewall/DNS/configuration
settings. If you didn't install SQL Server Management studio you
can use
the command
line tool SQLCMD. To do that open a command prompt. In my installation
SQLCMD is in the path but if it is not on your machine you will
need to
change to the c:\program files\Microsoft SQL Server\100\Tools\Binn
directory. You can type sqlcmd -? for the full syntax but the
following
command line should let you connect to test.
Sqlcmd -U sa -P <sa password> -S <server name>
There is no way with sqlcmd to force a particular protocol for
connecting
but if you use something like 127.0.0.1\SQLExpress for the machine
name it
should use TCP/IP.
Scott Golightly
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Monday, August 24, 2009 12:15 PM
To: [email protected]
Subject: Re: Network Connecton Error
hi Scott,
I have enabled TCP/IP connection in MSSQL. I also added 1433 port
to my
firewall. I have installed MSSQL in sa mode, with a password(I
guess its
called SQL Authentication mode??). Should i reinstall it with default
options??
Prajwal
Scott Golightly wrote:
Prajwal,
You may need to enable TCP/IP on the SQL Server. This is based on SQL
Server 2008 Express running on Windows Server 2008 but from what I
remember
of XP the steps are the same.
To enable TCP/IP from the start menu go to start -> All Programs ->
Microsoft SQL Server 2008 -> SQL Server Configuration Manger.
In the left pane choose SQL Server Network Configuration ->
Protocols for
<SQL Server Instance Name>. By default Shared Memory is the only
protocol
enabled. Right click on TCP/IP in the right pane and choose enable.
You will have to restart your SQL Server (You can do this by
selecting
SQL Server Services in the left hand panel and right click on the
SQL server
instance then choose restart from the menu).
Scott Golightly