Sage SQL Gateway Installation and Reference Guide

Similar documents
Sage Construction Anywhere Setup Guide

EST151: Maintain Parts

Sage Construction Anywhere Setup Guide

Sage Construction Central Setup Guide (Version 18.1)

Get Started. Document Management 9.7.1

Sage Installation and Administration Guide

This version of the software has been retired. Sage Estimating (SQL) (formerly Sage Timberline Estimating)

Sage Residential Management Versions 9.5 through Installation Guide

Technical System Reference. Residential Management

Sage 300 Construction and Real Estate (formerly Sage Timberline Office)

Sage Estimating (SQL) v17.12

Sage 100 ERP 2015 Installation and System Administrator s Guide

Version Installation Guide. 1 Bocada Installation Guide

Release Notes. Residential Management 12.1

Sage 300 ERP Installation andadministration Guide

Sage Installation and Administration Guide. May 2018

FAS Asset Accounting FAS CIP Accounting FAS Asset Inventory Installation & Administration Guide Version

Sage Construction Anywhere Connector

Sage Estimating (SQL) v18.11

Sage Upgrade Guide. July 2017

Installation Manual. Fleet Maintenance Software. Version 6.4

Sage 300 Construction and Real Estate (formerly Sage Timberline Office)

SonicWall Secure Mobile Access SMA 500v Virtual Appliance 8.6. Getting Started Guide

Enterprise Vault.cloud CloudLink Google Account Synchronization Guide. CloudLink to 4.0.3

Sage Fixed Assets Network Installation Guide

Sage Estimating (SQL) v17.11

has been retired This version of the software Sage 300 Construction and Real Estate (formerly Sage Timberline Office)

FAS Asset Accounting FAS CIP Accounting FAS Asset Inventory SQL Server Installation & Administration Guide Version

Sage 300 Construction and Real Estate. MyAssistant Upgrade Guide Version 17.1

Sage Upgrade Guide. July 2018

One Identity Active Roles 7.2. Replication: Best Practices and Troubleshooting Guide

Sage 300 Construction and Real Estate Version MyAssistant Upgrade Guide

Quest Collaboration Services 3.6. Installation Guide

Sage Residential Management. Moving Data Files Version 13.1

Metalogix ControlPoint 7.6. for Office 365 Installation Guide

Installation Guide Worksoft Certify

Sage Installation and System Administrator s Guide. March 2019

Sage Timberline Desktop

System Management Guide Version 7.4a

SOA Software Intermediary for Microsoft : Install Guide

Sage Estimating. (formerly Sage Timberline Estimating) SQL Server Guide. has been retired. This version of the software

One Identity Active Roles Diagnostic Tools 1.2.0

Sage Estimating (SQL) v17.13

Sage Fixed Assets Premier

TECHNICAL WHITE PAPER AUGUST 2017 REVIEWER S GUIDE FOR VIEW IN VMWARE HORIZON 7: INSTALLATION AND CONFIGURATION. VMware Horizon 7 version 7.

EMS DESKTOP CLIENT Installation Guide

Technical System Reference Residential Management

Sage Fixed Assets Premier. Installation guide

Veritas Backup Exec Migration Assistant

has been retired This version of the software Sage 300 Construction and Real Estate (formerly Sage Timberline Office)

System Management Guide Version 7.52

SonicWall Global VPN Client Getting Started Guide

Contents. Microsoft is a registered trademark of Microsoft Corporation. TRAVERSE is a registered trademark of Open Systems Holdings Corp.

Sage Installation and System Administrator s Guide. October 2016

has been retired This version of the software Sage 300 Construction and Real Estate ( formerly Sage Timberline Office)

Sage Fixed Assets Lite Depreciation Quick Start Guide

VMware AirWatch Database Migration Guide A sample procedure for migrating your AirWatch database

Manufacturing Process Intelligence DELMIA Apriso 2017 Installation Guide

Macola ES version ES Supported Platforms

x10data Application Platform v7.1 Installation Guide

Lite Depreciation Quick Start Guide

vfire 9.5 Prerequisites Guide Version 1.1

Scribe Insight Installation Guide. Version August 10, 2011

2013 Means Integrator Guide. For Sage Estimating 9.8 and 12.1

Jonas Activity Management Technical Deployment Guide

Sage 300 Construction and Real Estate (formerly Sage Timberline Office)

Workshare Risk Analytics. Installation Guide

Rapid Recovery License Portal Version User Guide

1.0. Quest Enterprise Reporter Discovery Manager USER GUIDE

NovaBACKUP xsp Version 13.1 Upgrade Guide

One Identity Active Roles 7.2

VMware App Volumes Installation Guide. VMware App Volumes 2.13

Secure Held Print Jobs. Administrator's Guide

ControlPoint. Advanced Installation Guide. September 07,

Network Video Management System Standard Edition 2017 R2. Administrator Getting Started Guide

Sage 200c Professional. System Requirements and Prerequisites

Sage 200c Professional. System Requirements and Prerequisites

SSRS 2016 for WITS. Web Portal User Guide. Applies to: WITS Version 18.0+

Installation and Deployment Guide for HEAT Service Management

Authentication Services ActiveRoles Integration Pack 2.1.x. Administration Guide

Sage Upgrade Guide acutedata.com

StreamServe Persuasion SP5

Sage 200 Extra System Requirements and

PDF SHARE FORMS. Online, Offline, OnDemand. PDF forms and SharePoint are better together. PDF Share Forms Enterprise 3.0.

Patch Manager INSTALLATION GUIDE. Version Last Updated: September 25, 2017

Veritas System Recovery 18 Management Solution Administrator's Guide

Cloud Platform. Version User's Guide

Software Installation with Microsoft SQL 2008

SAP BusinessObjects Integration Option for Microsoft SharePoint Getting Started Guide

Sage 300 Construction and Real Estate. MyAssistant Installation Guide Version 18.1

Cambium Wireless Manager

Sage 200c Professional. System Requirements and Prerequisites

Business Intelligence Launch Pad User Guide SAP BusinessObjects Business Intelligence Platform 4.1 Support Package 1

NovaBACKUP CMon v19.0

Sage 300. Sage CRM 2018 Integration Guide. October 2017

Scribe Insight Installation Guide. Version May 17, 2013

NTP Software File Auditor for Windows Edition

Skynax. Mobility Management System. Installation Guide

UC for Enterprise (UCE) NEC Centralized Authentication Service (NEC CAS)

Sage X3 Intelligence Financial Reporting. Installation and Upgrade Guide

Transcription:

Sage SQL Gateway Installation and Reference Guide

IMPORTANT NOTICE This document and the Sage 300 Construction and Real Estate software may be used only in accordance with the Sage 300 Construction and Real Estate End User License Agreement applicable to the Sage 300 Construction and Real Estate software. You may not use, copy, modify, or transfer the Sage 300 Construction and Real Estate software or this documentation except as expressly provided in the license agreement. Visit Sage's training services Web site at www.sageu.com, call 1-877-724-3285, or e-mail us at traininginfo.cre@sage.com to learn about training classes that Sage adds throughout the year. Contact your business partner to learn about local training options. Information in this document is intended solely as general information with respect to common business issues and is not to be construed as professional advice. Consult a tax or accounting professional for all tax and account related questions. THE INFORMATION HEREIN IS PROVIDED AS IS AND ALL WARRANTIES ARE EXPRESSLY DISCLAIMED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY: OF MERCHANTABILITY; OF FITNESS FOR ANY PARTICULAR PURPOSE; OF NON-INFRINGEMENT OF ANY PROPRIETARY RIGHT OF ANY THIRD PARTY IN ANY COUNTRY; OTHERWISE ARISING OUT OF ANY PRODUCT, PROPOSAL, SPECIFICATION OR SAMPLE; AND ANY WARRANTY THAT THE DOCUMENT IS ERROR FREE. No license, express, implied, by estoppel or otherwise, to any intellectual property right is granted by this document. Sage may make changes to the information in this document at any time, without notice. Recipient is solely responsible for assessing the suitability of the information and assumes all risk of use. 2013 Sage Software, Inc. All rights reserved. Sage, the Sage logos, and the Sage product and service names mentioned herein are registered trademarks or trademarks of Sage Software, Inc., or its affiliated entities. All other trademarks are the property of their respective owners. 10/2013

