SQL Azure connection strings

.NET Framework Data Provider for SQL Server

  • Standard

    Server=tcp:[serverName].database.windows.net;Database=myDataBase;
    User ID
    =[LoginForDb]@[serverName];Password=myPassword;Trusted_Connection=False;
    Encrypt
    =True;

    Use 'username@servername' for the User ID parameter.

  • With MARS enabled

    MARS was enabled in SQL Azure Service Update 2

    Server=tcp:[serverName].database.windows.net;Database=myDataBase;
    User ID
    =[LoginForDb]@[serverName];Password=myPassword;Trusted_Connection=False;
    Encrypt
    =True;MultipleActiveResultSets=True;
Problems connecting?
Get answer in the SQL Azure Q & A forum

SQL Server Native Client 11.0 OLE DB Provider

  • Standard

    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;

SQL Server Native Client 10.0 OLE DB Provider

  • Standard

    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=SQLNCLI10;Password=myPassword;User ID=[username]@[servername];
    Initial Catalog
    =databasename;Data Source=tcp:[servername].database.windows.net;

.NET Framework Data Provider for OLE DB

  • Use an OLE DB provider from .NET

    Provider=any oledb provider's name;OledbKey1=someValue;OledbKey2=someValue;

    See the respective OLEDB provider's connection strings options. The .net OleDbConnection will just pass on the connection string to the specified OLEDB provider. Read more here.

SQL Server Native Client 10.0 ODBC Driver

  • Standard security Azure

    Driver={SQL Server Native Client 10.0};
    Server
    =tcp:[serverName].database.windows.net;Database=myDataBase;
    Uid
    =[LoginForDb]@[serverName];Pwd=myPassword;Encrypt=yes;

    Use 'username@servername' for the User ID parameter. Servername is the servername portion of the server parameter, i e 'myNamedServer' of tcp:myNamedServer.database.windows.net

.NET Framework Data Provider for ODBC

  • Use an ODBC driver from .NET

    Driver={any odbc driver's name};OdbcKey1=someValue;OdbcKey2=someValue;

    See the respective ODBC driver's connection strings options. The .net OdbcConnection will just pass on the connection string to the specified ODBC driver. Read more here.

Q&Aask question »

Articlesread all »

Connect

Articlesread all »

Didn't find your connection string?

Start over from the connection string reference index - or try a search!

In the Q&A forums you can ask your own question and let somebody help you.

The knowledge articles contains solutions and guides.