设为首页 收藏本站
查看: 1042|回复: 0

[经验分享] 部署Skype for Business Server 2015 数据库SQL 高可用AlwayOn

[复制链接]

尚未签到

发表于 2018-10-23 06:17:22 | 显示全部楼层 |阅读模式
  原文链接:http://blogs.technet.com/b/uclobby/archive/2015/05/08/deploying-sql-server-alwayson-availability-group-for-skype-for-business-server-2015.aspx
  Deploying SQL Server AlwaysOn Availability Group for Skype for Business Server 2015
  In Lync Server 2013, there were requests regarding an>SQL Mirroring for SQL Server High Availability. This was>SQL Mirroring was marked as a feature to be removed in future SQL Server versions:
  This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use AlwaysOn Availability Groups instead.
  in SQL Server 2014 - Database Mirroring (SQL Server) - https://msdn.microsoft.com/en-us/library/ms189852.aspx
  In Lync Server 2013, it was common to have SQL Server High Availability using SQL Mirroring. The reason for this was that Topology Builder did all the hard work for us. Another supported scenario was to use SQL failover clustering, but in this case we need to manually deploy it:
  Database software support in Lync Server 2013
  https://technet.microsoft.com/en-us/library/gg398990.aspx
  The good news is Skype for Business Server 2015 comes with AlwaysOn Availability Groups:
DSC0000.jpg

  Note: AlwaysOn Availability Groups requires SQL Server 2012/2014 Enterprise Edition.
  For other supported scenarios, check the following:
  Back End Server high availability in Skype for Business Server
  https://technet.microsoft.com/en-us/library/jj205248.aspx
  To deploy AlwaysOn Availability Groups for Skype for Business Server 2015, we need to follow specific steps. In this tutorial, we consider a lab environment with one Front End server and two SQL Server 2014 Enterprise Edition servers, which is a new environment without any previous Lync Server/OCS deployments.
  Let's start by installing and configuring the clustering service on both SQL Servers (SQL01 andSQL02). We can add new features by using the following PowerShell cmdlet:
  Add-WindowsFeature Net-Framework-Core, Failover-Clustering, RSAT-Clustering-Mgmt,RSAT-Clustering-PowerShell -Source d:\sources\sxs
  Note: The reason to use the source switch is that Windows Server 2012 R2 doesn’t install the source files. So, if your server doesn’t have internet access, you need to specify the path. In this case, the DVD is D:
DSC0001.jpg

  Now that we have both servers with the necessary Windows Features, we can create the cluster. Before creating the cluster, we should test the configuration:
  Test-Cluster -Node sql01,sql02
  https://technet.microsoft.com/en-us/library/hh847274.aspx
DSC0002.jpg

  In a lab environment, these warnings can be ignored, but in a production environment we need to check them before continue.
  The Test-Cluster cmdlet will generate a Failover Cluster Validation Report:
DSC0003.jpg

  After the test, we can create the cluster. For that, we can also use a PowerShell cmdlet. Since we don’t have DHCP in our lab subnet, we need a valid IP Address in the SQL Servers subnet:
  New-Cluster -Name sqlcluster -Node sql01,sql02 -NoStorage -StaticAddress 172.20.15.8
  https://technet.microsoft.com/en-us/library/hh847246.aspx
DSC0004.jpg

  The New-Cluster will generate a Create Cluster report:
DSC0005.jpg

  Now that we have the cluster with basic configuration, we can proceed and install SQL Server 2014 on both servers:
DSC0006.jpg

  InInstance Features select at least Database Engine Services:
DSC0007.jpg

  We can use Default instance for both servers:
DSC0008.jpg

  Or change it to a different name. If you change it to a Named Instance, make sure both servers use the same instance name:
DSC0009.jpg

  In Service Accounts, change the Account Name to a custom service account and use it on both SQL Servers:
DSC00010.jpg

  After completing the installation, we need to enable AlwaysOn Availability Groups. On each server, we need to open SQL Server Configuration Manager, then right click onSQL Server Service and openProperties:
DSC00011.jpg

  Select the AlwaysOn High Availability tab and tick Enable AlwaysOn Availability Groups:
DSC00012.jpg

  For the changes to be applied, we need to restart SQL Server Service:
DSC00013.jpg

  Select SQL Server Service, then click on theRestart service icon:
DSC00014.jpg

  An additional step is to create a DNS A record for sqlpool.halo.lab. This is our Availability Group Listener FQDN:
DSC00015.jpg

  In the Skype for Business Server 2015 Topology Builder, we add a new SQL Server Store with the following configuration:
DSC00016.jpg

  Notice that we use the SQL01 server FQDN. This is normal and we will change it later on.
  Now we publish the topology:
