Connecting to SQL Azure with ADO.NET
An application communicates with SQL Azure using the same tabular data stream (TDS) format used in communicating with Microsoft SQL Server. This simplifies the task of migrating from Microsoft SQL Server to SQL Azure as an application need only change to the appropriate connection string to use SQL Azure.
When a SQL Azure server is provisioned, it is assigned a fully qualified DNS name of the form: SERVER_NAME.database.windows.net
. A database name must be provided when the SQL Azure database is created. SQL Azure logins are created in precisely the same way they are in Microsoft SQL Server. It is conventional to specify SQL Azure logins in the form LOGIN@SERVER_NAME
. All communication with SQL Azure is over an encrypted channel and it is recommended that the server certificate used with this channel not be trusted. This leads to a connection string like:
Data Source=SERVER_NAME.database.windows.net;Initial Catalog=DATABASE_NAME; User ID=LOGIN@SERVER_NAME...