Windows Azure Pack is able to provide Database as a Service to tenants. This service supports SQL Server in high availability using AlwaysOn. So when a tenant uses the service, the database is automatically placed in an AlwaysOn Availability Group. (AAG). In this topic I will show you how to implement this service.
Requirements
- A working SQL Server cluster using AlwaysOn (cf. this topic)
- A working Windows Azure Pack installation (cf. this topic)
Run this script on each SQL Server node:
sp_configure 'contained database authentication', 1; GO RECONFIGURE; GO
SQL Server extension installation
On each node that hosts admin Windows Azure Pack services, run the Web Platform Installer. Next select Windows Azure Pack: SQL Server Extension and click on Add.
When the configuration webpage is opened, specify your database server settings.
At the end of installation, you should have something as below :
SQL Server group creation
Open your Administrative Console of Windows Azure Pack and navigate to SQL Servers. Navigate to Groups and click on Create a new SQL Server Group. In group type, select High Availability (Always on enabled). Specify a group name and a share to store database backup.
I have created two groups: one called Bronze and the other called Gold.
Add SQL Servers to Windows Azure Pack
Next we have to associate SQL Servers to the groups that we have previously created. So navigate to SQL Servers and select servers. Click on Add a new SQL Server. Specify the group, the AAG listener name, the credentials and size of hosting server.
Repeat the operation to add others SQL Servers.
So in my example I have two groups and two SQL Servers AAG.
Add the service to a hosting plan
Now we have to add the service to a hosting plan. Select a hosting plan and click on Add Service.
Select the SQL Servers service and click on next.
Then click on SQL Servers service to configure it.
Specify the settings regarding your needs and click on ok.
Now the service status should be Active.
Trying the service
To use the service, connect to the tenant portal and click on SQL Server Databases. Then select Add a new database.
Specify a database name and choose an edition.
Specify database credentials and click on ok.
Once the database is created, you can connect to your SQL Server with the management studio and open the AAG dashboard. As you can see below, the database is automatically added to the AAG.
great article, how can I add multiple listeners to the WAP
Hi,
I’m not sure you can add multiple listener to WAP. Why you want multiple listener ?
Romain.