
This is a continuation of a series of articles on the creation of a SharePoint 2013 farm in Windows Azure. The first chapters can be found at the following links:
This article will look at how to add a SQL Server 2012 domain and further steps to configure it.
Create a virtual machine with SQL Server 2012
In the previous article, we looked at creating a virtual machine through a portal; in this we will limit ourselves to creation through PowerShell.
# Azure Get-AzureSubscription | Select SubscriptionName $subscriptionName = "-" $storageAccount = "--" Select-AzureSubscription $subscriptionName Set-AzureSubscription $subscriptionName -CurrentStorageAccount $storageAccount # $serviceName = "SP2013-Service" $serviceLabel = "SP2013-Service" $serviceDesc = "Cloud Service for SharePoint 2013 Farm" # Get-AzureVMImage | Select ImageName $sqlimage = 'MSFT__Sql-Server-11EVAL-11.0.2215.0-08022012-en-us-30GB.vhd' $vnetname = 'SP2013-VNET' $subnetName = 'SP2013Farm-Subnet' $ag = 'SP2013-AG' # IP $primaryDNS = '192.168.1.4' # $avsetsql = 'avsetsql' # $domain = 'contoso' $joindom = 'contoso.com' $domuser = 'administrator' $dompwd = 'pass@word1' $advmou = 'OU=AzureVMs,DC=contoso,DC=com' # SQL Server1 $size = "ExtraSmall" $spsql1 = New-AzureVMConfig -Name 'SP-SQL1' -AvailabilitySetName $avsetsql -ImageName $sqlimage -InstanceSize $size | Add-AzureProvisioningConfig -WindowsDomain -Password $dompwd -Domain $domain -DomainUserName $domuser -DomainPassword $dompwd -MachineObjectOU $advmou -JoinDomain $joindom | Add-AzureDataDisk -CreateNew -DiskSizeInGB 200 -DiskLabel 'data' -LUN 0 | Set-AzureSubnet $subnetName $dns1 = New-AzureDns -Name 'dns1' -IPAddress $primaryDNS New-AzureVM -ServiceName $serviceName -ServiceLabel $serviceLabel ` -ServiceDescription $serviceDesc ` -AffinityGroup $ag -VNetName $vnetname -DnsSettings $dns1 ` -VMs $spsql1
Once the preparation is complete, connect to the virtual machine using Remote Desktop Services and make sure that it was automatically joined to your domain.
If not, make the connection manually.
Customize drives
The script above adds a disk with data of 200 GB in size.
Connect this disk to the operating system as described in the previous article.
Next, let's proceed with setting the default location for the database. To do this, start SQL Server Management Studio, right-click on the server name, select
Properties and
Database Settings .

Select new drives for folders with data, logs and backups.

And press
O K.')
Updating network settings in SQL Server
Configure protocols for SQL Server and ports in Windows Firewall.
We configure protocols
Start the
SQL Server Configuration Manager .
Expand the
SQL Server Network Configuration node and select the
Protocols for MSSQLServer protocol.

Make sure that shared memory, named pipes, and TCP / IP are enabled.
Configure port
Start your firewall with advanced security.
Create a new rule for incoming connections.

In the first step you need to select the type
Port
And specify port 1433

Select
Allow all connections
On the next page, leave the default values, and then specify the name of the rule, for example,
SQLServerRule .So we prepared SQL Server 2012 for the SharePoint 2013 farm.