How to access SQL Server running on host from guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
romrom
Posts: 10
Joined: 8. Dec 2022, 01:50

How to access SQL Server running on host from guest

Post by romrom »

I have a guest machine (Windows XP 32-bit) and I would like to know how I can set up SQL Server on the host (Windows 10) so that the guest can access the SQL Server instance. The host is running SQL Express. Is this possible?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to access SQL Server running on host from guest

Post by scottgus1 »

The VM can access host network services using a Bridged or Host-Only network. See Virtualbox Networks: In Pictures
AndyCot
Posts: 297
Joined: 29. Feb 2020, 03:04

Re: How to access SQL Server running on host from guest

Post by AndyCot »

Need to configure the MSSQL service to use TCP.

Suggest:
1) use goolge to find out how to settup MSSQL server and client to used TCP
2) Use MS SSMS on host to ensure that the MMSQL server is running and you can connect via port 1433
3) Allow port 1433 between host and client. See the VB manual or check out the following thread is you have issues:
viewtopic.php?f=7&t=107999&hilit=port

The main thing is to use TCP and not pipes as it's allot easier to setup and configure.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to access SQL Server running on host from guest

Post by scottgus1 »

AndyCot wrote:Allow port 1433 between host and client.
This port must be allowed in the host's and VM's OS firewalls. But if Bridged or Host-Only networking is used, no port forwarding need be done in any Virtualbox settings.
Post Reply