Sage SQL Gateway Installation and Reference Guide Contents Contents About This Guide..................................5 Overview.........................................7 Installation and Setup Overview........................................... 7 Sage SQL Gateway Components.......................................... 9 Server Component.................................................... 10 Report Design Component.............................................. 15 Report Viewing Component............................................. 17 Install and Configure Sage SQL Gateway.............19 Prepare the Accounting Server........................................... 20 Prepare the Gateway Server............................................. 21 Install Microsoft SQL Server............................................. 22 Install and Configure Sage SQL Gateway.................................. 28 What Happens During Replication?....................................... 35 After Successful Replication............................................. 40 Designing Reports with Sage SQL Gateway Data......43 Default Security Configuration........................................... 43 Preparing Custom Views for Your Reports.................................. 45 Working With Report Designs............................................ 53 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 3

Contents Sage 300 Construction and Real Estate 4 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide About This Guide About This Guide This reference guide provides the setup, configuration, and troubleshooting information you need to implement and maintain Sage SQL Gateway. Most of the material applies to system administrators or information technology specialists who will complete the server installations and Microsoft SQL Server configuration tasks. Some of the material also applies to report designers who will design and modify reports to be used with Sage SQL Gateway. Where to Get Additional Information Online Help For information about how to complete daily workflow tasks related to Sage SQL Gateway, click the Help button. Help includes Contents, Index, and Find features that help you locate information quickly. Technical Assistance Depending on your Sage Service Plan, you might be able to take advantage of the Sage Customer Portal. Log on at http://www.sagecre.com/customerlogon to search the Technical Support Knowledgebase or submit an online Support Request. One of our call center support analysts will assist you. Technical Support Knowledgebase The Technical Support Knowledgebase contains the latest information about application features. You must have a current service plan to access the knowledgebase. Training Opportunities Sage University offers online training sessions to help you get the most out of your Sage software. To access Sage University, visit www.sageu.com. 2013 Sage Software, Inc. 5

About This Guide Sage 300 Construction and Real Estate 6 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Overview Overview Sage SQL Gateway lets you take advantage of Microsoft SQL Server s reporting and business-intelligence capabilities by copying your Sage 300 Construction and Real Estate data from the Pervasive database management system into SQL Server. The data is replicated nightly, on a schedule that you establish. If you have more than one Sage 300 Construction and Real Estate company folder, you can merge your data folders into a single database in SQL Server, while continuing with normal processing in your production database. NOTE: Sage SQL Gateway does not replicate Estimating, Purchasing, Inventory, or Service Management data. If you use these Sage 300 Construction and Real Estate modules, you will not be able to include data from these areas in your replicated database. The replicated data in the Sage SQL Gateway destination database represents a snapshot of the data at the time of the last successful replication. (The date and time of the last update are stored in the database, so you can access this information when needed.) Installation and Setup Overview The diagram on the following page shows the procedure you ll follow to implement Sage SQL Gateway. Each step in the process is explained in this guide. Notice that some tasks are completed by a system administrator or information technology specialist. Other tasks are completed by the Sage 300 Construction and Real Estate Application Administrator. In some cases, these may be the same individual, but we ve separated the steps so you can plan your work accordingly. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 7

Sage SQL Gateway Sage 300 Construction and Real Estate Sage SQL Gateway Implementation: Install, Configure, and Test Systems Administrator or IT Specialist Prepare the Accounting Server Sage 300 Construction and Real Estate Application Administrator Check Sage 300 CRE Version Prepare the Gateway Server Create Gateway User and Role Install Microsoft SQL Server Install Sage SQL Gateway Run File Doctor on Sage 300 CRE data Configure Sage SQL Gateway for Test Data Copy Data Folders for Replication Test Test Data Replication Identify Report Designers Configure Sage SQL Gateway for Live Data Modify Custom Script Template Create Database Users Develop Report Designs 8 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Overview Sage SQL Gateway Components Sage SQL Gateway involves three basic components. In some cases these can be consolidated, but you should review the requirements and considerations for each component independently. Server Component (page 10): A server environment and corresponding security roles are required to support the data replication process. Report Design Component (page 15):One or more computer environments and corresponding security roles are required to support the design and deployment of reports. Report Viewing Component (page 17): Reports can be viewed from workstation environments depending on operator permissions in Sage 300 Construction and Real Estate and in SQL Server. This remainder of this section explains the configuration options and system requirements for Sage SQL Gateway. Specific setup procedures for the server component can be found in the section Install and Configure Sage SQL Gateway, as indicated in this table. Task Page Prepare the Accounting Server 20 Prepare the Gateway Server 21 Install Microsoft SQL Server 22 Install and Configure Sage SQL Gateway 28 Test Data Replication and View the Results 34 Procedures for setting up report designers and viewers are covered in the section Designing Reports with Sage SQL Gateway Data, starting on page 43. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 9

Sage SQL Gateway Sage 300 Construction and Real Estate Server Component Sage SQL Gateway must be installed and configured on a server that meets the requirements shown in the table below. Note the following: Sage SQL Gateway requires Microsoft SQL Server. The supported editions are described on the next page. We recommend that you install a dedicated instance of SQL Server. (For details, see Install a Dedicated SQL Server Instance on page 22.) You can install Sage SQL Gateway and SQL Server on your Sage 300 Construction and Real Estate production server, or on a separate server. These options are described starting on page 12. The administrative user roles required for configuring and running Sage SQL Gateway and Sage 300 Construction and Real Estate are explained starting on page 13. Sage SQL Gateway Server Minimum Requirements Requirement Operating System Version and Notes Microsoft Windows Server 2008 (x86, x64) or Microsoft Windows Server 2008 R2 Microsoft Windows Server 2012 (only if you have version 13.1 of Sage 300 Construction and Real Estate installed) Microsoft SQL Server SQL Server 2008 R2 with Service Pack 2 SQL Server 2012 with Service Pack 1 Microsoft.NET Framework Microsoft Windows Installer TCP/IP Firewall Exceptions Internet browser Version 4.5 is installed during Sage SQL Gateway installation if not already present. Apply all security updates. Version 3.5 is automatically installed during Sage SQL Gateway installation if not already present. Communication protocol used by Sage SQL Gateway. If you use a firewall, you must have an exclusion for the incoming SQL Server traffic. If you will use the automatic notifications feature, you ll also need an exclusion for the outgoing email server. A browser is required for viewing online help. The following browsers are supported at the listed version or later: Internet Explorer 9.0 Mozilla Firefox 17.0 Google Chrome 23.0 Safari 5.0 10 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Overview Microsoft SQL Server Editions You must install Microsoft SQL Server on the same server as Sage SQL Gateway. The supported versions are as follows. The 32-bit or 64-bit options are supported, and you can select the Express, Standard, or Enterprise editions. SQL Server 2008 R2 with Service Pack 2 SQL Server 2012 with Service Pack 1 Selecting the Express, Standard, or Enterprise Edition SQL Server Express is available as a download from Microsoft at no extra cost. In some cases, this can be a cost-effective way to implement the Sage SQL Gateway utility, but you should consider the limitations of the no-cost editions. Databases larger than 10 gigabytes are not supported by the Express edition, and the Express edition is limited in the amount of CPU and RAM resources it can access. If the combined size of the Sage 300 Construction and Real Estate company folders you will use with Sage SQL Gateway is currently near or above the 10 gigabyte limit, you ll need to purchase the Standard or Enterprise edition. Determining Which SQL Server Express Package to Download If you decide to use the Express edition, you ll select one of three available packages. The basic SQL Server Express package does not include SQL Server Management Studio (SSMS), which is needed for certain configuration tasks. Select one of the packages that includes SSMS: SQL Server Express with Management Tools SQL Server Express with Advanced Services FOR MORE INFORMATION: Also see Report Design Component on page 15 for report design options that might affect your choice of SQL Server edition. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 11

