none
VM role SQL Server on Azure - Connecting from another Azure VM role instance

    Question

  • Hi,

    I have sql server deployed on Azure as a VM role. I have another VM role which has SQL Server Management studio and sharepoint. When I run central administration site of share point it shows error as Database cannot be found. So I tried to connect to SQL server vm role from management studio present on sharepoint vm role. But it shows an error as follows -

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

    Cannot connect to Myserver

    ------------------------------
    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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476

    I have opened TCP 1433, UDP 1434 fro sql browser in firewall. I have enabled named pipe and TCP/IP from SQL server configuration manager. Opened ping firewall ports. Also added SQL Browser and sqlserver.exe in programs of firewall.

    I can ping both vm role instance from each other by using IPv6 IP but can not ping using name of the server. If I ping using IPv4 IP then errors out as "Request timeout".  

    Both vm roles are domain joined and can be pinged from Domain controller. Also domain users can also be added. If I search SQL vm role server name and try to add in administrators group of share point vm role, it is allowing me.

    SQL server vm role is geting connected from management studio of local machine endpoint (enabled using azure connect) in domain.

    I am not able to find out the solution. Please help.

    Regards,

    Kunal Chandratre

    Thursday, February 17, 2011 9:01 AM

Answers

  • Dear All,

    I succesfully connected to SQL azure vm role through management studio of share point vm role through SQL authentication mode. Following are the steps - (Assuming you have SQL server 2008 as a VM role and sharepoint 2010, SQL server Management studio on another azure VM role. And both VM roles are in same domain configured using azure connect)

    1. First enable firewall on both VM roles by making RDP to them. Then on SQL VM role, Open port 1433 TCP in firewall (inbound and outbound both)and open all "file and printer sharing" options through "predefined" labeled drop down in firewall(inbound and outbound both). Then open only "File and Printer sharing" options on sharepoint VM role (inbound and outbound both).

    2. Make sure that TCP-IP and named pipes are enabled on SQL server VM role. If not enable it ans restart SQL Browser service and SQLServer service.

    3. Make sure that remote connection is allowed in SQL server.

    Then use IP address of SQL server(as I am using default instance of SQL server and not named instance) in management studio of sharepoint vm role. Enter username and password to connect to the SQL server.

    Hope this helps. Let me know if anyone needs more assistance.

    Regards,

    Kunal Chandratre

    Mark As Answer if it helps you.

    • Marked as answer by Mog Liang Friday, March 04, 2011 7:16 AM
    Friday, February 25, 2011 6:08 AM

All replies

  • Hi Kunal

    I dont know if this setup is supported. Anyway here my thought:

    Could it be that you use Windows Authentication? Did you try to use SQL Server Authentication? I just saw issues with Windows Authentication of SQL Server several times while SQL Server Autthentication works. This had something to do with active directory and SPN (service principal name).

    Regards,

    Marc

    Thursday, February 17, 2011 12:35 PM
  • Hi Marc,

    I tried with both SQL and windows authentication but no luck.

    One strange thing i observed is, I can ping IP address, loopback IP adress of the azure instance machine from the cmd of same auzre instance machine but if i ping default gateway then it shows eror as "Request timed out".

    This ping issue happens on both azure instance machines.

    Any inputs?

    Regards,

    Kunal Chandratre

    Monday, February 21, 2011 6:52 AM
  • Hi Kunal

    have you tried to use telnet to test port 1433? This is a network troubleshooting guide from Azure SQL - not a local installation but some hints should help as well.

    If this works, have you allowed remote connections on the SQL Server?

    Regards,

    Marc

    Monday, February 21, 2011 7:22 AM
  • Dear All,

    I succesfully connected to SQL azure vm role through management studio of share point vm role through SQL authentication mode. Following are the steps - (Assuming you have SQL server 2008 as a VM role and sharepoint 2010, SQL server Management studio on another azure VM role. And both VM roles are in same domain configured using azure connect)

    1. First enable firewall on both VM roles by making RDP to them. Then on SQL VM role, Open port 1433 TCP in firewall (inbound and outbound both)and open all "file and printer sharing" options through "predefined" labeled drop down in firewall(inbound and outbound both). Then open only "File and Printer sharing" options on sharepoint VM role (inbound and outbound both).

    2. Make sure that TCP-IP and named pipes are enabled on SQL server VM role. If not enable it ans restart SQL Browser service and SQLServer service.

    3. Make sure that remote connection is allowed in SQL server.

    Then use IP address of SQL server(as I am using default instance of SQL server and not named instance) in management studio of sharepoint vm role. Enter username and password to connect to the SQL server.

    Hope this helps. Let me know if anyone needs more assistance.

    Regards,

    Kunal Chandratre

    Mark As Answer if it helps you.

    • Marked as answer by Mog Liang Friday, March 04, 2011 7:16 AM
    Friday, February 25, 2011 6:08 AM
  • Not to rain on this parade or anything but is everyone being careful to ensure that any storage here is persisted to off-instance storage. Otherwise, you might have a problem if Microsoft reimages your instance and all your data is lost.

    Friday, February 25, 2011 4:22 PM
  • Dear Neil, Well said. I have already taken care of data storage. While installation I have given the path for data files to new VHD. And I uploaded this VHD as a page blob. Then I used a windows service on Azure VM role start up in such a way that, it loads this page blob as Azure drive. This solved problem of data persistance. Hope this helps. Regards, Kunal Chandratre
    Wednesday, March 02, 2011 10:53 AM