Installing PI AF with SQL Server 2012 AlwaysOn Availability Group Feature. Version 1.0

Similar documents
PI DataLink MUI Language Pack

PI Web API 2014 R2 Update 1 Release Notes

PI Web Services 2012 SP1 Release Notes

High Availability Administrator Guide. August, 2010

PI for StreamInsight User Guide. Version 1.0

OSIsoft Release Notes

DCOM Configuration Guide. Published April 2010

PI Interface for Yokogawa FAST/TOOLS SCADA. Version x

OSIsoft Release Notes

EASYHA SQL SERVER V1.0

PI Connector for Ping 1.0. User Guide

PI Interface for CSI UCOS. Version x

2016 OSIsoft TechCon. Condition-Based Maintenance with PI AF

PI ProcessBook Add-ins and PI ActiveView, Making them work together January 2009

PI Asset Connector for Emerson DeltaV

PI Interface for Honeywell TotalPlant Batch. Version x

PI ProcessBook 2012 User Guide

PI Interface Configuration Utility. Version

Release Notes PI OLEDB Version

PI Interface for Measurex MXO. Version x

PI OPC DA Server User Guide

SQL AlwaysOn - Skype for Business

RtReports Template Reference Version 3.2

PI Integrator for Business Analytics User Guide

DOWNLOAD PDF SQL SERVER 2012 STEP BY STEP

Release Notes Ping Interface OSIsoft, Inc. All rights reserved

PI Interface for Emerson DeltaV Batch. Version x

PI SQC User Guide. Version 3.2

PI AMI Interface for Itron OpenWay Collection Engine. Version x

PI Event Frame Generator (PIEFGen) Version User Guide

WANSyncHA Microsoft Exchange Server. Operations Guide

Introducing OSIsoft. Presented by Zsolt Oros, Regional Manager DACH & EE

StarWind Virtual SAN Installing and Configuring SQL Server 2019 (TP) Failover Cluster Instance on Windows Server 2016

Veritas NetBackup for Microsoft SQL Server Administrator's Guide

SQL Server AlwaysOn setup on ObserveIT environment

Are AGs A Good Fit For Your Database? Doug Purnell

PI ProcessBook User Guide

StarWind Virtual SAN SQL Server HADR using Availability Groups and Failover Cluster Instance

New to PI SDK and AF SDK 2010

StarWind Virtual SAN Installing and Configuring SQL Server 2017 Failover Cluster Instance on Windows Server 2016

Introduction Chapter 1. General Information Chapter 2. Servers Used... 9

Sage X3 Intelligence Financial Reporting. Installation and Upgrade Guide

Quick Start Guide For Ipswitch Failover v9.0.1

IxChariot Endpoint Amazon EC2 Deployment Guide

StarWind Native SAN Configuring HA File Server for SMB NAS

Ryan Adams Blog - Twitter Thanks to our Gold Sponsors

Microsoft SQL AlwaysOn and High Availability

Symantec Protection Center Getting Started Guide. Version 2.0

PI Interface for ACS Prism. Version x

Shavlik Protect. Upgrade Guide

Arcserve Replication and High Availability

PI Manual Logger User Guide Version 2.0 4/14/2006

HR-Lite Database & Web Service Setup Guide

Avoiding the Cost of Confusion: SQL Server Failover Cluster Instances versus Basic Availability Group on Standard Edition

Veritas NetBackup for Enterprise Vault Agent Administrator's Guide

Using VERITAS Volume Replicator for Disaster Recovery of a SQL Server Application Note

StarWind Virtual SAN. Installing and Configuring SQL Server 2014 Failover Cluster Instance on Windows Server 2012 R2. One Stop Virtualization Shop

Copyri g h t 2012 OSIso f t, LLC. 1

Getting Started Tutorial - Eclipse Edition. Sybase Unwired Platform 1.2

Dell Storage Compellent Integration Tools for VMware

DocAve 6 Software Platform Service Pack 1

CA Agile Vision and CA Product Vision. Integration Guide

Embarcadero All-Access Server Installation Guide

PI Server 2010: Satyam Godasi Sr. Developer. Jay Lakumb Product Manager. Denis Vacher Group Lead. Copyright 2010, OSIsoft LLC. All rights reserved.

Upgrade Guide. NovaBACKUP xsp NovaStor. All Rights Reserved.

Installation Manual. Fleet Maintenance Software. Version 6.4

Database Creation & Setup for SQL Server

Cluster and SVM Peering Express Guide

Upgrading the Procura Database

T E KLYNX BACKTRACK V E R S I O N 6 I N S T A L L A T I O N G U I D E

