Session 3: Configure SQL Server Infrastructure
Applies To: Windows Azure
This article is the third of six that explain how to deploy a SharePoint farm on Windows Azure Infrastructure Services. For general information about this series, see Installing SharePoint 2013 on Windows Azure Infrastructure Services. To go to the previous session, see Session 2: Configure Domain Controllers. To go to the next session, see Session 4: Configuring a SharePoint Machine.
Configure a Virtual Machine with SQL Server 2012
This procedure is executed on both virtual machines that host SQL Server. One VM contains the primary database replica of an availability group. The second VM contains the secondary backup replica. The backup is provided to ensure high-availability. For more information, see Farm infrastructure servers.
By default, only the user account that was created with the Virtual Machine (in the Azure Management portal) can access the SQL Server default instance. But the Virtual Machine must be joined to the domain in order to add a domain user account to the list of log ins. Therefore, you must first join the machine to the domain, then log on as the original user in order to access the SQL Server instance.
From the Azure Management portal, attach a 50-GB empty disk to the VM that hosts SQL Server. For more information, see Creating and Attaching and Empty Disks to a Virtual Machine.
Connect to the VM using the user name and password created with the machine. Use the format <machineName>\<username>. By default, the user is a member of the Administrators group. For more information, see Connecting to a VM after its creation.
Use the Disk Management tool to partition the disk and assign it the letter F:.
On the new partition, create three folders named Data, Log, and Backup.
Join the VM to the domain. For instructions, see Joining a Virtual Machine to a domain.
When prompted for a user that has permission to join the domain, specify a member of the Domain Admins group, such as sp_install. Use the format: sp_install@<domainName>.com.
Restart the machine to complete the join.
Connect to the VM using the user name and password created with the machine. Use the format: <machineName>.clouapp.net\<username>. (At this point, only the user created with the machine has permission to log onto the SQL Server instance.)
On the Start menu, type SQL Server Management Studio and open the tool.
Connect to the SQL Server default instance using the Windows account.
Right-click the top node—the default instance named after the machine—and click Properties.
In the Server Properties window, click Database Settings.
Locate the Database default locations and set the values for Data, Log, and Backup to the newly created folders. Only new databases use these locations.
Click the OK to close the window.
In the left pane, expand the Security folder.
Right-click Logins, then click New login.
In the Login-New dialog, type sp_farm_db. Use the format: sp_farm_db@<domainName>.com
After the name resolves, click OK to close the dialog.
In the left pane, click Server Roles, and select the checkbox for Sysadmin role. Click OK to close the dialog.
Right-click Logins and click New Login.
In the Login name box, type NT Authority\System and click OK.
In Object Explorer, right-click NT AUTHORITY\System and click Properties.
In the Securables page, for the local server, select Grant for the following permissions and click OK.
Alter any availability group
View server state
- Alter any availability group
Click OK and close the SQL Server Management Studio.
SQL Server requires a port that clients use to access the database server. It also needs a port to manage the high-availability group. By default, the client port number is 1433, and the high availability port is 5022. The Windows Firewall, however, blocks both ports. To open the ports:
In the Start menu, type Windows firewall with advanced security.
Click Inbound Rules.
On the Action pane, click New Rule.
On the Rule Type page, select Program, and click Next.
In the Program page, select This program path and type %ProgramFiles%\Microsoft SQL Server\MSSQL\Binn\sqlservr.exe in the text box. Then, click Next.
On the Action page, keep the default ("Allow the connection") and click Next.
On the Profile page, accept the defaults, and click Next.
On the Name page, type SQL Server ports 1433 and 5022, and click Finish.
For more information, see Configure a Windows Firewall for Database Engine Access
- In the Start menu, type Windows firewall with advanced security.
To continue the deployment, see Session 4: Configuring a SharePoint Machine.
Other ResourcesProvisioning a SQL Server Virtual Machine on Windows Azure