Connect to Azure Sql DB through WCF Data Service

I am following the tutorial:
http://msdn.microsoft.com/en-us/library/windowsazure/ee621789.aspx;
Connect to Windows Azure SQL Database Through WCF Data service on a
Windows 8 machine running VS2013.  Until starting this tutorial, I have only been using VS for WPF applications. So it might not be properly configured for a web app.
Everything works just fine until I get to the section on Creating the Client Application.  Clicking the Discover button populates the services pane with my service.  When I click on the service in the pane I get the following Add Service Reference
Error:
There was an error downloading 'http://localhost:62778/testDataService.svc/_vti_bin/ListData.svc/$metadata'.
The request failed with the error message: --- , . . .
If I ignore it and click OK it essentially tells me the same thing:
"There was an error downloading metadata from the address.  Please verify that you have entered a valid address."
I am thinking that there is a configuration issue on my machine.  Perhaps something needs to be installed or running, . . .
I have tried doing the same steps with a local SqlExpress database, and get the same problem.  If I try to go directly to the website via the browser:
http://localhost:62778/testDataService.svc
I get a Request Error.
Any suggestions, thoughts on this will be greatly appreciated!
Robotuner

Hi,
From the error message "There was an error downloading 'http://localhost:62778/testDataService.svc/_vti_bin/ListData.svc/$metadata'.", I suspect that you created a folder named _vti_bin, and created wcf data service named ListData, in my test
application, from my experience, you issue may be caused by "$metadata", can you give further information to me, there was a
wcf data service quick start, hope this will help you.
Best 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.

