Cannot Connect to Azure SQL Database in Visual Studio 2013

Beyond Frustrated here.
I am trying to connect to an Azure SQL database - it has been created, has tables etc. I am trying to create a new Data Connection from within Visual Studio 2013, latest release for VS and Azure. I continue to receive the following error:
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)
I have ensured that TCP is allowed and above Named Pipes in the Configuration Manager. The associated IP address is allowed on Azure Firewall. Certificate has been added to VS etc. But still no connection. I can see the database in the Azure section in Server
Explorer, but cannot add a Data Connection. What is equally as frustrating is I have a MacBook Pro running Win 7 sitting right next to my office computer and it can access Azure fine, not problems.
If anyone has any other ideas on how I might be able to solve this I would love to hear them. Thanks in advance.
Jeff

Hi,
 The Error message "   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) "
The issue comes up mainly because the application is not able to connect to the server.
To resolve this issue, try the following steps (in that order):
 Make sure that TCP IP is enabled as a client protocol on the application server. For more information on how to do this, see
Configure client protocols. On application servers where you do not have SQL Server tools installed, you can check this by running cliconfg.exe (SQL Server Client Network Utility).              
 2.  Check the application’s connection string to make sure that it is correctly configured. For example, make sure that the connection string specifies the correct port (1433) and the fully qualified server name.                
Note You can follow these steps to obtain the connection string from the Azure Management Portal:                  
                      Log on to the
Azure Management Portal.                    
                      In the left navigation pane, click
SQL Databases.                    
                      Select your Azure SQL Database server.                    
                      Click
Dashboard.                    
                      On the right side, go to the
quick glance section, and then click Show connection strings.                    
Test the connectivity between the application server and the Azure SQL database by using a UDL file, ping, and telnet. For more information about how to do this, see
Azure SQL Database connectivity troubleshooting guide and
Troubleshooting SQL Server connectivity issues.                
Note As a troubleshooting step, you can also try to test the connectivity on a different client computer.                
Try increasing the connection timeout. Microsoft recommends using a connection timeout of at least 30 seconds.              
As a best practice ensure retry logic is in place. For more information about the retry logic, see
Azure SQL Database best practices to prevent request denials or connection termination.              
      If these  steps do not resolve your problem, follow the below steps to collect more data and contact support:              
   If your application is a cloud service, enable the logging. This step returns a UTC time stamp of the failure. Additionally, SQL Azure returns the tracing ID.
Microsoft Customer Support Services can use this information.                   
   For more information about how to enable the logging, see
how to enable diagnostic logging for Azure Web sites and Developing SQL Database Applications section in
Azure SQL Database Development Considerations.                
  Check out
the list of best practices for Connecting to Windows Azure SQL Database.
Regards,
Shirisha Paderu.

