Need help configure SQL Server 2008 R2 in VB

Discussions related to using VirtualBox on Windows hosts.
MEHRING
Posts: 6
Joined: 13. Jun 2012, 21:02

Need help configure SQL Server 2008 R2 in VB

Post by MEHRING »

I am kind of new to VM technology. I recently installed SQL Server 2008 R2 on a Win7 x86 VirtualBox using Bridged network adapter. I can get shared folders to work between other workstations and the VM, but ODBC can't seem to see / authenticate the SQL server. I've set up SQL server outside of VM many times easy. Any ideas?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need help configure SQL Server 2008 R2 in VB

Post by Perryg »

A Virtual Machine if using Bridged is pretty much like a stand alone machine on the LAN. You should be able to do anything with it that you can do with a machine on metal. The only exception is it is running on the host, so the hosts firewall may be blocking you from authenticating.
MEHRING
Posts: 6
Joined: 13. Jun 2012, 21:02

Re: Need help configure SQL Server 2008 R2 in VB

Post by MEHRING »

Perryg wrote:A Virtual Machine if using Bridged is pretty much like a stand alone machine on the LAN. You should be able to do anything with it that you can do with a machine on metal. The only exception is it is running on the host, so the hosts firewall may be blocking you from authenticating.
Thank you for your responce. For testing I disabled firewall on host machine and having same issue. There is a MSSQL2003 instance on host machine which outside workstations can access via ODBC.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need help configure SQL Server 2008 R2 in VB

Post by Perryg »

It must be a configuration error then since as I said it the guest will appear to be just another PC on the LAN. Also you should be using network shares and not the shared folders of VirtualBox as they are not designed to do this for the LAN, just the host to guest.
MEHRING
Posts: 6
Joined: 13. Jun 2012, 21:02

Re: Need help configure SQL Server 2008 R2 in VB

Post by MEHRING »

Perryg wrote:It must be a configuration error then since as I said it the guest will appear to be just another PC on the LAN. Also you should be using network shares and not the shared folders of VirtualBox as they are not designed to do this for the LAN, just the host to guest.
I've set up SQL many times before the only thing that is different is it's setup through virtualbox. I can't see any reason this isn't working. It's a fresh install of SQL on a fresh install of Windows it should be simple. The server is configured for remote connections and there are no firewalls or security software blocking the connection. This is the error I get when I try to connect to it via Management Studio on another workstation on the LAN.

Code: Select all

TITLE: Connect to Server
------------------------------

Cannot connect to SERVER_VM\SQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

For help, click: 
------------------------------
BUTTONS:

OK
------------------------------
btw I am using network shares and not the virtualbox shared folders.

Can anyone else confirm that no additional configuration should be needed to get this working?

Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need help configure SQL Server 2008 R2 in VB

Post by Perryg »

From the hosts terminal/command window type VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use " " if the name has a space in it.
Note if the host is Windows you need to be in the directory that has VBoxManage.exe for the command to work.