Sage SQL Gateway Sage 300 Construction and Real Estate Server Installation Options You can install Sage SQL Gateway on your Sage 300 Construction and Real Estate accounting server, or on a separate server. Sage SQL Gateway on the Production Server WARNING: The Installation Guide for Sage 300 Construction and Real Estate lists minimum hardware and system requirements for the accounting software server. The requirements do not include the extra resources needed if you install SQL Server and Sage SQL Gateway on the production server. If you plan to install Sage SQL Gateway on your production accounting server, this server must meet the following requirements. The operating system must be Windows Server 2008 or Windows Server 2008 R2, if you have version 12.1 Rev 3 (or a later 12.1 update) of Sage 300 Construction and Real Estate. Windows Server 2012 is an additional option if you have version 13.1 installed. If your accounting server currently uses a different operating system, you have two options: Plan to upgrade your accounting server to one of these operating systems. Set up a second server with one of these operating systems. A supported version of Microsoft SQL Server (described on page 11) must be installed. Adding Microsoft SQL Server and Sage SQL Gateway to your accounting server will increase the workload on your hardware processor and RAM. The additional processing resources will be unique to your organization and server environment. Determine whether your current server is sufficient to meet the additional load, and update your hardware as needed. You must have the correct version of Sage 300 Construction and Real Estate installed: version 12.1 Rev 3 or version 13.1. Sage SQL Gateway is not compatible with 9.8 or earlier versions. Sufficient hard disk space must be available to allow for additional copies of your Sage 300 Construction and Real Estate database created by the replication process. The amount of free space needed will depend on the current size of your database plus anticipated growth. Your selection of the Classic or Modern view of the data (explained on page 37) can also impact this decision. The TCP Client Protocol must be enabled, with certain firewall exclusions: Incoming TCP SQL Server traffic must be allowed, for running reports against the destination database. Outgoing SMTP port traffic must be allowed if you will set up email notifications for replication status. 12 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Overview Sage SQL Gateway on a Separate Server If you choose to install Sage SQL Gateway on a system other than your production server, this computer must meet the following requirements: The operating system must be Windows Server 2008 or Windows Server 2008 R2 if you have version 12.1 Rev 3 of Sage 300 Construction and Real Estate. Windows Server 2012 is an additional option if you have version 13.1 installed. The hardware and processing resources must meet the minimum requirements for Sage 300 Construction and Real Estate servers. (See the Installation Guide for Sage 300 Construction and Real Estate). A supported version of Microsoft SQL Server must be installed. (See Microsoft SQL Server Editions on page 11.) Sage 300 Construction and Real Estate, version 12.1 Rev 3 or later must be installed. (This should be a workstation installation.) Sufficient hard disk space must be available to allow for the SQL Server copies of your data created by the replication process. The amount of space needed will depend on the size of your current database, plus anticipated growth.your selection of the Classic or Modern view of the data (explained on page 37) can also impact this decision. The TCP Client Protocol must be enabled, with certain firewall exclusions: Incoming TCP SQL Server traffic must be allowed, for running reports against the destination database. Outgoing SMTP port traffic must be allowed if you will set up email notifications for replication status. If you will use a named instance in SQL Server (instead of the default instance), the SQL Browser service must be enabled and running. Administrative User Roles When you install and configure Sage SQL Gateway, you will need to provide administrator credentials in SQL Server and Sage SQL Gateway. If you have enabled security administration in Sage 300 Construction and Real Estate, you ll also need to provide application administrator credentials. The accounts required are described here. Windows Account for Sage SQL Gateway Service Sage SQL Gateway launches the data replication process regularly based on the schedule you establish. The System Configuration window stores credentials for a Windows account, which must have the permissions and access listed here in order to replicate data successfully. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 13

Sage SQL Gateway Sage 300 Construction and Real Estate If you use a Windows account that is part of the local Administrators group for the computer on which Sage SQL Gateway is installed, many of the permissions listed below are established automatically. If you choose not to use an administrator s account, the Windows account you use must: Have read and write permissions to the following folders: The installation location for the Sage 300 Construction and Real Estate software. If you install Sage SQL Gateway on the production server, this is the server installation folder. If you install Sage SQL Gateway on a different computer, this is the local, workstation installation folder. The default data and backup folders specified for the SQL Server instance used with Sage SQL Gateway. The folder that stores the Sage SQL Gateway service. Have read permissions to the folder that contains the Sage 300 Construction and Real Estate databases. Be assigned to the sysadmin server role in SQL Server, if you use integrated security. This access is not automatically granted to the local Administrators group, so you will probably need to grant this access explicitly in SQL Server. We recommend that you do not set an expiration date on this user account to prevent future connection issues. To ensure your data remains secure, we do not recommend using a domain administrator s account for this service. SQL Server Administrator Account If you use integrated security (also called mixed-mode authentication) in SQL Server, the administrator account can be either the Windows account already established, or a SQL Server user configured with the sysadmin server role in SQL Server Management Studio. Sage SQL Gateway Administrator The individual with Sage 300 Construction and Real Estate Application Administrator credentials will also be the Sage SQL Gateway Administrator. This account must have read and write permissions to the installation location for the Sage 300 Construction and Real Estate software. Depending on whether you will install Sage SQL Gateway on the Accounting Server, this is either the server installation folder or the local workstation installation folder. Sage 300 Construction and Real Estate Role and User Account You ll need to store credentials for a login to be used by Sage SQL Gateway when replicating data. Although you can use the application administrator s credentials for this purpose, we recommend that you create a dedicated role and user. 14 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Overview The Gateway Role should have ODBC read access to all files. Set these options for the Gateway User to avoid replication failure: Clear the User must change password at next log on check box. Select the Password never expires check box. Add this user to the Gateway Role. If you use record level security, add this user to each of the roles used to manage job record level security. You do not need to select a Windows user for the Sage SQL Gateway security user. On the Companies tab, grant this user access to all companies to be replicated. Report Design Component Your report design environment can be a workstation or a server. The minimum system requirements for this computer are equivalent to the workstation requirements for Sage 300 Construction and Real Estate. You can design and view reports on your replicated data using any report design tool that can connect to a SQL Server database as its source. We ve provided sample reports designed with SAP Crystal Reports and SQL Server Reporting Services (SSRS). The following applies to existing reports that you plan to use with your replicated data: Report designs that were created in Sage 300 Construction and Real Estate s Report Designer application will need to be re-designed in a design tool that can access SQL Server databases. Report designs that were created in SAP Crystal Reports can be modified to point to the replicated data. If you are an experienced Microsoft Excel user, you can also import data from the data warehouse into a spreadsheet. This option is not discussed in this guide. See Excel s Help topics on importing data for more information. About the Sample Reports Sage SQL Gateway includes two groups of sample reports: some designed with SAP Crystal Reports, and some designed with the Report Designer component of SSRS. In order to modify or view these reports, you ll need to use the report design tool with which they were created to point them to your replicated data. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 15