SC-T35/SC-T45/SC-T46/SC-T47 ViewSonic Device Manager User Guide

Configure DHCP for Failover Step-by-Step.

Administrator s Guide. StorageX 7.6

UPGRADE GUIDE. Riverbed SteelStore. Upgrade Guide. Version 3.1 May 2014

Microsoft SQL Server

CA ARCserve Replication and High Availability for Windows

Copyright SolarWinds. All rights reserved worldwide. No part of this document may be reproduced by any means nor modified, decompiled,

HP StorageWorks. EVA Virtualization Adapter administrator guide

StarWind iscsi SAN Software: Virtual Tape Library (Part 1)

Parallels Virtuozzo Containers 4.6 for Windows

Upgrading Your Skills to Windows Server 2016

Microsoft Upgrading Your Skills to Windows Server 2016

Nimsoft Service Desk. Single Sign-On Configuration Guide. [assign the version number for your book]

StarWind Virtual SAN Installation and Configuration of HyperConverged 2 Nodes with Hyper-V Cluster

Microsoft SQL AlwaysOn and High Availability

CA GovernanceMinder. CA IdentityMinder Integration Guide

ThingsPro Software User s Manual

SimpliVity RapidDR Guide

How to deploy a virtual machine on a Granite Datastore

Install and upgrade Qlik Sense. Qlik Sense 3.2 Copyright QlikTech International AB. All rights reserved.

Quick Start SAP Sybase IQ 16.0

Dell Storage Integration Tools for VMware

NexentaStor Storage Replication Adapter User Guide

Administrator s Guide. StorageX 8.0

ThingsPro Software User s Manual

Chime for Lync High Availability Setup

Veritas SaaS Backup for Salesforce

StarWind Virtual SAN Configuring HA Shared Storage for Scale-Out File Servers in Windows Server 2012R2

StoragePoint Advanced Installation Guide

Media Writer. Installation Guide LX-DOC-MW5.1.9-IN-EN-REVB. Version 5.1.9

Transcription:

Installing PI AF with SQL Server 2012 AlwaysOn Availability Group Feature Version 1.0

OSIsoft, LLC 777 Davis St., Suite 250 San Leandro, CA 94577 USA Tel: (01) 510-297-5800 Fax: (01) 510-357-8136 Web: http://www.osisoft.com OSIsoft Australia Perth, Australia OSIsoft Europe GmbH Frankfurt, Germany OSIsoft Asia Pte Ltd. Singapore OSIsoft Canada ULC Montreal & Calgary, Canada OSIsoft, LLC Representative Office Shanghai, People s Republic of China OSIsoft Japan KK Tokyo, Japan OSIsoft Mexico S. De R.L. De C.V. Mexico City, Mexico OSIsoft do Brasil Sistemas Ltda. Sao Paulo, Brazil OSIsoft France EURL Paris, France Copyright: 1992-2013 OSIsoft, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, photocopying, recording, or otherwise, without the prior written permission of OSIsoft, LLC. OSIsoft, the OSIsoft logo and logotype, PI Analytics, PI ProcessBook, PI DataLink, ProcessPoint, PI Asset Framework (PI AF), IT Monitor, MCN Health Monitor, PI System, PI ActiveView, PI ACE, PI AlarmView, PI BatchView, PI Coresight, PI Data Services, PI Manual Logger, PI Event Frames, PI ProfileView, PI WebParts, ProTRAQ, RLINK, RtAnalytics, RtBaseline, RtPortal, RtPM, RtReports and RtWebParts are all trademarks of OSIsoft, LLC. All other trademarks or trade names used herein are the property of their respective owners. U.S. GOVERNMENT RIGHTS Use, duplication or disclosure by the U.S. Government is subject to restrictions set forth in the OSIsoft, LLC license agreement and as provided in DFARS 227.7202, DFARS 252.227-7013, FAR 12.212, FAR 52.227, as applicable. OSIsoft, LLC. Published: 13-September-2013

Contents PI AF and SQL Server AlwaysOn availability groups... 1 Install PI AF before the availability group exists... 1 Prepare the Windows Server failover cluster... 1 SQL Server 2012 requirements... 1 Install PI AF before creating the availability group... 2 Create the availability group... 2 Configure the PI AF service connect string... 4 Install PI AF with an existing availability group... 4 Configure the AF service connect string... 6 Upgrade a PI AF SQL database that is an availability group member... 6

