Just in Chronicles

Life as a Voyage

How to Connect MS-SQL Server from Virtual Machine

Let’s say there is a server environment up and running on a virtual machine – regardless that it is MS Virtual PC, VM Player or whatever. The server environment is only for web sites. Let’s say that a database development server is installed on a local machine, not on a virtual machine. The web server needs to have a connection to the database. However, sometimes the database won’t allow the VM’s access, even though “ping” is sent from VM to the local.

In this case, the following is worth checking.

  1. Run SQL Server Configuration Manager from Start > All Programs > Microsoft SQL Server 2008 R2 (or other versions) > Configuration Tools
  2. Find SQL Server Network Configuration > Protocols for MSSQLSERVER (or SQLEXPRESS, or another instance)
  3. Set the protocol – TCP/IP – to “Enabled”

That’s it! Now try to connect the database from your virtual machine. It should be working. All good, mate!

Advertisements

Written by Justin Yoo

04/07/2011 at 16:17