Sage SQL Gateway Sage 300 Construction and Real Estate SQL Server Reporting Services SQL Server Reporting Services (SSRS) is a component of some editions of Microsoft SQL Server. You can install and configure it separately from SQL Server Management Studio. To use SSRS, you ll need to select a SQL Server edition that includes it: SQL Server Express with Advanced Services includes SSRS at no extra cost, but some limitations apply. The reporting server is limited to 4 gigabytes of memory usage, and must be installed on the same drive as the SQL Server instance that you will use with Sage SQL Gateway. For more information, see Determining Which SQL Server Express Package to Download on page 11. SQL Server Standard or Enterprise Editions include SSRS as part of the package. Memory usage is not limited in these editions, and the reporting server can be installed on a different computer than the data warehouse. Report Designer Database User and Role Once data is replicated into the SQL Server data warehouse, your report designers need to be able to access the data to write and test reports. SQL Server Account for Report Designers You ll need to set up SQL Server login accounts to be used by report designers when they modify and create reports. These can be Windows or SQL Server accounts. See Default Security Configuration on page 43. Sage 300 Construction and Real Estate Account for Report Designers In most cases, report designers will also need a Sage 300 Construction and Real Estate account with ODBC read permissions to test new reports against existing ones. 16 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Overview Report Viewing Component Once your report designers have deployed report designs that point to your replicated data, you can view the reports from most workstations with supported report viewers. To view Crystal Reports, install the Crystal Reports Viewer or the full application. To view SSRS reports, an Internet browser is needed. SQL Server Account for Report Viewers You ll need to set up SQL Server login accounts for report viewers so that they can view the reports. This is true even if they won t access the data through SQL Server Management Studio. These can be Windows or SQL Server accounts. See Default Security Configuration on page 43. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 17

