Deploy the database to Azure SQL
PREREQUISITES: You must use SQL Server Management Studio 2014 with Cumulative update package 6.
Before you publish your project to Azure Web Apps, you must upload your project's database to Azure SQL Database.
Perform the following:
- Open your SQL Server Management Studio.
- In the context menu of your database, click Tasks » Deploy Database to Windows Azure SQL Database.
- In Deployment Settings, enter a name for the database and click Connect.
For more information about connectivity problems, see Troubleshoot Microsoft Azure SQL Database connectivity.
- In Server name, enter the 10-character server name, followed by .database.windows.net
- In Authentication, select SQL Server Authentication.
- Enter the administrator login name and password that you created when provisioning the SQL Database logical server.
- Click Options.
- Under Connection Properties, in Connect to database, enter master
When you want to create a database on the Azure SQL Database server, you must connect to the master database.
- Click Connect » Next » Finish.
- Modify your connection string.
- Go to https://manage.windowsazure.com.
- In the Quick Glance section of the Dashboard tab, navigate to Databases » <Your database> » Show connection strings.
- Use the given template to change the connection string in your project’s
DataConfig.config
.
The format of the connection string element is the following:
<add dbType="SqlAzure" name="Sitefinity" connectionString="Server=<serverName>.database.windows.net;User ID=<userName>@<serverName>;Password=<password>;Database=<databaseName>; Trusted_Connection=False;Encrypt=True" providerName="System.Data.SqlClient" />
NOTE: For Sitefinity CMS to function normally with SQL Azure, set the dbType
attribute to SqlAzure.
Troubleshooting
If you receive an error similar to: Error SQL71564: The element User: [NT AUTHORITY\NETWORK SERVICE] has property AuthenticationType set to a value that is not supported in Microsoft Azure SQL Database v12 (Preview)…, remove all users that rely on local login from the database before starting the deployment procedure.