Similar Messages

  • Connecting to Azure SQL database in Access 2010

    I've recently purchased a new computer and I had an OBDC connection set up to link to a sql database in azure through access. I am trying to set it up on my new computer but I'm unable to define the specific database. I'm able to make the connection but
    it only allows me into the master database. I've added my IP address in the configure servers but still can't get things to work. Any help would be greatly appreciated.
    thanks
    Lynn

    Hi,
    The following guidelines apply to SQL Database connections using ODBC:
    • When using SQL Server Native Client from SQL Server 2008 R2 or SQL Server 2008, the connection string must include the server name as part of the user name (user@server).
    • You must use TCP/IP as the protocol when connecting to an Azure SQL Database.
    • You cannot create a table in the master database, so therefore you must create a user database to create a table.
    • You cannot execute a use database command to switch to your user database. You must disconnect and connect directly to the user database.
    • You must have a primary key or clustered index on your table to be able to insert data.
    Ref:
    https://msdn.microsoft.com/en-us/library/azure/hh974312.aspx?f=255&MSPPError=-2147217396
    http://blogs.office.com/2010/06/07/access-2010-and-sql-azure/
    https://support.microsoft.com/en-us/kb/2028911/
    Hope this helps you.
    Girish Prajwal

  • Can No Longer Connect to Azure SQL Databases

    As of this morning, I am no longer to connect to any of my Azure SQL databases by any (apparent) means. I checked the configuration in the azure portal and my IP address is listed as an allowed IP, however:
    I am unable to connect via SQL Server Management Studio
    My request times out when attempting to visit https://{server_name}.database.windows.net
    What might have caused this?

    Hi ,
    Thanks for posting here.
    To resolve the issue you can try the following steps (in that order):
                    Check the application’s connection string to make sure that it is correctly configured. For example, make sure that the connection string specifies the correct port
    (1433) and the fully qualified server name.                
    Note You can follow these steps to obtain the connection string from the Azure Management Portal:                  
                          Log on to the
    Azure Management Portal.                    
                          In the left navigation pane, click
    SQL Databases.                    
                          Select your Azure SQL Database server.                    
                          Click
    Dashboard.                    
                          On the right side, go to the
    quick glance section, and then click Show connection strings.                    
                    Make sure that TCP IP is enabled as a client protocol on the application server. For more information on how to do this, see
    Configure client protocols. On application servers where you do not have SQL Server tools installed, you can check this by running cliconfg.exe (SQL Server Client Network Utility).              
                    Test the connectivity between the application server and the Azure SQL database by using a UDL file, ping, and telnet. For more information about how to do this,
    see
    Azure SQL Database connectivity troubleshooting guide and
    Troubleshooting SQL Server connectivity issues.                
    Note As a troubleshooting step, you can also try to test the connectivity on a different client computer.                
                    Try increasing the connection
    timeout. Microsoft recommends using a connection timeout of at least 30 seconds.              
                    As a best practice ensure retry logic is in place. For more information about the retry logic, see
    Azure SQL Database best practices to prevent request denials or connection termination.              
                  If the previous steps do not resolve your problem, follow these steps to collect more data and contact support:              
                      If your application is a cloud service, enable the logging. This step returns a UTC time stamp of the failure. Additionally, SQL Azure returns the tracing
    ID.
    Microsoft Customer Support Services can use this information.                
                      For more information about how to enable the logging, see
    how to enable diagnostic logging for Azure Web sites and Developing SQL Database Applications section in
    Azure SQL Database Development Considerations.
    Please write back with the exact Error message/ Error Code if this doesn't help.
    Regards,
    Shirisha Paderu.

  • Consistently getting "The wait operation timed out" when connecting to Azure SQL Database from a virtual instance...

    I have a web app that is backed by a an Azure SQL Database. The problem is that I had multiple issues when connecting to the database mainly when trying to establish a connection, or timeouts. This is the log I just encountered when trying to use the web
    app.
    [Win32Exception (0x80004005): The wait operation timed out]
    [SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21970; handshake=1; ]
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +671
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +116
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1012
    System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +6712291
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +152
    System.Data.SqlClient.SqlConnection.Open() +229
    System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +102

    Hi Affar2k,
    According to your description, we need to verify if there is no network issue and the Sqlclient version is older than .NET 4.5.  You can try to connect to the Windows Azure SQL database via SSMS and check if it can run well. When you
    connect to the SQL Azure database via ADO.NET, you need to verify that the server name and passwords are right in the connection string.
    For more information, you can review the following article about how to connect to Windows Azure SQL Database using ADO.NET.
    http://msdn.microsoft.com/en-us/library/windowsazure/ee336243.aspx
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Offline copy of SQL Database in Visual Studio Community Edition?

    I'm using an Azure Mobile Service and SQL database, and I'm interacting with it via Visual Studio Community Edition (12.0.31101.00 Update 4).
    I'm often offline, but want to work on and test the SQL code.  Is there a way to sync a local copy of the database to my pc so I can work with that to test my code?  I'm not necessarily looking to make changes to the database offline and syncing
    that back to the server, although that would be nice too.
    Thanks!

    Hello Scott,
    You could use SQL Data Sync to synchronize your local copy of the database with the Azure SQL database. The details are documented at http://msdn.microsoft.com/en-us/library/hh456371.aspx. 
    PS - the SQL Data Sync feature is still in preview and the support is only through forums.
    Regards,
    Kumar Bijayanta

  • Workaround to embed local database in visual studio 2013

    In Visual Studio 2013 there is no longer an option to create an sdf local database.
    Now how can I do to include a local database application?
    have I  create a normal database in SQL Express ?
    Thanks 
    www.Photoballot.net

    Hello,
    Yes, Microsoft seems to be dropping support for sdf. However, you still have workarounds available:
    http://yakimadev.com/how-to-add-sql-server-compact-database-sdf-to-visual-studio-2013-project/
    (SQL Server Compact Toolbox)
    http://sourceforge.net/projects/compactview/ (CompactView)
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to connect to Azure SQL database remotely (SharePoint 2013 BI)

    Hi,
    I am new to using Azure VM's and I am looking for advice. I have created and can connect to an Azure VM with a SQL Server 2012 installed on it (includes SSAS and SSRS). I connect to the VM using Microsoft Remote Desktop Connection.
    The problem I am having is connecting to the Azure database from a SharePoint BI site. Are there any good videos or websites that demonstrate how to setup an Azure VM so a user can access a database remotely.
    I hope you can help. 
    ATaylor

    Hello,
    To connect to the SQL Server Database from another computer, you must know the Domain Name System (DNS) name of the Azure virtual machine. For example: DNSName,portnumber such as SQLVM.cloudapp.net,57500.
    (Note: The port number is the public endpoint port which you can configure in the management portal for TCP communication with SQL Server on Azure VM.)
    As for datasource credentials, you can use a SQL Server authentication login: create a SQL Server login with password on the SQL Server instance.
    Reference:
    Complete Configuration steps to connect to the virtual machine Using SQL Server Management Studio on another computer
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Cannot connect to the targeted site in Visual Studio 2012

    Hi,
    I am trying to access SharePoint 2013 "qa" sites from development server. When I try to build Visual studio projects,  I am keep getting this below error.
    "Cannot connect to the targeted site. This error can occur if the specified site is not hosted on the local system. SharePoint solutions work only with locally-installed versions of SharePoint Foundation or SharePoint Server. Remote development is supported
    only for apps for SharePoint 2013."
    I tried to change the host file, with the current machine IP address and all. Not successful on that.
    Highly appreciated, for any helpful points here.
    Cheers, R.

    Try the following 2 options:
    Option 1:
    You can use the following command:
    %STSADM% -o deploysolution -name testSharepointSolution.wsp -local -force
    %STSADM% -o deploysolution -name testSharepointSolution.wsp -local -force
    You cannot use -url parameter if your solution package does not have an assembly or feature specific elements(elements.xml).
    You may ask why we need to provide the -url as a parameter? the reason is sharepoint needs to know which web application web.config it needs to add <SafeControl> attribute.
    Option 2:
    Check your scope of your WSP (Farm, Site etc.). Try to use the powershell command :
    Add-SPSolution -identity [drive-path]\yoursolutionname.wsp
    Install-SPSolution -identity yoursolutionname.wsp -webApplication http://siteaddress -GacDeployment
    Even then, if you get the error, try changing the scope of your WSP to farm if you want your resources to be globally available. If not, change the scope of it to specific web application.

  • Can't publish to Azure Cloud Service from Visual Studio 2013

    I have a VS project that I upgraded from VS 2012 to VS 2013. I can run it locally, and had no issues publishing to Azure when I was using VS 2012. When I attempt to publish the upgraded app to an Azure Cloud Service that already exists, I am getting this
    error.  Note that I have checked the Service Config files and did a search on the entire solution and can not find any reference to "LocalStorage1" anywhere in the Project or Solution. I have another VS 20113 Project that publishes just fine
    to Azure Cloud Service. Any ideas on how to fix this?
    PUBLISH ERROR:
    Windows Azure could not find the resource LocalStorage1 in the service package. To upgrade the deployment, you must add the resource. Otherwise, perform a new deployment.

    That's actually what I meant in my first post. When publishing to a new service, it is fine, because the deployment does not have to compare what is already there (it is a new service, so nothing is there) and what is in your package. But while upgrading
    a service, bunch of settings have to match between an existing service and the package you are trying to upload. So the error you got wasn't about you having something extra in your package, but having something extra in your existing service and missing in
    the package you were uploading. Hope that helps.
    Anyway, please move this question to cloud services forums (this one is for web sites only), as there are experts in that area and they might be able to help you better.
    Thanks,
    Petr

  • Yesterday I was able to connect Azure SQL Database - Today I am not

    Hello Everyone,
    I have problem with establishing connection with Azure SQL Database. I have read many articles here, tried some solutions but none worked.
    0. On last Friday everything worked well - today it does not.
    1. I added my public IP Address in Azure Management Portal earlier.
    2. I tried different types of login-ways: login@nameserver, I used numeric addresses instead of server names, I set TCP connection manually, added encryption in one case either, tried do establish connection with particular database
    3. Firewall does not block 1433 out connection
    4. My IP address is static
    5. I have no error message displayed using Microsoft SQL Server Management Studio - it just hangs.. - no response at all
    6. I cannot ping the machine but its name is resolved correctly - maybe it does not respond using echo reply on purpose
    7. Status of my database is Active - I am able to connect it and manage via browser and management portal at the moment
    8. When I am trying to connect database via Visual Studio - it hangs.. - VS must be stopped manually via task manager
    9. My local CloudService has problem with connection to the db either
    10. Currently I am not able to deploy my CloudService because when I am trying to Publish it - VS hangs as soon as first Publish dialog window appears. Looks that I am able to deploy cloud service via Management portal only.
    I am still trying to dive into the problem but at this moment I would be grateful for any clues.
    Regards,

    Hi Mekh, hi everyone
    PROBLEM SOLVED.
    Yestarday I updated Azure Firewall rule and database-level firewall rules (master, my_database). I added special input / output protocols (IP, TCP, UDP) rules to my COMODO firewall (MSSMS could send anything and receive anything using IP, TCP and UDP). Status
    of my computer -> database connection was set to ESTABLISHED in netstat output but MSSMS was still unavailable (no response at all - no error message).
    I DECIDED TO UNINSTALL COMODO AT ALL and then if it does not work - reinstall local SQL Server, MSSMS and finally Visual Studio. When Comodo was gone - problem was gone either. Now I have connection with my database using MSSMS and I do not have to reinstall
    anything more.
    Regards,

  • How do I create a view in SQL Server in Visual Studio Express 2013 for Desktop?

    Hi
    I've got a SQL Server database set up using the internal SQL Server in Visual Studio Express 2013 for Desktop. I want to create a view (using tables with one to many relationships) but I don't
    know how to do it.
    Where can I find a good tutorial on creating views in SQL Server in Visual Studio Express 2013 for Desktop? I think Visual Studio Express 2013 for Desktop doesn't have some view designer that
    exists in the non-express version of Visual Studio (if I'm not mistaken). So I think I'd need a tutorial on how to do the actual SQL, unless there is some tool I don't know about.
    Thanks

    Hi ,
    According to your description, if you install SQL Server SQL Server 2014 Express and SQL Server Manager Studio tools (SSMS), if you want to create a view, you can use SSMS. Then if you want to connect to and Diagram your SQL Express Database in Visual Studio
    2013, you can attach the database file by using the .NET Framework Data Provider for SQL Server in Visual Studio, and create a database diagram via expanding the “Database Diagrams” node.
     For more information, there is similar issue about how to connect to and Diagram your SQL Express Database in Visual Studio 2012 , you can review the following article,
    http://blogs.msdn.com/b/bethmassi/archive/2011/10/27/how-to-connect-to-and-diagram-your-sql-express-database-in-visual-studio-lightswitch.aspx.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Problems with connecting my Mysql db to visual studio 2013

    Hey all,
    I tried connecting my MYSQL db to my visual studio 2013
    after installing all db connectors from MYSQL and tried following multiple guides its still not working.
    I first had VS Express but it seems the express versions don't support that so then i went to get a VS Professional 2013 (trial i think) and this didn't work either. 
    Does anyone know any solution other than installing connectors (reinstalled them like 2 times already) or getting another VS ?
    Thanks in advance 

    Hi Weffke,
    The forum supports VS setup and installation. And I think your issue isn't related to the forum.
    >>after installing all db connectors from MYSQL and tried following multiple guides its still not working.
    I think your issue is more about MYSQL. So I suggest you post your issue to the related forum below.
    http://forums.mysql.com/list.php?174
    I will move the thread to off-topic forum. Thanks for your understanding.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Connecting to an Azure SQL Database from a Windows C# Form

    Hi,
    Is it possible to connect to an SQL database in Azure from Visual Studio C# 2010 or 2012? If so how is this done. Is it the same as if you were connecting to SQL Express database with the use of a connection string? Any directions or tutorials would be of
    great help!
    Thanks!

    Hi,
    >>Thanks for the reply Paul, That is disappointing. I am trying to get my students to create a C# application that will connect with a database in Azure. Is there another approach besides SQL that I could use?
    Using SQL Azure will work fine (see below), if the students are familiar with SQL Server and SQL Databases it will be great for them to see how it works in the cloud. As an alternative you could explore Azure Storage, using Table Storage, Blob Storage or
    the new Document Database features.
    >>Azure enforces a firewall that prevents direct external access to the database server. You can add a firewall rule allowing external access, but the rules only support connecting from a fixed IP address because you have to specify the numeric IP
    from which connection will be allowed.
    You can specify ranges here, so you could cover a range of IP addresses. You can even specify 0.0.0.0 to 255.255.255.255 and allow all IP addresses, this could be an option if you don't know where the students will be connecting from, and you are using a
    database for the exercise where you don't care too much about the security.
    When I have run classes I typically use an IP address range, for example XXX.YYY.ZZZ.0 to XXX.YYY.ZZZ.255 if the students are accessing from the same classroom, and the external IP address may vary. You may find that they all have the same external IP address
    if they are on the same internal network.
    Also, with many students accessing the same database, you may get throttling if they place a lot of load on it. This is cool, as you can also teach them about transient fault handling and resource throttling :-).
    Regards,
    Alan
    Free e-book: Windows Azure Service Bus Developer Guide.

  • I cannot connect to my basic SQL server from Visual Studio Ultimate 2013? Error 40 - Cannot establish connection

    I just started learning ASP.NET through a book, and it asks to connect to "your" SQL server and explore a .mdf file. I've been trying to install SQL, but I only just now got a working installation, and even then it won't let me install the Management
    Software. Whenever I try to connect, I get this error: http://puu.sh/7F2JY.png
    This is exactly what I do to connect:
    1) Open project
    2) Navigate to the Server Explorer
    3) Click on connect to database
    4) In this menu, I can see me Machine name on the top part, which I think means that it's picking up my server runningh
    5) On the bottom, it wants me to enter a database name. I think this may be my problem, as I have no idea what to do here.
    Also, when I double click on the database file, I get this errpr (52): http://puu.sh/7F2Yw.png
    I really don't know what to do here, so post any tips down below

    Hi,
    Did you choose the correct Server name? It should be the machine name where you installed SQL Server on.
    Is it empty when you open select or enter database name drop box in the Add connect dialog box in the Visual Studio 2013?
    “Update: I re-installed, and then used both installers. Now I have the Server Management tools, but I still cannot connect.”
    The screenshots indicates that the SQL Server is not accessible.
    Do you mean that you are not able to connect SQL Server by using SQL Server Management Studio?
    If so, make sure that SQL Server Services is started.
    Please check out the following articles for details:
    How to: Start an Instance of SQL Server (SQL Server Configuration Manager)
    http://technet.microsoft.com/en-us/library/ms190699(v=sql.105).aspx
    Connect to Any SQL Server Component from SQL Server Management Studio
    http://technet.microsoft.com/en-us/library/ms173871.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Can I connect Azure SQL Database from Project Siena ?

    Can I connect Azure SQL Database from Project Siena ?
    I want to connect Azure SQL Database of Office 365 SharePoint's Access App from Project Siena.
    Access App's Database is Azure SQL Database.
    and can connect to Excel/PowerBI/etc.
    Access App's Database can connect from specific location / any locations.
    Access App's Database can allow read-only connection / read-write connection.
    I want to create Windows App connected to Access App's Database.
    Regards,
    Yoshihiro Kawabata.

    Hi Yoshihiro,
    Could you share more with us about the high level scenario for what you are trying to accomplish offline? We can discuss further at
    [email protected]
    Once we are done, we will definitely share our findings with the community.
    Thanks!

Maybe you are looking for

  • Saving a file in Photoshop creates a new drive in LR - huh?

    I am completely stumped on this. When in LR2, I right click a raw file and have it edit it in photoshop cs3. The image opens in PS. Now when I save it, either just by closing and having it save it automatically, or if I specify where I want it to be

  • Why doesnt the 7th Gen Ipod have a screen display timer?

    Seriously, I always buy Apple products but I am beginning to think it's more hassle than its worth. I would like to set the time the screen switches off while im playing music instead of always pressing the wake button, I like to browse songs while i

  • Dual Control for GL postings

    Hello My client, a bank, wants to activate Dual control for GL postings (so not only dual control for changing vendor or customer or bank or GL master data using sensitive fields in customizing). How can I realize this requirement? Regards Arjan Dual

  • Risk Analysis for Third party ERP system

    We want to perform offline risk analysis for third party ERP(SRM) system.... We have already GRC system installed with Global rule set for SAP ERP & want to have another ruleset for offline risk analysis. Just would like to have a confirmation for be

  • Business package for Invoicing clerk

    Hi all I would like to know where I can download the Business package for Invoicing clerk for ECC 6. I was looking for it in ContentPortfolio, but I couldnt find any specific package for that. I will be very thankful for any guidance I get on downloa