One other thing (and I don't see why it would matter) have you tried with promiscuous mode enabled?
MEHRING
Posts: 6
Joined: 13. Jun 2012, 21:02

Re: Need help configure SQL Server 2008 R2 in VB

Post by MEHRING »

Perryg wrote:From the hosts terminal/command window type VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use " " if the name has a space in it.
Note if the host is Windows you need to be in the directory that has VBoxManage.exe for the command to work.

One other thing (and I don't see why it would matter) have you tried with promiscuous mode enabled?
By the way, thank you for your time, Perry :D

I set promiscuous mode to allow all but it did not seem to make a difference

Here are the results of the command you posted.

Code: Select all

C:\Program Files\Oracle\VirtualBox>vboxmanage showvminfo SERVER_VM --details
Name:            SERVER_VM
Guest OS:        Windows 7
UUID:            afa22659-ba04-440f-866e-b573ca5dcd97
Config file:     C:\Documents and Settings\Administrator\VirtualBox VMs\SERVER_V
M\SERVER_VM.vbox
Snapshot folder: C:\Documents and Settings\Administrator\VirtualBox VMs\SERVER_V
M\Snapshots
Log folder:      C:\Documents and Settings\Administrator\VirtualBox VMs\SERVER_V
M\Logs
Hardware UUID:   afa22659-ba04-440f-866e-b573ca5dcd97
Memory size:     1024MB
Page Fusion:     off
VRAM size:       21MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
PAE:             off
Time offset:     0 ms
RTC:             local time
Hardw. virt.ext: on
Hardw. virt.ext exclusive: off
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
State:           running (since 2012-06-13T20:39:36.921000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Storage Controller Name (0):            IDE Controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA Controller
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      1
Storage Controller Bootable (1):        on
IDE Controller (1, 0): C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso
 (UUID: e5cb1cad-124e-4f47-933a-703ad3dd0811)
SATA Controller (0, 0): F:\DATA\VMs\SERVER_VM\SERVER_VM.vdi (UUID: a09cf93c-b5b1
-446f-aa49-68f281600b0f)
NIC 1:           MAC: 0800278AA33C, Attachment: Bridged Interface 'Intel(R) 8256
6DM-2 Gigabit Network Connection', Cable connected: on, Trace: off (file: none),
 Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
Audio:           enabled (Driver: DSOUND, Controller: HDA)
Clipboard Mode:  Bidirectional
Video mode:      1024x768x32
VRDE:            disabled
USB:             enabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Guest:

Configured memory balloon size:      0 MB
OS type:                             Windows7
Additions run level:                 0

Guest Facilities:

No active facilities.

Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need help configure SQL Server 2008 R2 in VB

Post by Perryg »

Everything looks good. Can you access the guest at all from the LAN, or is it just the ODBC connection that fails?
MEHRING
Posts: 6
Joined: 13. Jun 2012, 21:02

Re: Need help configure SQL Server 2008 R2 in VB

Post by MEHRING »

I can ping it and get replies fine, and I can use network shared folders just fine. (Both from other workstations on LAN outside of the host machine)

Both ODBC and Management Studio cannot see / authenticate SQL server from outside of the virtual machine.

I can use Management Studio to interact with SQL server from within virtual machine only.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need help configure SQL Server 2008 R2 in VB

Post by Perryg »

Well that makes no sense. I am afraid unless I could actually touch the machine I can't think of a reason why it would not work, unless there was a conflict or configuration issue. I guess I will bow out and monitor and see if anyone else has a suggestion.
BillG has more up to date experience than I with Windows management, maybe he will know and should drop by later today.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Need help configure SQL Server 2008 R2 in VB

Post by BillG »

I don't really have much to add to Perry's remarks. I cannot see any relationship between your problem and VirtualBox. Once you have bridged networking set up, the vm behaves just like any other machine on the LAN as far as networking is concerned. It uses the same network protocols which have no idea whether the machine is virtual or not. They only see the machine's hardware (MAC) address. The bridge filter driver sorts out which traffic goes to the host and which goes to the guest at the hardware level, so traffic for the guest never goes to the host's IP stack. The only thing which I know of which can cause a problem with that is an incompatibility between the VirtualBox filter driver and the device driver for the NIC in the host OS. If you suspect this is your problem, check for an updated driver on the manufacturer's web site.

You should use normal networking tools to find out what is going on.
Bill
tliwo
Posts: 1
Joined: 10. Aug 2012, 10:11

Re: Need help configure SQL Server 2008 R2 in VB

Post by tliwo »

i've the same Problem, but only when i switch the bridged nic from WLAN to LAN. I configured the SQL-Server in the WLAN and it works fine. When i switch to LAN i have full access to the guest-system (shares, rdp) AND the SQL Server Management Studio can find the server but not connect, same by the access.adp (can't connect to the Server). Maybe this helps to find a cause by someone.
Abrateg1
Posts: 1
Joined: 13. Sep 2012, 09:26

Re: Need help configure SQL Server 2008 R2 in VB

Post by Abrateg1 »

I just solved the same problem by changing the service start option.
Basically the problem was that the "server browser service" was disabled.
On the configuration manager I changed the start option to automatic and then manually started the service. After this it worked fine, at least from the HOST operating system'
W7 host, W7 guest and SQL express 2012, and using ODBC from MS access 2010
Ambrose
Posts: 1
Joined: 4. Oct 2012, 22:34

Re: Need help configure SQL Server 2008 R2 in VB

Post by Ambrose »

I am at my wit's end on this one. I have the same setup - MS Access 2010 on the Windows 7 VirtualBox host, which connects fine to every other SQL Server in the workgroup except the SQL Server 2012 installed on the VirtualBox Windows 7 guest.

No other Windows 7 MS Access 2010 machine in the workgroup can connect to this VirtualBox guest version of SQL Server 2012 either, but can connect to other SQL Servers installed in exactly the same way on non-virual Windows 7 machines using the same ODBC drivers.

I installed Access 2010 on this aforementioned VirtualBox guest and it works just fine with the local version of SQL Server 2012 on the same guest.

I am using the VirtualBox 4.2 bridged networking type with all the defaults. I can connect network drives on the guest and transfer data from the guest, no problem. Only SQL Server ODBC has any trouble connecting to this host (error 10060) and the same driver connects fine to other hosts.

Oh, and SQL Server 2012 "Allow External Connections' is 'Yes' and the firewall is off for the guest. Doesn't work whether the SQL Server Browser Service' is on or off, and there's no reason this should matter with only one instance of SQL Server on the default port, 1433.

This is truly bizarre, everything works fine except an ODBC connection to the guest Windows 7 SQL Server 2012
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need help configure SQL Server 2008 R2 in VB

Post by Perryg »

You need to open a ticket at bugtracker
Post Reply