High Availability for PROS Pricing Solution Suite on SQL Server Step-by-step guidance for setting up high availability for the PROS Pricing Solution Suite running on SQL Server 2008 R2 Enterprise Technical White Paper Published: March 2012 Applies to: Microsoft SQL Server 2008 R2 Enterprise Abstract Pricing is a powerful lever for improving business profits. Organizations can use the PROS Pricing Solution Suite (PPSS) to uncover the value that is hidden in their data and to improve their financial performance. Because continuous access to PROS data is critical for an organization, Microsoft SQL Server 2008 R2 provides technologies that can help ensure that business-critical data remains highly available. This white paper provides step-by-step guidance for setting up a high-availability solution for PPSS running on SQL Server 2008 R2 Enterprise. i
High Availability for the PROS Pricing Solution Suite Running on Microsoft SQL Server 2008R2 Enterprise 2012 Microsoft Corporation. All rights reserved. This document is provided as-is. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. i
High Availability for the PROS Pricing Solution Suite Running on Microsoft SQL Server 2008R2 Enterprise Table of Contents Introduction... 1 Overview of Database Mirroring in SQL Server... 2 Options for Database Mirroring... 2 Database Mirroring for PROS... 2 Prerequisites... 3 How to Set Up Database Mirroring... 4 How to Configure PPSS to Support Failover by Using the Microsoft JDBC Driver... 5 Summary... 6 Links for More Information... 6 Additional Information... 7 About PROS... 7 About Microsoft... 7 ii
High Availability for the PROS Pricing Solution Suite Running on Microsoft SQL Server 2008R2 Enterprise Introduction PROS software is designed to meet the needs of business-to-business distributors with superior scalability, configurability, and upgradability. The PROS Pricing Solution Suite (PPSS) is a set of integrated software tools and supporting services based on three primary modules with differing database needs: Scientific Analytics (SA) Online analytical processing (OLAP) database Price Optimizer (PO) Online transaction processing (OLTP) database Deal Optimizer (DO) OLTP database SQL Server 2008 R2 provides an ideal database platform for PPSS with a combination of performance, functionality, ease of administration, and a unique, CPU-based pricing model. SQL Server is very easy to install and configure. When used with SQL Server, PPSS takes advantage of a relational database management system (RDBMS) as an OLTP database, in addition to the following technologies that are included in SQL Server 2008 R2: SQL Server Analysis Services SQL Server Analysis Services (SSAS) optimizes analytical query performance. SSAS is a fullfledged multidimensional OLAP (MOLAP) database engine that offers superior performance for an OLTP solution that is used for OLAP queries. SSAS also offers usage-based optimization that tracks user queries and builds aggregations to optimize those queries. With SSAS, the load resides on the database server and not on the application server. With competitors databases, OLAP cube calculations and dataspace manipulation reside on the application server inside the Java virtual machine(s) (JVMs). SQL Server Reporting Services SQL Server Reporting Services (SSRS) is an integrated reporting system that enables realtime, context-sensitive generation of PDF or Microsoft Excel based quotes. Keeping business data highly available is critical to organizations. SQL Server 2008 R2 Enterprise includes many technologies that can be used to minimize downtime and maximize data protection so that database administrators can ensure smooth operation, provide continuous access to business-critical data, and meet availability levels according to various service level agreements. This white paper introduces high availability (HA) for PPSS, and provides step-by-step guidance for setting up a solution that keeps PROS data continuously available. This white paper is targeted at database administrators and IT professionals who are tasked with architecting a high-availability and disaster-recovery strategy for their mission-critical applications. 1
To fully benefit from the information presented in this paper, readers should have a good understanding of Windows and SQL Server technologies and have sufficient knowledge of transaction processing. Readers should also understand the PROS PPSS deployment environment, including an understanding of how to modify and maintain PROS PPSS configuration files. Overview of Database Mirroring in SQL Server There are several technologies and architectures available in SQL Server for high availability and disaster recovery. These include failover clustering, log shipping, replication, scalable shared databases, and database mirroring. For PROS running on a SQL Server database platform, the recommended solution is database mirroring. Database mirroring is a software high-availability solution that supports almost instantaneous failover. Database mirroring is used to maintain a single standby database, called a mirror database, for a corresponding production database that is referred to as the principal database. The database mirroring configuration uses a principal server that contains the principal database, and a mirror server that contains the mirror database. The mirror server continuously brings the mirror database up to date with the principal database. Options for Database Mirroring Database mirroring runs with either synchronous operation in high-safety mode, or asynchronous operation in high-performance mode. High-performance mode In high-performance mode, the transactions commit without waiting for the mirror server to write the log to disk, which maximizes performance. High-safety mode In high-safety mode, a committed transaction is committed on both partners, but at the risk of increased transaction latency. In its simplest configuration, database mirroring involves only the principal and mirror servers. In this configuration, if the principal server is lost, the mirror server can be used as a warm standby server, with possible data loss. High-safety mode supports an alternative configuration with automatic failover. This configuration involves a third server instance, known as a witness, that enables the mirror server to act as a hot standby server. Failover from the principal database to the mirror database typically takes several seconds. Database Mirroring for PROS For PPSS running on SQL Server, synchronous database mirroring is recommended to maintain an up-to-date, redundant copy of a single database by continually sending transaction log records from the principal database on the principal server to the mirror database on the mirror server. 2
If a failure occurs, the mirror database can be brought online as the new principal database and client connections can be failed over. As long as the mirror database remains synchronized with the principal database, zero data loss results when a failover is necessary. Database mirroring is typically a lower cost solution than one that involves failover clustering, because the principal and mirror servers can be standalone servers with direct-attached storage, rather than each server being a part of a multi-server failover cluster with storage area network (SAN). The recommended architecture for database mirroring is shown in Figure 1. Figure 1. Database mirroring architecture Prerequisites Before you begin to set up database mirroring for PPSS, be sure you that meet the following prerequisites: Check to see if the servers participating in mirroring are running under the same service account. If not, you will need to add the service account for the principal server as a sysadmin on the mirror instance and vice versa. Make sure the instances are running the same edition and patch level of SQL Server. This can be checked with the SQL Statement select @@version. 3
Also make sure that your instance supports database mirroring. For more information, see the MSDN article Features Supported by the Editions of SQL Server 2008 R2. How to Set Up Database Mirroring The following instructions describe how to set up synchronous database mirroring with no witness. 1. Begin with the principal instance. Put the database you want to mirror in FULL recovery mode. For example: BACKUP DATABASE AdventureWorksLT2008 TO DISK = 'c:\adventureworkslt2008.bak' BACKUP LOG AdventureWorksLT2008 TO DISK = 'c:\adventureworkslt2008.trn' 2. Copy the backups that you made on the principal instance to the mirror instance. 3. On the mirror instance, restore the database and log with the NORECOVERY option. For example: RESTORE Database AdventureWorksLT2008 FROM DISK = 'c:\adventureworkslt2008.bak' WITH MOVE 'AdventureWorksLT2008_Data' TO 'E:\MSSQL10.MSSQLSERVER\MSSQL\DATA\AdventureWorksLT2008.mdf', MOVE 'AdventureWorksLT2008_Log' TO 'E:\MSSQL10.MSSQLSERVER\MSSQL\DATA\AdventureWorksLT2008.ldf', NORECOVERY 6: RESTORE LOG AdventureWorksLT2008 FROM DISK = 'c:\adventureworkslt2008.trn' WITH NORECOVERY 4. On the principal instance, right-click on the database that you are going to mirror, click Tasks, and then click Mirror. 5. Click Configure Security. This launches the Configure Database Mirroring Security Wizard. 6. Click Next on the initial screen. On the Include Witness Server dialog box, select No. 7. On the Principal Server Instance dialog box, leave the default settings, and then click Next. 8. On the Mirror Server Instance dialog box, type the name of the server that you will be mirroring. Click Connect. Leave the port and endpoint name with the defaults, and then click Next. 9. Type in the names of the accounts used to mirror the data. Click Finish. 10. You will see a dialog box documenting the different endpoints and mirroring configuration. Click Do Not Start Mirroring so you can review the settings before mirroring. 4
11. Ensure that the operating mode is set to High safety (synchronous). 12. Click Start Mirroring. After a few minutes, you should see the status change to "Synchronized." How to Configure PPSS to Support Failover by Using the Microsoft JDBC Driver The following steps describe how to configure PPSS to use the Microsoft Java database connectivity (JDBC) driver to support automatic failover. 1. Shut down PPSS. 2. Download the latest Microsoft JDBC Driver (http://msdn.microsoft.com/enus/sqlserver/aa937724). 3. Unzip the Microsoft JDBC Driver, and then copy the sqljdbc4.jar file to the [PROS_INSTALL_HOME]\build\lib\ext directory. 4. Open and modify the file properties of [PROS_INSTALL_HOME]\build\config\systemproperties\pdk\dbdrivers. as follows: a. Change the following: dbdriver.names = oracle jtds to: dbdriver.names = oracle jtds microsoft b. Add the following test: dbdriver.microsoft.desc = Microsoft SQL Server (using Microsoft JDBC) dbdriver.microsoft.datasource = com.microsoft.sqlserver.jdbc.sqlserverconnectionpooldatasource dbdriver.microsoft.prompts = host port dbname user passwd dbdriver.microsoft.prompt.port.default = 1433 dbdriver.microsoft.prompt.dbname.validregexp = ^[_\\p{l}][@#\\$_\\p{l}\\p{nd}]{0,127}$ dbdriver.microsoft.call.1.string.setservername = ${host} dbdriver.microsoft.call.2.int.setportnumber = ${port} dbdriver.microsoft.call.3.string.setdatabasename = ${dbname} dbdriver.microsoft.call.4.string.setuser = ${user} dbdriver.microsoft.call.5.string.setpassword = ${passwd} dbdriver.microsoft.call.6.string.setdescription = ${dbdriver.microsoft.desc} dbdriver.microsoft.call.7.boolean.setsendstringparametersasunicod e = false dbdriver.microsoft.call.8.string.setfailoverpartner = <mirror instance> 5
Note Be sure to include the correct mirrored instance server host in the <mirror instance> option above. 5. Under [PROS_INSTALL_HOME]\build\bin, run CreateDataSource new, and then choose the using Microsoft JDBC driver option. Summary PROS Pricing Solution Suite customers demand around-the-clock access to their data so that they can make critical pricing decisions decisions that can save their companies millions of dollars or help successfully close important deals. Using the guidance provided in this white paper, customers can set up a cost-effective, high-performance, and robust HA environment for PPSS running on SQL Server 2008 R2 that can meet their needs. Links for More Information The white paper High-Availability with SQL Server 2008 (http://msdn.microsoft.com/enus/library/ee523927.aspx) contains information about each of the high-availability technologies included in SQL Server 2008, in addition to links to other white papers and technical resources with more information. The white paper: Proven SQL Server Architectures for High Availability and Disaster Recovery (http://sqlcat.com/sqlcat/b/whitepapers/archive/2010/06/07/proven-sql-server-architectures-forhigh-availability-and-disaster-recovery.aspx) provides guidance for selecting an appropriate architecture to provide high availability.. 6
Additional Information The following references provide more information about PROS and Microsoft. About PROS PROS is a leading provider of pricing and revenue optimization software. Founded in 1985, PROS s pricing and revenue optimization software covers customers in a variety of industries, including both B2B and B2C companies. The company s products support pricing decisions through the aggregation and analysis of enterprise application data, transactional data, and market information. PROS s pricing software products calculate pocket price, pocket margin, customer willingness to pay, customer cost to serve, win-loss ratios, price envelope, and other price-specific data. PROS s core offering is the PROS Pricing Solution Suite (PPSS), a set of integrated software products that enables enterprises to apply pricing science to determine, analyze, and execute optimal pricing strategies. The product suite consists of scientific analytics, price optimization, and deal optimization software. For more information, visit www.prospricing.com. About Microsoft At Microsoft, we're motivated and inspired every day by how our customers use our software to find creative solutions to business problems, develop breakthrough ideas, and stay connected to what's most important to them. We run our business in much the same way, and believe our five business divisions Windows and Windows Live, Server and Tools, Online Services, Microsoft Business, and Entertainment and Devices offer the greatest potential to serve our customers. For more information about Microsoft products and services, call the Microsoft Sales Information Center at (800) 426-9400. In Canada, call the Microsoft Canada Information Centre at (877) 568-2495. Customers who are deaf or hard-of-hearing can reach Microsoft text telephone (TTY/TDD) services at (800) 892-5234 in the United States or (905) 568-9641 in Canada. Outside the United States and Canada, please contact your local Microsoft subsidiary. For more information, contact your local Microsoft Sales Representative, or visit www.microsoft.com. 7