Sage SQL Gateway Sage 300 Construction and Real Estate 18 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway Install and Configure Sage SQL Gateway This section includes the procedure for configuring Sage SQL Gateway components. The following table explains the terminology used. Component Gateway Server Accounting Server SQL Administrator Gateway Administrator (Windows account) Application Administrator Security Administrator Gateway Role and User Report Designer Users Report Viewer Users Notes and Further Information The server on which Sage SQL Gateway is installed. See Server Component on page 10. The production server for Sage 300 Construction and Real Estate. This can be the same as the Gateway Server, or it can be a different server. The user account that Sage SQL Gateway uses during the replication process. This can be a Windows account or a SQL Server account. (See SQL Server Administrator Account on page 14.) The user account to be used for Sage SQL Gateway administration tasks. This can be a Windows account or a SQL Server account. (See Windows Account for Sage SQL Gateway Service on page 13.) The Sage 300 Construction and Real Estate user assigned to the Application Administrator role. This user will also be the administrator for Sage SQL Gateway. (See Sage SQL Gateway Administrator on page 14.) The Sage 300 Construction and Real Estate user assigned to the Security Administrator role, if different from the Application Administrator. The role and user established in Sage 300 Construction and Real Estate for use with Sage SQL Gateway. See Sage 300 Construction and Real Estate Role and User Account on page 14.) The user accounts to be used by report designers to modify and create custom views and reports. These can be Windows or SQL Server accounts. The user accounts to be used by report viewers. These can be Windows or SQL Server accounts. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 19

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate Prepare the Accounting Server Your Application Administrator and Security Administrator for Sage 300 Construction and Real Estate could be different individuals. In this situation, the Security Administrator must create the Gateway User. All remaining tasks should be completed by the Application Administrator. FOR MORE INFORMATION: See Sage 300 Construction and Real Estate s Help topics on Security Administration for details about setting up users and roles. 1. Log on to the Accounting Server with Security Administrator credentials. 2. Open Sage Desktop and select Tools > Security Administration and create the Gateway User with the following options: a. Clear the User must change password check box. b. Select Password never expires check box. c. Do not associate this account with a Windows user. 3. Log on to the Accounting Server with Application Administrator credentials. 4. Verify that your Sage 300 Construction and Real Estate software is at version 12.1 Rev 3 or version 13.1. Upgrade the application and databases as needed. 5. Run File Doctor on each of the company folders you will replicate. a. Open Sage Desktop and go to Common Tasks > Tools > File Doctor. b. Select the Fix and compact bad files check box. c. Click Start. 6. Make a backup of each company folder you will replicate, and then add these folders to the Open Company folder. (In Desktop, select File > Company > Open Company and click Specify Folders.) WARNING: The first time you replicate data, use a backup of your data folders rather than your production data. This is critical to establish timing and address any errors. 7. Open Sage Desktop and select Tools > Security Administration. Create the Gateway Role with the following settings: a. On the Tasks tab, select the ODBC > Read Access check box. No further task permissions are needed for this role. b. To avoid incomplete data replication, do not clear any check boxes under Read Access. This role should have read access to all files. 8. Open the Gateway User s window, and assign it to the Gateway Role. 20 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway 9. If you use record or file security, we recommend that you enable access to all files and records for this user to avoid incomplete data replication. 10. Enable this user to access all company folders to be included in replication (including the backup folders you created in step 6). 11. If you will install Sage SQL Gateway on the Accounting Server, remain logged on to the Accounting Server as the Application Administrator. Otherwise, you can log off of the Accounting Server. Prepare the Gateway Server 1. Verify that the server meets the system requirements shown on page 10. 2. Log on to the Gateway Server with the Gateway Administrator s account. (This is the same as the Application Administrator s account, as explained on page 14 under Sage SQL Gateway Administrator. ) 3. If you are not installing Sage SQL Gateway on the Accounting Server, verify that the workstation edition of Sage 300 Construction and Real Estate is installed. 4. Verify that the Gateway Administrator account can access the local installation location for the Sage 300 Construction and Real Estate software. Depending on whether you will install Sage SQL Gateway on the Accounting Server, this is either the server installation folder or the local workstation installation folder. 5. If you are using a firewall, create these exclusions: Incoming SQL Server traffic (to enable reports). Outgoing SMTP server (used for automatic email notifications). 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 21

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate Install Microsoft SQL Server Review the following requirements and guidelines for the Microsoft SQL Server instance that you will use with Sage SQL Gateway. NOTE: The Microsoft SQL Server installation screens vary slightly according to the version and edition you select, as well as the features you include in the installation. The options might appear in a different sequence than the one shown here. Install a Dedicated SQL Server Instance If you already have SQL Server installed on your server, we recommend that you install a new instance dedicated to Sage SQL Gateway. This is because of special server collation requirements, and also to protect your existing databases from unintended effects related to Sage SQL Gateway processing. To Check the Server Collation Setting 1. Open SQL Server Management Studio (Start > All Programs > Microsoft SQL Server 2008 R2 > SQL Server Management Studio). 22 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway 2. Right-click the top node and select Properties. The Server Collation should be Latin1_General_CS_AS. NOTE: Several other collation settings are possible in SQL Server. Some have names similar to the one shown here, but are not sufficient for Sage SQL Gateway. If you have a variation of the collation setting that does not exactly match Latin1_General_CS_AS, you ll need to install a new instance with the correct setting. Feature Selection In the Setup Role window, select SQL Server Feature Installation. WARNING: If you select All Features With Defaults, your instance settings will not be compatible with Sage SQL Gateway. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 23

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate In the Feature Selection window, the options vary based on the SQL Server edition. The minimum features required for Sage SQL Gateway are Database Engine Services and Management Tools - Basic. In addition to these options, you can install other features such as the ones described below, depending on your future plans and expertise with SQL Server. WARNING: These features require advanced knowledge of SQL Server. Technical assistance with installing, configuring, and using these features is not included with your Sage customer support plan. Reporting Services (SSRS) SSRS lets you to deliver server-based reports on the Web or through email. It is available with the Standard, Extended, or Express with Advanced Services editions of SQL Server. Some of the sample reports that accompany Sage SQL Gateway can be viewed or modified only with SSRS but you do not have to install SSRS in order to use the software. Analysis Services (SSAS) SSAS includes support for online analytical processing (OLAP) and data mining. It is available with the Standard or Extended editions. Business Intelligence Design Studio (BIDS) BIDS includes additional reporting and analysis services, and is available with the Standard or Extended editions. Management Tools - Complete Additional management components support the use of Reporting Services or Analysis Services. These are available with the Standard or Extended editions. 24 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway Service Accounts On the Server Configuration > Service Accounts tab, provide an account name for each of the services. If this is a named instance, set the Startup Type for the SQL Server Browser service to Automatic. Server Collation On the Server Configuration > Collation tab, the collation must be set to Latin1_General_CS_AS. This must be set at the instance level. (Although you can change the collation settings on individual databases in an existing instance, doing so is not sufficient for Sage SQL Gateway.) 1. In the Server Configuration > Collation window, click Customize. 2. Select Windows collation designator and sort order. 3. In the Collation designator list, select Latin1_General. 4. Select the Case-sensitive and Accent-sensitive check boxes. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 25

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate Account Provisioning On the Database Engine Configuration > Account Provisioning tab, select Mixed Mode. You can enter a password for the SQL Administrator (SA account), but this is not required if you add a Windows user as the SQL Server administrator. The Windows user must have permissions to access the default data and backup locations. Configure TCP/IP After the installation is finished, configure the communication protocol. 1. Open the SQL Server Configuration Manager and open SQL Server Network Configuration. 2. Select the instance associated with Sage SQL Gateway. 3. Verify that the TCP/IP protocol is Enabled, and disable all other protocols. 4. Open SQL Native Client 10.0 Configuration > Client Protocols and repeat this step. 5. Restart the SQL Server services for the instance. Gateway Administrator Access Verify that the Gateway Administrator account has read and write permissions to the default data and backup folders specified for the SQL Server instance. (This is only an issue if the data and backup folders are on a different drive than SQL Server.) 26 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway Adjusting Memory Usage in SQL Server When you install the Standard or Enterprise editions of SQL Server, the instance is configured to use all available memory on the server by default. If the Gateway Server is also your Accounting Server (or it performs other businesscritical functions), consider capping the memory available to SQL Server to avoid performance degradation in other areas. If you have more than one SQL Server instance installed on this server, you might need to adjust memory usage for the other instances as well. WARNING: Only system administrators with experience managing servers should change memory usage settings. The appropriate maximum memory usage will be unique to your situation, as it depends on the total hardware resources available and the other functions performed by this server. To adjust memory usage: 1. In SQL Server Management Studio, right-click the database engine and select Properties. 2. In the Server Properties window, click Memory. 3. Set the Maximum Server Memory as needed. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 27

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate Install and Configure Sage SQL Gateway Download and Install Sage SQL Gateway WARNING: If you have an earlier installation of Sage SQL Gateway, you must uninstall all components before installing the new version. Open Control Panel > Uninstall a Program and remove Sage SQL Gateway and any associated plugins (such as the Sage 300 Construction and Real Estate 12.1 Plugin for SQL Gateway). 1. At the Gateway Server, download the Sage SQL Gateway installation file using the link from the software notice. 2. When the download is complete, double-click the executable file for Sage SQL Gateway and follow the prompts to install the software. NOTE: You might be required to restart the server after installing Sage SQL Gateway. The installation will continue automatically after you restart. 3. When the installation is finished, open Sage SQL Gateway and click Configure. 4. If you see a User Account Control message, click Yes. 5. In the Account Selection window, enter the Windows credentials for the Gateway Administrator. If your Gateway Server is different than your Accounting Server, you must select User Account. 28 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway You can select Local System account if you are installing Sage SQL Gateway on your Accounting Server. 6. In a moment, the Sage SQL Gateway - Configuration window opens. Configure SQL Server and Email Server Settings 1. If you have not yet configured Sage SQL Gateway, the configuration window opens. If you have accessed Sage SQL Gateway before, click System in the upper right corner to access the configuration window. 2. Next to Server name: If you are using the default SQL Server instance, enter the computer name of the Gateway Server in the format ServerName (with no slashes or punctuation). If you are using a named instance, enter it in the format Servername\InstanceName. 3. Next to Authentication: 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 29

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate Select Windows authentication to allow SQL Server to use the Windows user ID when accessing SQL Server. Select SQL Server authentication to use SQL Server credentials. Click Enter Credentials and enter the login information. 4. If you want Sage SQL Gateway to send automated email messages regarding the status of nightly data replication, click the Email Server tab. a. Enter the outgoing SMTP server and Port. (Contact your system administrator for assistance with these.) b. Click Enter credentials to enter authentication information for the SMTP Server. c. Enter the Sender email address you want to appear on the email notifications that will be sent from Sage SQL Gateway during the replication process. This is not an email address that can be monitored. We recommend that you create an address such as NoReply@MyCompany.com to enter here. 5. Click OK to close the system configuration window. 30 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway Configure Data, Scheduling, and Notifications 1. In the Sage SQL Gateway window, click Database. (This button is only available if the configuration information for System has already been entered.) 2. If security administration is enabled in Sage 300 Construction and Real Estate, enter the credentials for the Application Administrator and click OK. 3. Under Source databases, click New Source. (A data source is a Sage 300 Construction and Real Estate company folder.) Select a company folder. WARNINGS: You should only combine data folders with identical custom descriptions, section formats, and fields. If your data folders differ in this respect, some data will be missing from your replicated data. We recommend that you use a backup of your company folders the first time you replicate data. 4. If security administration is enabled for Sage 300 Construction and Real Estate, click Enter Credentials and enter information for the Gateway User. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 31

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate 5. Click OK. The system validates the credentials before closing the New Source Database window. 6. Repeat steps 3 through 5 for each company folder you will replicate into a merged database. 7. Under Destination database, enter the name to use for the database that will contain your replicated data. 8. Click the Schedule tab, and configure the settings for daily replication. For details about scheduling, see How Are the Schedule Start and End Times Used? on page 39. WARNINGS: The replication could be a lengthy process, and must be scheduled for a time when all operators are logged out of the Sage 300 Construction and Real Estate databases. Verify that the timing of Windows updates, backups, and other server maintenance does not conflict with the replication time frame. 32 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway 9. If you plan to send automated email messages regarding the status of replication, click the Notifications tab. 10. Enter the email addresses for all recipients who should receive notifications, and select the check boxes as needed. 11. Click the Message text button for the message types you selected to modify the email text. NOTE: In order to send automated messages, the SMTP server and port information must be entered in the email configuration window shown on page 30, step 4. 12. When you are finished entering configuration information, click OK. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 33

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate Test Data Replication and View the Results 1. Ensure all operators are logged out of the Sage 300 Construction and Real Estate databases to be replicated. The process can be lengthy if your database is large. 2. Verify that Sage SQL Gateway is configured to replicate a backup copy of your Sage 300 Construction and Real Estate data folders. This lets you run multiple tests during normal work hours in case you need to address errors. NOTE: You should have run File Doctor on your production databases before copying them for the replication test. If not, run File Doctor on the backup copies before initiating the test. This can fix many minor issues with the data that might cause replication to fail. 3. In the Sage SQL Gateway window, click Replicate data. If errors are encountered during replication, they are reported in the Sage SQL Gateway event log. 4. When the replication process is finished, open SQL Server Management Studio to see the databases related to Sage SQL Gateway. This window shows the following: Construction_Sample is the destination database which contains your replicated data. SageConfiguration is a configuration database that stores information about your Sage SQL Gateway settings, such as the source databases and replication. 34 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway What Happens During Replication? Replication follows an Extract-Transform-Load (ETL) process typical of many automated data migrations. SQL Server extracts the data from Pervasive, transforms it (by merging data folders and tables), and then loads it into the destination database. In this example, three Sage 300 Construction and Real Estate company folders are replicated: Timberline, Gateway, and Executive. Source Data (Pervasive) Staging Databases (SQL Server) Timberline Destination Database (SQL Server) Gateway Executive Extract Source data is extracted from Pervasive and pulled into SQL Server. Transform Staging data tables containing similar data are merged. Load The transformed data is written to the destination database. How is the Data Transformed? You have options for how you want the transformed data to appear for your report designers. The replication process can provide access to the data in Modern or Classic view or both. Classic view results in table and field names that match the data as seen through an ODBC connection, such as when creating a Crystal Reports design. Classic view will be most familiar for report designers who are accustomed to designing Sage 300 Construction and Real Estate reports. Modern view results in table and fields names adjusted for future enhancements to reporting and other capabilities. The specific transformations present in the Classic and Modern views of the data are described next as well as some considerations with respect to database size and future product releases. Review this information, and then see Enable Classic or Modern View on page 38 for instructions on enabling either view. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 35

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate Table Names If you use named files, data from these files is included in the destination database. Records from named files are merged into the standard tables along with other records of the same type. If you use custom file locations, the replication includes data from the locations defined in File > Company Settings > File Locations. Modern View Because the destination tables contain data merged from several originating tables, the table and view names are adjusted accordingly. The naming convention is as follows, where App is the 2-character application abbreviation: App_FileDescription_TableName This table shows examples of how names are adjusted: Original Table API_New_Invoice API_History_Invoice ART_New_Transaction ART_Current_Transaction GLT_New Transactions GLT_Current Transaction GLT_History Transaction JCM_Master_Job TS.CTL Replicated Name AP_Invoice_Invoice AR_Transaction_Transaction GL_Transaction_Transaction JC_Master_Job TS_Control_CompanyInformation Classic View The destination tables are named just as seen through an ODBC data source connection. Classic view tables are not merged from different originating tables. Original Table API_New_Invoice ART_New_Transaction GLT_Current Transaction JCM_Master_Job TS.CTL Replicated Name API_NEW INVOICE ART_NEW TRANSACTION GLT_CURRENT TRANSACTION JCM_MASTER JOB CTL_TS COMPANY_INFORMATION 36 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway Each Table Contains a.databaselabel Column Modern and Classic View Data folders can be combined into a single database during the replication. To differentiate data from different folders, a column called.databaselabel is added to every table, which contains the name of the originating data folder. This lets you filter views according to different company folders, so as not to expose data inappropriately. Each Table Contains a.tablelabel Column Modern View Data tables that contain equivalent information, such as the new and posted invoices tables, are combined. A column called.tablelabel is added to every table, which contains the name of the originating table. This lets you filter views according to their original source, such as Current, New, or History. This table shows examples of column entries based on original table names. Original Table Replicated Table and View Name.TableLabel Standard File Names API_New_Invoice API_History_Invoice GLT_New Transactions GLT_Current Transaction GLT_History Transaction Named Files API_Job1 Invoice API_Archive_Invoice Classic View [AP_Invoice_Invoice] [GL_Transaction_Transaction] [AP_Invoice_Invoice] new history new current history new history The Classic views (dbo) do not have the.tablelabel column.. Tables of similar types (such as GLT tables) are not merged in the Classic view. Database Size If you configure Sage SQL Gateway to generate both the Modern and Classic views of the data, your destination database will be correspondingly larger. Each of the view options represents approximately a full copy of your Sage 300 Construction and Real Estate database in terms of size. For example, if your existing data folder is 1 gigabyte, the replicated SQL database with either the Modern or Classic view (but not both) will be approximately the 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 37

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate same size. If you opt to generate both the Modern and Classic views in the replication, the resulting database will be nearly twice the size, or 2 gigabytes. NOTE: Future product enhancements will require the Modern view. If database size is a concern and you want to provide the Classic view to your users, you can disable the Modern view for the present, and re-enable it when you acquire the new functionality. Enable Classic or Modern View By default, Sage SQL Gateway data is transformed to the Modern view. If you want to include the Classic view in addition to (or instead of) the Modern view, follow these instructions. Enable or Disable Classic or Modern Views 1. Open SQL Server Management Studio and connect to the instance on which Sage SQL Gateway is running. 2. Browse to the SageConfiguration database. 3. Click New Query. Verify that SageConfiguration appears in the database selection in the toolbar. 4. The Classic view is disabled by default when you install Sage SQL Gateway. To enable Classic view, paste the following text into the query, and then press F5. exec [Gateway].[GenerateClassicSage300CREViews] 1 The 1 at the end of this line turns the Classic view switch on. To turn the switch off, (so the Classic view is not created), change this to a 0, and press F5: exec [Gateway].[GenerateClassicSage300CREViews] 0 38 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway 5. The Modern view is enabled by default. To disable Modern view, paste the following text into the query and press F5. exec [Gateway].[GenerateModernSage300CREViews] 0 To enable Modern view, change the 0 to a 1 and press F5. exec [Gateway].[GenerateModernSage300CREViews] 1 How Are the Schedule Start and End Times Used? The From time you specify on the Schedule tab determines the time that replication starts. Replication can take a long time and all operators should be logged out of Sage 300 Construction and Real Estate while it runs, because any changes made to the data during replication can affect the data integrity. The following example illustrates how this can happen: 1. You ve specified a replication time range of 5:00 p.m. to 9:00 p.m. 2. The process starts promptly at 5:00 p.m. Data replication proceeds by table, in alphabetical order by name. 3. Accounts Payable invoices and vendors are copied at 5:05 p.m. 4. An operator posts a new invoice at 5:10 p.m. The invoice is not included in the replicated Accounts Payable invoices (which have already been copied). 5. General Ledger account balances are copied at 5:20 p.m. The General Ledger account affected by the invoice includes the new invoice in the total. The Accounts Payable vendor s total does not include the invoice so the SQL data s ledgers appear out-of-balance. NOTE: To prevent such discrepancies, any change in the data causes the replication to fail, and the data is rolled back to the last successful attempt. 6. The replication fails shortly after 5:20 p.m. because of the added invoice. 7. The system compares the To time listed on the Schedule tab to the current time. The end time (9:00 p.m.) is still in the future, so a new attempt is started at 5:21 p.m. 8. If this attempt is completed successfully, the process is finished for the night. 9. If further attempts do not succeed, the system continues to restart the replication for the duration of the time range. If all subsequent attempts fail, the data is rolled back to the last successful attempt. This could mean that the reporting data is more than 24-hours old. However, it does not have inconsistencies resulting from activity during the time range. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 39

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate After Successful Replication Once you have verified that the test replication was successful, you ll re-configure Sage SQL Gateway to replicate your production data. Some considerations are noted here. With each nightly replication, the destination database is deleted and a new one created in its place. In the section Designing Reports with Sage SQL Gateway Data starting on page 43, you ll learn about creating custom views and related tasks in the destination database as well as the specific procedures needed to ensure that your changes are re-applied after each replication. Read that section carefully before you proceed with report development or other processes that will access the replicated data. To delete the source databases that you used for testing, click the red X, and then click New source to add the production databases. The name of your destination database can remain the same. If you assign a different name, you should delete the existing test database from SQL Server. 40 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Install and Configure Sage SQL Gateway Depending on the duration of the test replication, you might need to adjust the scheduled time accordingly. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 41