DSC00017.jpg

  In SQL Server Management Studio, we can check that the Skype for Business Server 2015 related databases were successfully created in SQL01:
DSC00018.jpg

  To create a new Availability Group, right click AlwaysOn High Availability and open New Availability Group Wizard…:
DSC00019.jpg

  Fill the Availability Group name:
DSC00020.jpg

  The wizard will check for prerequisites and will let us know that, before we proceed, the database recovery needs to be changed to full and also perform a full backup:
DSC00021.jpg

  To make things easier, we can use the following PowerShell SQL cmdlets:
  Back End databases:
  Invoke-Sqlcmd -Query "ALTER DATABASE [cpsdyn] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Invoke-Sqlcmd -Query "ALTER DATABASE [rgsconfig] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Invoke-Sqlcmd -Query "ALTER DATABASE [rgsdyn] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Invoke-Sqlcmd -Query "ALTER DATABASE [rtcab] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Invoke-Sqlcmd -Query "ALTER DATABASE [rtcshared] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Invoke-Sqlcmd -Query "ALTER DATABASE [rtcxds] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database cpsdyn
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database rgsconfig
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database rgsdyn
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database rtcab
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database rtcshared
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database rtcxds
  CMS Databases:
  Invoke-Sqlcmd -Query "ALTER DATABASE [xds] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Invoke-Sqlcmd -Query "ALTER DATABASE [lis] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database xds
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database lis
  Monitoring Databases:
  Invoke-Sqlcmd -Query "ALTER DATABASE [LcsCDR] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Invoke-Sqlcmd -Query "ALTER DATABASE [QoEMetrics] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database LcsCDR
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database QoEMetrics
  Archiving Database:
  Invoke-Sqlcmd -Query "ALTER DATABASE [LcsLog] SET RECOVERY FULL WITH NO_WAIT;" -ServerInstance "SQL01\S4B_BackEnd"
  Backup-SqlDatabase -ServerInstance SQL01\S4B_BackEnd -Database LcsLog
  Another requirement is that we copy the directory structure to the second SQL server:
  Xcopy C:\CsData \\SQL02\C$\CsData /T /E
  /e   : Copies all subdirectories, even if they are empty. Use /e with the /s and /t command-line options.
  /t   : Copies the subdirectory structure (that is, the tree) only, not files. To copy empty directories, you must include the /e command-line option.
  Xcopy - https://technet.microsoft.com/en-us/library/bb491035.aspx
  Go back to the wizard, click Refresh and select the databases:
DSC00022.jpg

  On the next step, click Add Replica…:
DSC00023.jpg

  Change the server name and connect to the second SQL Server:
DSC00024.jpg

  Select both SQL Instances in the Replicas tab:
DSC00025.jpg

  We also need to create a listener, thus select the Listener tab and then select Create an availability group listener:
DSC00026.jpg

  Note: As mentioned before, we don’t have DHCP on this Lab subnet, so we use a static address (different from the cluster).
  Click Next and specify a temporary file share:
DSC00027.jpg

  The wizard will run additional availability group validation checks:
DSC00028.jpg

  And if everything goes okay, we get the following messages:
DSC00029.jpg

  InAlwaysOn High Availability, we can check if the selected databases were included in the group:
DSC00030.jpg

  Almost done. If we compare Security Logins for both servers, we can notice that some logins are missing from SQL02:
DSC00031.jpg

  To add all the necessary permissions, we need to change the Primary Replica to the second SQL Server, right click on Availability Group and select Failover:
DSC00032.jpg

  In the wizard, click Next:
DSC00033.jpg

  We need to connect to the server:
DSC00034.jpg

  If Failover is successful, we get this:
DSC00035.jpg

  We can see that the Primary Replica is now the second SQL Server:
DSC00036.jpg

  Time to go back to Topology Builder, select SQL Server Store and Edit Properties... :
DSC00037.jpg

  Change the SQL Server FQDN to the second SQL Server:
DSC00038.jpg

  Publish the topology.
  In the Skype for Business Server 2015 server, open the PowerShell and run:
  Install-CsDatabase -Update -ConfiguredDatabases -SqlServerFqdn sqlpool.halo.lab -Verbose
DSC00039.jpg

  After completion, the necessary logins are also added to the second SQL server:
DSC00040.jpg

  Finally, let's change SQL Server Store in Topology Builder to the final value:
DSC00041.gif DSC00042.jpg

  After publishing the topology, we now have Skype for Business Server 2015 with an AlwaysOn Availability Group configured.


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-625088-1-1.html 上篇帖子: Microsoft SQL Server 2005 Sp4补丁 中文版(x86、x64) 下篇帖子: redhat 配置vnc server-linux
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表