Connect SSMS to SQL Engine on VMWARE machine [closed]

This my first question so forgive me if i did anything wrong and tell me about it please.
I have a VM on VMWare Workstation 9, it’s windows 7 and i installed SQL Server Express on it.
And i am trying to connect my local SSMS(SQL Server Management Studio) to it, but it’s not working, i tried machine name only and machine\instance name and windows authentication and sql authentication
it always say this message :

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

Cannot connect to VMWIN7\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: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

The local PC can see the VM and i can ping it and i can access it’s sharing folders but it asks for use name before i can access sharing folders
What i tried to solve the problem, i changed SQL instance network configuration so i enabled Shared Memory , Named Pipes and TCP/IP.
I didn’t change VM config it’s the default configuration.

I want to make this machine for testing apps
Please help me
Thanks

Answer

SQL Express by default only allows connections from localhost. You need to reconfigure it to allow remote connections.

  1. Launch the SQL Server Configuration Manager from the “Microsoft SQL
    Server 2005 CTP” Program menu
  2. Click on the “Protocols for SQLEXPRESS” node,
  3. Right click on “TCP/IP” in the list of Protocols and choose, “Enable”.
  4. Click on the “TCP/IP” child node
  5. You will notice an entry on the right panel for “IPAll”, right click
    on this and select, “Properties”
  6. Clear out the value for “TCP Dynamic Ports”
  7. Give a TcpPort number to use when making remote connections, for
    purposes of this example lets choose, “2301”

I’ve shamelessly copied this from an MSDN blog post targeting SQL Express 2005, from memory, it applies perfectly to SQL Express 2008 also.

Attribution
Source : Link , Question Author : AlaaL , Answer Author : Bryan

Leave a Comment