Install and Configure Sage SQL Gateway Sage 300 Construction and Real Estate 42 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Designing Reports with Sage SQL Gateway Data Designing Reports with Sage SQL Gateway Data You ve installed and configured Sage SQL Gateway and replicated your data. Now you can design reports to run on your destination database but some considerations apply to this process. This section covers: The default security elements present after the first successful Sage SQL Gateway replication. How to design custom views on which to base your reports. Procedures for incorporating existing Crystal Reports integration formulas and functions into your reporting views. Default Security Configuration After successful data replication, the destination database is attached to SQL Server, and only the SQL Server system administrator can view the data. By design, your data remains fully protected until you grant access to those who will design or view reports. Keep in mind that changes you make directly to the database are deleted with each nightly replication so you ll need to incorporate your modifications into the nightly process if you want to retain them for reporting. The method for doing this is covered in this section. During data replication, Sage SQL Gateway creates views corresponding to each table in the destination database. If you enabled the Modern view, these views are stored in the Sage300 schema. If you enabled the Classic view, the views are stored in the dbo schema. FOR MORE INFORMATION: See How is the Data Transformed? on page 35 for details about the Modern and Classic views. The replication also creates two database roles in the destination database: SageReportDesigner and SageDataReader. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 43

Designing Reports with Sage SQL Gateway Data Sage 300 Construction and Real Estate About the Views The views in the Sage300 and dbo schemas provide access to the tables and fields in the destination database. Using these views as the basis, create your own custom views to include only the rows and columns required for a report. NOTE: To ensure that your custom views are re-created with each replication, follow the instructions in this section for creating custom database objects. About the Sage Database Roles The destination database contains database roles designed to give report designers and viewers access to the data. Initially, users with these database roles cannot access views in other schemas. As you add custom views, you ll run a stored procedure to grant appropriate access to these users. SageReportDesigner Database Role The SageReportDesigner database role is intended for report designers, who will design and test custom views to support reports they are building. It gives database users the following: Read-only permission to all views under the schema corresponding to the Classic or Modern setting. Also, read-only permission to the Security schema s LastExtraction view, which is explained in Including the Last Data Extraction Date on Reports on page 55). Access to the structure but not the data of the tables in the appropriate schema. This allows report designers to evaluate table columns for possible indexing, but not to run reports directly on the tables. Permission to create custom schemas and views in the destination database. This table shows the information that can be seen by report designers. Mode Enabled Classic Modern Both Visible Schemas Views: dbo Tables: Security_Sage300CRE (structure only) Views: Sage300 Tables: Security (structure only) Views: dbo and Sage300 Tables: Security_Sage300CCREand Security (structure only) 44 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Designing Reports with Sage SQL Gateway Data SageDataReader Database Role The SageDataReader database role is intended for report viewers (not designers), who will access reports on the destination database. This role gives database users read-only permissions to all views under the schema corresponding to the Classic or Modern setting (as well as the Security schema s LastExtraction view). This table shows the information that can be seen by report viewers. Mode Enabled Classic Modern Both Visible Schemas Views: dbo Views: Sage300 Views: dbo and Sage300 NOTES: The SageSecurityAdministrator and SageSecuritySelfAdministrator database roles are reserved for use in future product releases. Do not assign users to them at this time. With each data replication, the destination database is deleted and a new one created in its place. As part of creating the new database, database users who have been assigned to the SageReportDesigner and SageDataReader roles are re-created. Preparing Custom Views for Your Reports Identify the existing reports that you will re-design to use the Sage SQL Gateway data. For each report, you ll create a custom view that supplies each field required by the report, and base your reports on your custom views. Creating Custom Database Objects Providing access to report viewers involves creating your own schema and views, and then granting access to these views to those who will view the reports. You can create a custom database object (such as a schema) through SQL Server s user interface, or by running a short SQL statement in the query window. However, if you add the object to your destination database using either of these methods, it will be deleted with the next scheduled replication. To ensure that your custom objects are re-created with each nightly replication, you ll save script files in the following location on the Gateway server. After data is replicated, any files in this folder are processed in order by file name. C:\ProgramData\SAGE\CRE\HostingFramework\ Sage.SqlGateway.SDW.Service.1.0\CustomScripts\My Scripts 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 45