Similar Messages

  • DB SCHEMA INFO error when connecting to AZURE SQL through OLE DB

    Created a virtual machine in Azure and connected to Azure SQL server. I have been able to access the Azure SQL server through 2014 SQL Server Management Studio. 
    I have connected my program to the Azure SQL through a OLE DB connection. I am able to connect and create a new database through this connection, however when I try to connect to the newly created database, i get the following error: 
     Error creating connection: Not a Market(our product) database: Invalid object name 'db_schema_info'.
    I am not sure what is going on and why this error is showing up. Is it because of the OLE DB connection? The fact that the login mysql.database.windows.net has periods and a login login@mysql? I have had issues with punctuation in the past when connecting
    through OLE DB. Please help me to either find the right code or another work around option. 
    I can connect my program to a local SQL server hosted on the VM the same process as above without any issues. This is not a viable option as I need to connect multiple VMs to the same SQL server. 

    Hi,
    Thanks for posting here.
    Connecting to Microsoft Azure SQL Database by using OLE DB or ADO is not supported on SQL Azure.
    Ref: http://www.connectionstrings.com/sql-azure/
    Microsoft does not announce support for OLE DB connections to Azure and there are limitations. Some required OLE DB schema rowsets are not available from an Azure connection, and some properties that identify features in SQL Server are not adjusted to represent
    SQL Azure limitations. For most common connect/query/update tasks it seems to work fine.
    Provider=SQLNCLI11;Password=myPassword;User ID=[username]@[servername];
    Initial Catalog=databasename;Data Source=tcp:[servername].database.windows.net;
    Ref: http://msdn.microsoft.com/en-us/library/azure/ee336245.aspx
    You can also check
    Connectivity Considerations for SQL Server in Azure Virtual Machines
    Hope this helps you.
    Girish Prajwal

  • WCF Data services remove miliseconds from DateTime when expand

    I get some strange behavior, when using WCF Data Services 5.6. In my case, I have table, with 1 column set with Concurrency=Fixed, and this column hold date time field from database, updated each time when row is edited. In case I just retrieve entity -
    this column has correct value with milliseconds. But if I do mapping - milliseconds are removed.
    Here is a issue at glance :
    ====================================================================
    void Main()
    var b = from p in TABLE1 where p.ID == 100 select p;
    b.Dump();
    Request in this case is : Data.svc/TABLE1(100M) And data returned from service is :
    <d:COL1 m:type="Edm.DateTime">2015-02-16T12:13:52.972</d:COL1>
    ====================================================================
    As you can see , here time is returned with milliseconds - .972 In other case :
    void Main()
    var tmp = from p in TABLE1 where p.ID == 100 select
    new TABLE1()
    ID=p.ID,
    COL1=p.COL1
    var a1 = tmp.ToList();
    a1.Dump();
    Request in this case is : Data.svc/TABLE1(100M)?$select=ID,COL1
    <d:COL1 m:type="Edm.DateTime">2015-02-16T12:13:52</d:COL1>
    ====================================================================
    Time is returned without milliseconds.
    Does anybody have same problem? May be its a bug in the WCF Data services or in the model?

    Ok, seems like I found an answer to this, or at least way to avoid the problem.
    First I traced generated SQL from framework, and I see that in first case, im getting SQL
         SELECT ID, COL1 FROM TABLE1
    and in second case, I got
         SELECT ID, CAST( COL1 AS DATETIME) FROM TABLE1
    which cause the problem.
    Then I tried to update EF to version 6, WCF Data services to version 5.6.3,
    Oracle ODP to latest one, tried to use Oracle managed driver... no any success.
    Then I played little bit with table definition, and I saw that my col1 with type TIMESTAMP in database and DateTime in the model was defined as NOT NULL.
    If I remove this from database definition, I got right value with milliseconds.
    So , may be this is a bug in Oracle driver, but probably this is a bug in the WCF Data Services. At least I found a way to use concurrency in my case with this solution.

  • WCF Data Service from Entity Framework 5 in SharePoint 2013

    not sure which forum is best, so im going to throw it in here.
    I am working on a proof of concept. I want to create a WCF Data Service within sharepoint 2013. not only do i want to do that, i want to use the Entity Framework 5 to expose the data via OData. Now, I have crawled the internet and seen various examples of
    how to create wcf data services and wcf services in sharepoint 2010/2013. and have tried to apply those as needed to create this POC. So.. what I have done so far. 
    MonitoringData.cs
    [BasicHttpBindingServiceMetadataExchangeEndpoint]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    [System.Runtime.InteropServices.Guid("0185abf6-e8b8-42e2-9965-6bb644338077")]
    public class MonitoringData : DataService<MonitoringServiceEntities>
    // This method is called only once to initialize service-wide policies.
    public static void InitializeService(DataServiceConfiguration config)
    // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
    // Examples:
    config.SetEntitySetAccessRule("*", EntitySetRights.AllWrite);
    config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
    config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
    MonitoringData.svc:
    <%@ServiceHost Language="C#" Debug="true"
    Service="$SharePoint.Type.0185abf6-e8b8-42e2-9965-6bb644338077.AssemblyQualifiedName$"
    Factory="Microsoft.SharePoint.Client.Services.MultipleBaseAddressDataServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    upon deployment, this error when hitting the https://server/_vti_bin/poc/monitoringdata.svc/$metadata
    "The type 'xxxxxxxx', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could
    not be found."
    Breaking out the google-fu, i found that adding the dll to the <compilation> section was needed for the web.config. so i did that. and now i just get a blank screen with no errors.
    so i crack open fiddler. i see the following 
    200 http
    tunnel to
    server:443 0
    401 https
    server /_vti_bin/poc/monitoringdata.svc/$metadata
    16
    401
    https server
    /_vti_bin/poc/monitoringdata.svc/$metadata
    0
    404
    https server
    /_vti_bin/poc/monitoringdata.svc/$metadata
    0
    best i can see is that im either not authorized, and its returning null (which shouldnt be the case) or something is just busted.
    The goal is to use ntml auth and https to connect to this service. any ideas?

    One thing I found was that it's never worth the trouble to place the WCF service in a web site running SharePoint, it's better to place it in a dedicated web site, as described in this article:
    http://sharepointdragons.com/2011/10/07/parallel-programming-in-sharepoint-2010-the-back-to-the-future-pattern/
    It's usually too much work to get the web.config settings right because of the settings it inherits from its parents.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com
    I'll say that it is one solution to move the WCF Service outside of sharepoint. but my "1000 mile" requirements makes this a necessity. 
    To broaden the scope of what I am doing, I have a custom SharePoint Service Application. this custom application has a proxy that used a restful interface. Now, with all the methods i will have to write (over 100, x3 for all of the "proxy to a proxy" scenarios)
    I wanted to explore the idea of using odata. so i can use the various clients to write their own queries instead of me writing them all and exposing them. especially since its all linq queries to a database underneath. I feel that I am missing some specific
    component to make this work, and its surely due to my incomplete knowledge of WCF or EF.

  • Wcf Data Service fails when more than 8properties  in the 'select=' portion

    Hi:
    I am using WCF Data Service and Oracle
    EF Provider is ODAC11.2 Release 4
    Wcf Data Service fails when more than 8 properties are specified in the 'select=' portion of the URI
    here is my code
    var q = from c in this.ctx.SALESORDER_ITEM
    select new
    c.SORDERDETAILID,
    c.IID,c.DMFLAG,c.OWNERID,c.SKUID,c.SKU_ID,c.TRADENO,c.SOURCEID,c.SORDERID
    excetion:
    InvalidOperationException: An error occurred for this query during batch execution. See the inner exception for details
    The inner exception is null, but the DataServiceClientException states: Value cannot be null Parameter name: value
    the exception is thrown in base.OnStartProcessingRequest(args) method (overridden).
    Here is the call stack as well:
    at System.Data.Services.WebUtil.CheckArgumentNull[T](T value, String parameterName)
    at System.Data.Services.Internal.ProjectedWrapper.set_PropertyNameList(String value)
    at lambda_method(Closure , Shaper )
    at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
    at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
    at System.Data.Services.Internal.ProjectedWrapper.EnumeratorWrapper.MoveNext()
    at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService)
    at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)
    at System.Data.Services.DataService`1.HandleRequest()
    Is there a max number of properties in $select statement
    I think may be it is oracle provider's problem ,but i don't konw how to debug it Can anyone help me
    Any help is greatly appreciated

    I believe the null/empty string issue is unrelated to the 8 column issue, at least for ODP.NET. For example, let's take the original query in the OBE:
    http://.../yoursvcfile.svc/EMPLOYEES?$select=EMPLOYEE_ID,FIRST_NAME,LAST_NAME,SALARY,DEPARTMENT_ID,DEPARTMENT,EMAIL,PHONE_NUMBER,MANAGER_ID
    Let's make all the columns selected not nullable. You can do this with the Oracle Dev Tools. Specifically, PHONE_NUMBER and FIRST_NAME are the only nullable fields. I make them non-nullable and re-run the query and the same error occurs. Thus, these values should never be made null. Moreover, in all 107 rows, none of these row values consist of empty strings anyway.
    Looking into the problem further, WCF DS is calling methods in the System.Data.Services.Internal namespace.
    http://msdn.microsoft.com/en-us/library/system.data.services.internal.aspx
    Specifically, we see your issue when the ProjectedWrapperMany method is called. You will notice that there is ProjectedWrapper0, ProjectedWrapper1...ProjectedWrapper8 methods also present in the same namespace. As soon as the number of columns exceeds 8, ProjectedWrapperMany is called and we see the error. We're going to ask MS to help analyze the issue since this is an .NET-internal method being called.

  • Can't call WCF Data Service from within a WCF Service

    I am trying to query my WCF Data Service from within a WCF Service and I receive a error 404.  However, when I query the data service from my application, it works just fine.  The WCF Service will work just fine if I comment out the Data Service
    query request. 
    How do I get a WCF Service and a WCF Data Service to play nice?

    Hi,
    For this situation, first you could try to create the wcf data service and run it then consume the data service within your application by adding service reference.
    Here is an example for creating and consuming WCF Data service in console application, and for consuming the service in wcf service, you could just follow the same steps as the console application does.
    http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/introduction-to-wcf-data-service-and-odata/
    Regards

  • Working example of WCF Data Services inside Layouts or ISAPI

    I have been struggling for hours getting WCF data services to work inside SP2013 Layouts or _VTI_BIN. I create a hello world WCF service like so...
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public sealed class SampleService : ISampleService
    public string SampleServiceCall(string SampleValue) { return "Success"; }
    and create a .svc file like so
    <%@ServiceHost language= "C#" Factory= "Microsoft.SharePoint.Client.Services.MultipleBaseAddressDataServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Service= "SharePoint.WCFService.Sample.Code.SampleService" %>
    and everything works great inside Layouts and _VTI_BIN. I change the SampleService to this...
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public sealed class SampleService : DataService<WSS_ContentEntities>
    public string SampleServiceCall(string SampleValue) { return "Success"; }
    // This method is called only once to initialize service-wide policies.
    public static void InitializeService(DataServiceConfiguration config)
    // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
    // Examples:
    // config.SetEntitySetAccessRule("MyEntityset", EntitySetRights.AllRead);
    // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
    config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
    and I get the error 
    The type 'SharePoint.WCFService.Sample.Code.SampleService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations
    could not be found.
    Its like inheriting from DataService causes a .net dll loading problem, it cant seem to find my dll anymore...

    Hi,
    Seems that you want to create a WCF Data Service, then I would suggest you follow the link below about how to create WCF Data Services, you can reference the SharePoint Object
    Model dlls if your need in your project:
    http://www.codeproject.com/Articles/572417/AplusBeginner-splusTutorialplusforplusCreatingpl
    If there are still any questions about WCF Data Services, I would suggest you open another thread in Visual C# forum for more confirmed answers:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=csharpgeneral
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • WCF Data Service Template Missing in Visual Studio 2013

    I've installed WCF Data Service 5.6.3 but I still can't see the template when I try to add a new item. I can see the template in VS 2010 but not 2013.

    Hi,
    In which kind of project did you create WCF Data Service? It doesn't support some kinds of project.
    Make sure you've installed it correctly. You could try to install it from Nuget.
    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 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.

  • 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.

  • 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

  • Error while connecting oracle11g to sql server through transparent gateway

    Hello
    i'm facing this errors when i try to connect oracle 11g to sql server through transparent gateway:
    http://www.freeimagehosting.net/newuploads/d4454.jpg
    the directory for my db is : C:\oracle\product\11.1.0\db1
    and for the gateway: C:\oracle\product\11.1.0\dg4msql
    the configurations i used:
    gateway :
    tnsnames.ora:
    dg4msql =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=Kinda-PC)(PORT=1522))
    (CONNECT_DATA=(SID=dg4msql))
    (HS=OK)
    listener.ora:
    GATELIST =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Kinda-PC)(PORT = 1522))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = dg4msql)
    (SID_NAME = dg4msql)
    (ORACLE_HOME = C:\oracle\product\11.1.0\dg4msql)
    and for the oracle database :
    listener.ora
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = Kinda-PC)(PORT = 1521))
    tnsnames.ora:
    DB1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Kinda-PC)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = db1)
    gateway =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=Kinda-PC)(PORT=1522))
    (CONNECT_DATA=(SID=dg4msql)
    (HS=OK)
    thanks :)
    Edited by: 903043 on Dec 18, 2011 6:18 AM

    Did you go through the various steps in the doc?
    There is a gateway specific forum below;
    Heterogeneous Connectivity
    Cheers
    David

  • 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

  • Connect to Azure SQL DB with Security Enabled Access required using SSMS

    I'm looking to connect to an Azure SQL DB with Security Enabled Access required using SQL Server Management Studio 2014. I have tried checking off "Encrypt connection", but still errors out with "Cannot open database 'db name' on server 'hostname'
    requested by the login. Access to the database is only allowed using a security-enabled connection string."
    Thanks,
    Scott

    Hi Scott,
    Sorry, I missunderstood your initial question and the documentation I referenced is not updated appropriately. You have to change the connection string to <server-name>.database.secure.windows.net when you enable the security/auditing features.
    Documentation for this can be found
    here
    Thanks,
    Jan

Maybe you are looking for