PI AF and SQL Server AlwaysOn availability groups SQL Server 2012 s new AlwaysOn technology improves database high availability. One of its features is the availability group. Availability groups allow multiple databases in a single SQL Server instance to fail over together. SQL Server 2012 s AlwaysOn technology allows for multiple high availability and disaster recovery deployment solutions. While this document does not address the possible deployment solutions, it is important that you know your solution before you begin your PI AF installation. PI AF 2.5 is compatible with SQL Server 2012 s AlwaysOn availability group feature. This document provides instructions for installing PI AF with availability groups. This document describes two installation methods: Installing PI AF before the availability group is created Installing PI AF after the availability group is created. HyperV machines were used to create the necessary environments used to verify the compatibility and determine the installation processes. Note: It is assumed that the reader has a basic understanding of SQL Server 2012 availability groups structure and function. (Refer to http://msdn.microsoft.com/en-us/library/hh510230.aspx for detailed information on availability groups.) Install PI AF before the availability group exists This method of installing PI AF with SQL Server 2012 s availability group feature assumes that there is no existing availability group for the PI AF database, and that the availability group needs to be created after the PI AF server installation. Prepare the Windows Server failover cluster Before you install PI AF with a SQL Server 2012 availability group, you need to create a Windows Server failover cluster (WSFC). As part of creating a Windows Server failover cluster, you need a block of IP addresses assigned to the WSFC that will not be used by other machines; static IP addresses are absolutely necessary. For each machine in the Windows cluster, you need two IP addresses, one for the public network and one for the private network. You may also need shared storage for the WSFC. To consolidate, a single VM can be used for shared storage. The shared storage VM can have multiple hard drives and on each of these drives iscsi drives can be configured and assigned to different target machines to be used for sharing. This shared storage machine will also require two IP addresses (public and private). Finally, an additional IP address is required for the Windows cluster name. SQL Server 2012 requirements A SQL Server 2012 availability group requires a minimum of two SQL Server 2012 machines. The SQL Server database engine services should run under domain accounts for each of the machines that will be included in the availability group. Each machine involved in the availability group must exist within the Windows Server failover cluster. A static IP address must be available for the availability group listener, which is created during the creation of the availability group. The PI AF server needs to reference the availability group listener in the connect string to the PI AF database within the availability group. Before continuing, ensure the SQL Server machines are configured to support AlwaysOn availability groups. On each SQL Server machine to be used in the availability group, open SQL Server 1

Installing PI AF with SQL Server 2012 AlwaysOn Availability Group Feature Configuration Manager. Right-click the SQL Server service and select Properties. Select the AlwaysOn High Availability window. Ensure the AlwaysOn Availability Groups check box is selected. If it is not selected, select it and restart the SQL Server service. Install PI AF before creating the availability group On the SQL Server machine that will be the availability group s primary replica, run the PI AF server setup program, selecting only the PI AF SQL Database and PI AF SQL Script Execution features. As part of the setup procedure, you will need to provide the domain and name of the machine on which the AF Application service feature is to be installed. When the installation is complete, set the PIFD database s Recovery Model to Full. On each of the machines that will serve as a secondary replica in the availability group, run the PI AF server setup program, selecting only the AF SQL Database option without the AF SQL Script Execution option. It is unnecessary to provide the SQL Server name or validate the SQL Server connection. It is also unnecessary to enter the AF Server machine name, if prompted. On a different machine, one that is not in the Windows Server failover cluster, install the PI AF Application service. During the installation, specify the name (and instance, if appropriate) of the SQL Server machine that will be the primary replica of the availability group. Change the AF Application Service to run under a domain account and restart the service. Ensure this domain account belongs to a domain group. On the SQL Server machine that will be the primary replica for the availability group, create a SQL login that is based on the domain group that contains the domain account under which the AF Application service is running. Map the SQL login to the PIFD database, assigning the db_afserver role membership. Note: At this point, you might want to verify your ability to connect from a client machine, through the PI AF server to the PI AF SQL Database and create a database. This ensures your initial security settings are good and that a connection can be made to the PI AF SQL Database server, before creating the availability group. On the SQL Server machine that will be the primary replica of the availability group, make a backup of the PIFD database and its log file. On each of the other SQL Server machines that will be included in the availability group, create a SQL login that is based on the domain group that contains the domain account under which the PI AF Application service is running. These SQL logins do not need to be assigned any role membership at this time. Create a network share. The location of the network share is not important, as long as it can be accessed by each of the SQL Server machines that will belong to the availability group. For the primary replica, the account used to start the Database Engine service must have read and write file-system permissions on the network share. For secondary replicas, the account must have read permission on the network share. This share will be used to restore the PIFD database to each of the secondary replicas. Create the availability group On the SQL Server machine that will serve as the primary replica of the availability group, open the SQL Server Management tool and connect to the instance that will host the availability group. 1. Locate and expand the AlwaysOn High Availability folder. 2

Install PI AF before the availability group exists 2. Locate and expand the Availability Groups folder under the AlwaysOn Availability folder. 3. Right-click the Availability Groups folder and select New Availability Group Wizard. The New Availability Group Introduction window displays. The Introduction window provides an overview of the availability group creation process. This window can be bypassed in the future by selecting the Do not show this page again check box. Note: Refer to http://msdn.microsoft.com/en-us/library/hh403415.aspx for additional information on using the New Availability Group wizard. 4. Click Next to continue. The Specify Availability Group Name window displays. Enter the Availability Group Name and click Next to continue. The Select Databases window displays with a list of the databases installed in the instance of SQL Server in which you are creating the availability group. 5. Select the check boxes for the databases you want to include in the availability group. You can choose one, some or all of the databases, as long as they meet the prerequisites. On the Select Databases window, the status messages for each of the listed databases are included. These messages are important to review, as they let you know why a database cannot be selected. For example, a database might already belong to an existing availability group, or a database might not meet the prerequisites for being added to an availability group. Review the status(es) of the database(s) you want to add to the new availability group. Before you move forward, ensure any issues have been corrected. You do not need to close the New Availability Group wizard to make corrections; leave it open while you return to SQL Server Management Studio to make corrections. After the corrections have been made, return to the New Availability Group wizard and click the Refresh button. When the database(s) status(es) indicate(s) Meets prerequisites, you can continue with the process. 6. After you have selected the database(s) to include in the new availability group, click Next to continue. The Specify Replicas window displays. On the Replicas tab, add each SQL Server instance that will be a secondary replica in this availability group. For each added secondary replica, configure its Automatic Failover, Synchronous Commit, and Readable Secondary settings. Refer to http://msdn.microsoft.com/enus/library/hh213088.aspx#replicastab for additional information. On the Endpoints tab, ensure the SQL Server Service Account for each replica is set to the correct domain\user account. Everything else can be left as is. Refer to http://msdn.microsoft.com/enus/library/hh213088.aspx#endpointstab for additional information. On the Backup Preferences tab, select the Prefer Secondary option as the location where backups will occur, or another selection if you prefer a different option. Refer to http://msdn.microsoft.com/en-us/library/hh213088.aspx#backuppreferencestab for additional information. On the Listener tab, you can choose one of two options, either Create an availability group listener now or Create an availability group listener later. If you select Create an availability group listener now, enter the Listener DNS Name, the Port number (literature indicates that is acceptable port 1433 is acceptable), and set the Network Mode as Static IP. (PI AF was tested using a static IP Address.) Click the Add button. On the Add IP Address window, select the correct Subnet and enter 3

Installing PI AF with SQL Server 2012 AlwaysOn Availability Group Feature the static IP address as the IPv4 Address. Refer to http://msdn.microsoft.com/enus/library/hh213088.aspx#listener for additional information. 7. Click Next to continue. The Select Initial Data Synchronization window displays. 8. Select the Full option. 9. Enter, or browse to and select, the network share location created just before the availability group creation process started. 10. Click Next to continue. The Validation window displays. 11. For any results other than Success, click the Status link for the result and review the details. Some issues can be resolved before continuing and the validation can be re-run. Some issues might need to be resolved manually after the availability group is created. 12. When you are satisfied with the validation results, click Next. The Summary window appears with the choices made within the wizard. 13. Review the choices and determine if they require changes. Click Previous to move back through the wizard to make any required changes. 14. Click Finish to create the availability group. The Results window displays. 15. For any steps that result in an error, click the error link for the result and review the details. It might be necessary to manually complete the configuration of the availability group if there are failed steps. 16. If there are no errors, or all errors have been reviewed, click Close to exit the wizard. Configure the PI AF service connect string On the AF Server machine, edit the PI AF Application Service connect string in the AFService.exe.config file in the..\pipc\af folder. Change the server portion of the connect string so that it is directed at the availability group listener and the availability group listener s port that you defined in Create the availability group (page 2). Example: <add key="connectstring" value="persist Security Info=False;Integrated Security=SSPI;server=ListenerName,Port;database=PIFD;Application Name=AF Application Server;" /> Restart the PI AF service. The process of installing PI AF to a new availability group is complete. Install PI AF with an existing availability group On the SQL Server machine that is the availability group s primary replica, run the PI AF server setup program, selecting only the AF SQL Database and AF SQL Script Execution features. As part of the setup procedure, you will need to provide the domain and name of the machine on which the PI AF Application Service feature is to be installed. When the installation is complete, set the PIFD database s Recovery Model to Full. On each of the machines that are secondary replicas in the availability group, run the PI AF server setup program, selecting only the AF SQL Database option without the AF SQL Script Execution option. It is unnecessary to provide the SQL Server name or validate the SQL Server connection. It is also unnecessary to enter the AF Server machine name, if prompted. 4

Install PI AF with an existing availability group On a different machine, one that is not in the Windows Server failover cluster, install the PI AF Application service. During the installation, specify the name (and instance, if appropriate) of the SQL Server machine that is the primary replica of the availability group. Change the PI AF Application service to run under a domain account and restart the service. Ensure this domain account belongs to a domain group. On the SQL Server machine that is the availability group s primary replica, create a SQL login that is based on the domain group that contains the domain account under which the AF Application service is running. Map the SQL login to the PIFD database, assigning the db_afserver role membership. Note: At this point, you may want to verify your ability to connect from a client machine, through the PI AF server to the PI AF SQL Database and create a database. This ensures your initial security settings are good and that a connection can be made to the PI AF SQL Database Server, before creating the availability group. On the SQL Server machine that is the availability group s primary replica, make a backup of the PIFD database and its log file. On each of the other SQL Server machines that are included in the availability group, create a SQL login that is based on the domain group that contains the domain account under which the AF Application service is running. These SQL logins do not need to be assigned any role membership. On the primary replica machine, back up the PIFD database and log file. On each of the secondary replicas, restore the backups of the PIFD database and log file at one time, using No Recovery, leaving the database in the Restoring mode. Then add the database to the availability group on the primary, using the Join Only option. 1. On the primary replica machine, right-click the availability group and select Add Database. The Add Database to Availability Group wizard opens to the Select Databases window. 2. A list of databases in the current SQL Server instance is included. For each database, a Status is displayed that indicates whether the database meets the prerequisites to be added to the availability group (or not, or if the database is already in the availability group). If the database you want to add does not meet the prerequisites, click its Status link and review the details. Leave the Add Database to Availability Group wizard open and make any required corrections. Return to the wizard and click the Refresh button. When the database Status is Meets prerequisites, select the check box for the database and click Next. 3. In the Select Data Synchronization window, select the Join Only option and click Next. 4. In the Connect to Replicas window, click the Connect All button. Enter the required credentials to connect to the replicas when prompted. 5. Click Next to open the Validation window. Most of the validation checks will be skipped, due to the type of Data Synchronization selected. For any results that show a Result other than Success, click the result s Status link and review the details. 6. If there are any errors, make the required corrections and click the Re-run Validation button. Continue until all errors have been corrected. 7. Click Next. In the Summary window, verify that the choices you made are accurate. 8. Click the Script button, if you want to save and/or copy the SQL script required to add the PIFD database to the availability group. 5

Installing PI AF with SQL Server 2012 AlwaysOn Availability Group Feature 9. Click Finish to add the PIFD database to the availability group. The Results window appears. Configure the AF service connect string On the AF Server machine, edit the PI AF Application Service connect string in the AFService.exe.config file in the..\pipc\af folder. Change the server portion of the connect string so that it is directed at the availability group listener and the availability group listener s port. Both were defined in Create the availability group (page 2). Example: <add key="connectstring" value="persist Security Info=False;Integrated Security=SSPI;server=ListenerName,Port;database=PIFD;Application Name=AF Application Server;" /> Restart the PI AF Service. The process of installing PI AF to an existing availability group is now complete. Upgrade a PI AF SQL database that is an availability group member Before beginning the upgrade, you should notify your PI AF users that the system will be unavailable for a short period of time. When you are ready to initiate the upgrade, and you are sure all transactions have completed, stop and disable the PI AF service on the PI AF Application server machine. On the SQL Server machine that is the availability group s primary replica, run the PI AF server setup program, selecting only the AF SQL Database and AF SQL Script Execution features. It is unnecessary to enter the AF Server machine name, if prompted; you can leave it blank. Once the upgrade is complete on the primary replica, the data and schema updates will be replicated to the databases on the secondary replica machines. On each of the secondary replica machines in the availability group, run the PI AF server setup program, selecting only the AF SQL Database option without the AF SQL Script Execution option. It is unnecessary to provide the SQL Server name or validate the SQL Server connection. It is also unnecessary to enter the AF Server machine name, if prompted. This ensures that any required software is installed on each of the secondary replica machines. On the PI AF Application server machine, run the PI AF server setup program, upgrading the PI AF Application server. When the upgrade is complete, verify the PI AF service is still running under the correct domain account. You can then enable and start the PI AF Service. The upgrade of PI AF server is now complete. 6