Designing Reports with Sage SQL Gateway Data Sage 300 Construction and Real Estate NOTES: If you uninstall Sage SQL Gateway, the scripts are moved to a folder called Backups in the same location as the My Scripts folder. SQL Server administrators have access to the My Scripts folder, but report designers may not. The system administrator can either grant folder access through Windows security, or plan to store the files in the correct location when received. You ll want to specify the process to use when report designers have script files to deploy. Adding Secure Objects to the Database The recommended process for granting data access to report viewers looks like this. Create a Custom Schema Creating a new schema allows you to store custom views in one location. Create Custom Views For each report that needs to be re-designed, extract the underlying database query and create a corresponding view. Store the view in your custom schema. Grant Access to Custom Views Report viewers must be able to access the custom view. Run a stored procedure that grants the required access and maintains it for future upgrades. Create Database Users Once your schemas, roles, and views are established, create database users and assign them to the appropriate roles. Base Reports on Custom Views Reports based on the custom views will be visible to individuals who have access to the view. To facilitate this process, a script template is provided which you can modify as needed. 46 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Designing Reports with Sage SQL Gateway Data Modify the Custom Script Template On the Gateway server, browse to the My Scripts folder: C:\ProgramData\SAGE\CRE\HostingFramework\ Sage.SqlGateway.SDW.Service.1.0\CustomScripts\My Scripts Open the file called Example_CreateCustomView.sql. Notice that all lines are currently commented out. Follow the procedures described in this section to modify this file. Create a Custom Schema You ll store your reporting views in a custom schema. Find Section 1 of the script, and un-comment the code portion. IF (NOT EXISTS(SELECT * FROM [sys].[schemas] WHERE [name] = N'CustomSchema')) BEGIN EXEC (N'CREATE SCHEMA [CustomSchema]') END GO Replace the two instances of CustomSchema in this command with the name you want to use for your schema. TIP: Do not use any of the following names for your schema, as they are used by Microsoft SQL Server or Sage SQL Gateway for other purposes: dbo, MyReports, Query, Query_Custom, Reports, Sage300, Secured, and Security. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 47

Designing Reports with Sage SQL Gateway Data Sage 300 Construction and Real Estate Create a Custom View Create views to support your report designs. You might decide to design the query in a new query window to verify that it returns the results you need. Find Section 3 of the script, and substitute your new query for the code. For important considerations when developing the select statement, see Refining the View Criteria Based on Existing Reports on page 49. CREATE VIEW [CustomSchema].[ViewName] AS SELECT TOP 100 PERCENT -- top 100 percent allows order by clause [View1Alias].[ColumnName1] [ColumnName1Alias], [View1Alias].[ColumnName2] [ColumnName2Alias], [View2Alias].[ColumnName1] [ColumnName3Alias] -- columns are aliased to ensure future compatibility FROM [Sage300 or dbo].[view1] [View1Alias] -- tables are aliased to ensure future compatibility JOIN [Sage300 or dbo].[view2] [View2Alias] ON ([View2Alias].[.DatabaseLabel] = [View1Alias].[.DatabaseLabel]) -- join to the same database AND ([View2Alias].[ColJoin2] = [View1Alias].[ColJoin1]) -- join other fields as needed JOIN [Sage300 or dbo].[view3] [View3Alias] ON ([View3Alias].[.DatabaseLabel] = [View1Alias].[.DatabaseLabel]) AND ([View3Alias].[ColJoin3] = [View2Alias].[ColJoin2]) WHERE ([View2Alias].[ColumnName2Alias] = N'SomeValue') AND ([CustomSchema].[UserDefinedTblFn]([View1Alias].[ColumnFn1]) > [View2Alias].[ColumnFn2]) ORDER BY [Sage300 or dbo].[view3].[columnname3alias] DESC GO Element CustomSchema ViewName View#Name ColumnName# View#Alias ColumnName#Alias ColJoin# UserDefinedTblFn ColumnFn# Notes Use the schema name you substituted earlier. Assign a unique view name for the custom view. Substitute a valid view name from the Sage300 or dbo schema. Substitute a valid column name from the Sage300 or dbo view. Assign an alias to each view and column name. These are the names report designers will see. Substitute the appropriate join statements. Edit the WHERE clause to include any user-defined table functions or other criteria as needed. 48 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Designing Reports with Sage SQL Gateway Data Refining the View Criteria Based on Existing Reports Several Crystal Reports designs developed for Sage 300 Construction and Real Estate make use of special integration formulas to display information based on the company folder. These integration formulas do not work with the Sage SQL Gateway database. The following methods explain how to incorporate this information into your custom view so your reports can access it. Joining and Filtering by Data Folder Because the replication merges multiple databases, you need to include the.databaselabel field in the join clauses. For example, the FROM clause in the query shown on the previous page looks like this: FROM [Sage300].[AP_Transaction_Transaction] INNER JOIN [Sage300].[GL_Master_Account] ON [Sage300].[AP_Transaction_Transaction].[Accounts_Payable_Account] = [Sage300].[GL_Master_Account].[Account] The portion in blue specifies the fields on which the tables are linked. To add the.databaselabel field, make the changes shown in red. If more than two tables are joined, you must add the.databaselabel field to each corresponding link. FROM [Sage300].[AP_Transaction_Transaction] INNER JOIN [Sage300].[GL_Master_Account] ON ( [Sage300].[AP_Transaction_Transaction].[Accounts_Payable_Account] = [Sage300].[GL_Master_Account].[Account] AND [Sage300].[AP_Transaction_Transaction].[.DatabaseLabel] = [Sage300].[GL_Master_Account].[.DatabaseLabel]) To filter the view so that only data from a certain company folder is included, edit the WHERE clause to include the condition: WHERE [Sage300].[GL_Master_Account].[.DatabaseLabel] = 'CompanyName' FOR MORE INFORMATION: To find the view names to substitute in the destination database, see How is the Data Transformed? on page 35s. Displaying the Company Name and Contact Information (tscontroldata) Existing Crystal Reports use tscontroldata() integration function to return the name of the company folder from the CTL_TS COMPANY_INFORMATION table (or the control table). Sage SQL Gateway combines the control tables from each company folder you replicate into a single table with rows for each company. In Modern view, to display the company name and other information, add the view called [Sage300].[TS_Control_CompanyInformation] to your query, linking by the.databaselabel field. In Classic view, add the [dbo].[ctl_ts COMPANY_INFORMATION] view, also linking by the.databaselabel field. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 49

Designing Reports with Sage SQL Gateway Data Sage 300 Construction and Real Estate Filtering on.tablelabel in place of the TsAskFile Function The tsaskfile formula limits the file types the operator can select when running the report. For example, the operator can select New or Current when running a report based on transaction types from multiple tables. Modern View In Modern view, Sage SQL Gateway combines all like transaction types into a single table, adding the.tablelabel column to indicate the original source table for the row. You can filter on the.tablelabel to limit the view to only certain tables by adding a clause such as the red text shown here to the WHERE clause: WHERE (Original Condition) AND [Sage300].[AP_Transaction_Transaction].[.TableLabel] = 'current' Alternately, if you want to retain the report viewer s ability to select the file when running the report, first create a parameter that prompts the user for the file name or names, and then add the filter to your selection criteria: [Sage300].[AP_Transaction_Transaction].[.TableLabel] = {@FileName} Classic View In Classic view, separate tables are retained for each file type. If you want to retain the report viewer s ability to select the file at run-time, create a parameter that prompts the user for the file name or names, and then add the filter to your selection criteria. 50 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Designing Reports with Sage SQL Gateway Data Grant Access to Custom Views Find the portion of the script that executes the stored procedure called AddViewToFeature and un-comment it. EXEC [Security].[AddViewToFeature] N'CustomSchema', N'ViewName', N'FeatureName', N'FeatureGroupName' GO This stored procedure grants read access to the view you just created to the SageReportDesigner and SageDataReader database roles. It requires the following four parameters: Parameter CustomSchema ViewName FeatureName FeatureGroupName Notes Use your custom schema name. Use your custom view name. Future releases of Sage SQL Gateway will support groups of features to which you can add reporting views. This parameter is required, but the feature name you enter here will not be accessible with the current version of the product. You can change it later. This parameter is required, but the group name you enter will not be accessible. You can change it later. Substitute the appropriate parameter values in the statement. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 51

Designing Reports with Sage SQL Gateway Data Sage 300 Construction and Real Estate Deploy the Custom Script and Add Subsequent Views When you are finished modifying the script file, save it with an appropriate name and store it in the MyScripts folder on the Gateway server, in this location: C:\ProgramData\SAGE\CRE\HostingFramework\ Sage.SqlGateway.SDW.Service.1.0\CustomScripts\MyScripts Each custom view that you create will require a corresponding Create View command, plus an Exec command that calls the AddViewToFeature stored procedure. As you develop subsequent custom views, you can deploy them in one of two ways. Include All Create View Statements in a Single File Open your custom script file. Add a copy of the Create View and Exec statements to the end of the file for each reporting view you need to include. Edit the copy as needed for each new view. Be sure to test the file to make sure the results are as expected. If you will have many custom views, the file could become quite lengthy and difficult to troubleshoot. Create a.sql File for Each Custom View With this method you end up with a.sql file for each custom view. This can make it easier to test and troubleshoot each script individually. However, you ll want to consider your file naming convention. Files in the My Scripts folder (at the location shown above) are processed in order by file name. If some of your custom objects depend upon the presence of other custom objects, name the files sequentially according to the order in which they should be processed. To create a separate script file, browse to the My Scripts folder location and copy the.sql file. Rename the copy and edit the custom view information for the next view you need to include. Create Database Users In the destination database, create database users for each person who will create, modify, or access reports. Assign these users to either the SageReportDesigner or SageDataReader report roles as appropriate. WARNING: Database users assigned to these two database roles are re-created during each nightly replication and re-assigned to the appropriate role. Users who are not assigned to one of these two roles are not re-created in the database. If users will need to access data after the next successful replication, add them to one of the roles provided. 52 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Designing Reports with Sage SQL Gateway Data Working With Report Designs Once your custom views are in place, you can begin designing reports. We recommend that you re-create each report design from scratch, using only the custom views you created. This practice will enable you to take advantage of future enhancements Sage SQL Gateway. NOTE: This section shows how to work with Crystal Reports designs. You can use any report-design tool that can connect to SQL Server data. To Create New Reports Using the Replicated Data 1. In Crystal Reports, select File > New > Blank Report. 2. Expand Create New Connection and then click OLE DB (ADO). 3. Next to Provider, scroll down to SQL Server Native Client 10.0. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 53

Designing Reports with Sage SQL Gateway Data Sage 300 Construction and Real Estate 4. Click Next, and enter your SQL Server credentials. (The user you enter must have access to the custom schema on which the design will be based.) 5. Click Next, and then click Finish. 6. In the Database Expert window, select the view from your custom schema. 7. Expand Security > Views and add the LastExtraction view. (Add the LastExtraction column to the report header so that report viewers can see the date of the last successful replication. The information on the report only shows information as of that date. 8. Click OK. 54 Local Training From Business Partners 2013 Sage Software, Inc.

Sage SQL Gateway Installation and Reference Guide Designing Reports with Sage SQL Gateway Data Including the Last Data Extraction Date on Reports When Sage SQL Gateway replicates your data, errors in the process cause replication to fail. If this happens, the data is rolled back to the state it was in before the replication attempt started, to preserve data integrity. This means your SQL data could be more than 24 hours old. FOR MORE INFORMATION: See How Are the Schedule Start and End Times Used? on page 39. When designing reports, include the date and time of the last successful replication. This information is found in the view [Security].[LastExtraction]. Place the [LastExtraction] field on your report header to display the date and time. NOTE: The [Security].[LastExtraction] view is the only exception to the rule that users with the SageDataReader database role can view only the Sage300 schema. (See Default Security Configuration on page 43.) Format or Convert Date-Time Fields In Sage 300 Construction and Real Estate, date fields are stored as date only: YYYY-MM-DD. When SQL Server imports date values, they are automatically stored as date-time fields: YYYY-MM-DD HH:MM:SS. If you display date fields on the new report design, you can format the field to display as the date only. If you use the field in a formula, you probably need to convert it to a date-only value. Use Crystal Reports Date (DateTime) function for this purpose. 2013 Sage Software, Inc. Online Training and Workbooks at www.sageu.com 55