For Microsoft
SQL Server 2000, 2005, 2008 and 2012
Installation
Guide v2.2
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
SafePeak v2.2 Installation Guide
No part of this document may be reproduced or transmitted in any form or by any means
electronic or mechanical, for any purpose without the express written permission of SafePeak
TECHNOLOGIES LTD. Information in this document is subject to change without prior notice.
SAFEPEAK is a trademark of SafePeak TECHNOLOGIES LTD
Microsoft, Windows and SQL Server are registered trademarks of Microsoft Corporation.
The names of other companies and products mentioned herein are trademarks or registered
trademarks of their respective trademark owners.
For Sales and Technical Support please visit www.safepeak.com
This guide is frequently updated to reflect changes in the product. The latest version can always
be accessed by customers under support at www.safepeak.com/download
This guide was prepared for SafePeak for SQL Server version 2.1 and version 2.2
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
Contents
1.
Introduction ................................................................................................................................................... 4
2.
Minimum System Requirements ............................................................................................................ 4
3.
How to Install SafePeak ............................................................................................................................. 5
4.
License Agreement ...................................................................................................................................... 5
5.
Where to Install SafePeak ......................................................................................................................... 6
6.
Choosing the Installation type................................................................................................................. 6
7.
Setting Up Microsoft NLB with Virtual IP ........................................................................................... 7
8.
Define SafePeak IP ....................................................................................................................................... 8
9.
Adding SafePeak License ........................................................................................................................... 8
10.
Administrator login details .................................................................................................................. 9
11.
During Installation................................................................................................................................... 9
12.
When the Installation Is Complete ................................................................................................. 10
13.
Uninstall SafePeak ................................................................................................................................ 11
14.
Adding Database Instances ............................................................................................................... 12
How to configure SQL Named Instance ................................................................................................ 14
15.
Appendix – Connecting the Application to SafePeak .............................................................. 16
16.
Configuring Dynamic Objects and Manual SQL Patterns ....................................................... 17
17.
Appendix – Connecting SQL Server Agent to SafePeak .......................................................... 23
18.
Appendix – Connecting Linked Servers to SafePeak ............................................................... 24
19.
Appendix – IIS troubleshooting ....................................................................................................... 26
20.
Appendix – SafePeak user permissions ........................................................................................ 28
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
1. Introduction
Welcome to SafePeak for Microsoft SQL Server. This guide explains how to install and set up SafePeak
v1.3. SafePeak dramatically accelerates data access and retrieval providing immediate results, with no
need to change existing databases or applications. Increasing database response time from SQL
database queries and enhancing system scalability by orders of magnitude, SafePeak ensures high
availability for mission-critical applications and safeguards against unpredictable traffic spikes and
surges of usage.
We have tried to streamline the SafePeak installation to make it easy and straightforward to install. The
information contained in this guide will direct you in preparing for the installation of SafePeak and
successfully executing the software into place.
Please use the Mapping Table in the Appendix Section to assist you in the installation. Please collect this
information before proceeding with the installation.
2. Minimum System Requirements
SafePeak has been tested and verified with Microsoft SQL Server 2000, 2005, 2008 and 2012. Please
make sure that the server on which you plan to install SafePeak meets the minimum system
requirements for the program to run: You must only install ONE SafePeak instance at one time
otherwise you could cause serious system instability. If other applications, programs or data have
previously been installed on your server, they may interfere with SafePeak. We recommend removing all
software, before installing SafePeak to avoid the possibility of serious problems.
Deployed on Windows 2008 R2 / Windows 2008 64 Bit:
RAM
CPU
Hard Drive
Network Cards
4GB per SafePeak Instance
Minimum 8GB
2 Cores Per SafePeak Instance, Minimum 1 CPU / 4 Cores
70GB for each SafePeak Instance
1Gb Ethernet, or similar to the SQL Server network card
Actual system requirements (CPU Cores, RAM and Disk) vary between different installations and
depend on the database load (transactions / second) of each instance.
Typical installation for 1 SQL Instance, 2000 tran/sec: 8 CPU Cores + 12GB RAM.
Typical installation for 1 SQL Instance, 5000 tran/sec: 16 CPU Cores + 24GB RAM + 100GB disk.
Typical installation for 2 SQL Instances, 1000 tran/sec each: 8 CPU Cores + 16-20GB RAM + 100GB disk.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
3. How to Install SafePeak
Copy the SafePeak installation executable onto the SafePeak dedicated server. You can either run as
console or use remote desktop to start the installation. When installing from the CD, the install wizard
will pop up automatically. If the pop up does not appear, go to the root directory of the CD and double
click on Setup.exe. Click Next to continue.
* Some the of the screenshots show version 1.3, however the
4. License Agreement
The license agreement will appear. Please read the license agreement and if you agree to the terms and
conditions, click on I AGREE to move forward in the installation.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
5. Where to Install SafePeak
The next screen determines in which directory SafePeak will be installed. The default directory is
C:\SafePeak. If you would like to install SafePeak in a different directory, please browse to choose a
destination folder. The minimum free space available on the disk is 30 GB. Press Next to initiate the
installation of SafePeak.
6. Choosing the Installation type
Select the installation type (standard or cluster). If you are installing SafePeak on a Virtual Machine, skip
this section and go to section 8.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
7. Setting Up Microsoft NLB with Virtual IP
This step is relevant only for physical machine installation, if you are installing on a VM please proceed
to section 8.
There are two fields that need to be filled in the next screen.
1. The IP address is used to define the Virtual IP. All connection strings will use this IP address to
redirect the network traffic to SafePeak. The IP address should be in the same segment as the
database server. Your IT systems manager should provide the IP address.
2. The second field is the Interface Name on which the Virtual IP will be created. Make sure that it
has static IP with the same subnet mask as you entered in the first field. Click on Next.
Note: This is not the IP address configured for the SafePeak server. It is a secondary IP address used
for the SafePeak cluster.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
8. Define SafePeak IP
This step is relevant for installation on a virtual machine. This screen will appear if the Server / VM has
several IPs and it allows you to select the IP SafePeak will use.
9. Adding SafePeak License
Browse to physical location on your hard drive where SafePeak license file is located.
In case you are installing a trial version: you can skip this step a 14 days trial license will be automatically
installed.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
10.
Administrator login details
Please enter SafePeak Administrator full name, email and password. These credentials will
be used for login to SafePeak Dashboard. Additional logins with more limited operational
permissions can be inserted later inside SafePeak Dashboard.
11.
During Installation
The installation consists of various steps including directory creation, file extraction, creation of
SafePeak internal repository, addition of windows features such as .NET 3.5 framework, and IIS as
needed and the configuration of Windows NLB (for dedicated server).
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
12.
When the Installation Is Complete
When the installation is complete a new screen will appear enabling you to start SafePeak and add
instances. Simply check the box Start SafePeak UI and click on Finish to invoke SafePeak GUI to start
adding database instances.
Go to section 14 to begin adding database instances.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
13.
Uninstall SafePeak
SafePeak can be uninstalled using the Add/Remove Programs in the Control Panel or from Start>Programs->SafePeak->Uninstall. After clicking the uninstall button, a confirmation question will pop up.
Click Yes to uninstall SafePeak or No to cancel. The uninstall process will remove all SafePeak services,
internal repository, delete files and delete the directories created in the installation process.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
14.
Adding Database Instances
SafePeak automatically provides a default email address and password. Press Login to continue.
Go to Settings tab and click on the SQL Instance Management to add new instances.
Click on the Add button at the top of the screen.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
The Add Instance dialog box will pop up. Enter the requested parameters as follows:
1. Instance Name – This name will appear in SafePeak Dashboard. Tip: use the same name as the
SQL Server Instance
2. SQL host or IP – The IP address or Host name for the SQL Server instance
3. SQL port – The port that the SQL Server instance is configured. Verify that your SQL Server
Instance Port is set to be Static port.
4. SQL username – The login for the SQL Server. SafePeak requires limited permissions only (view
any definition. To see exact permission click on the ? mark.
In case the SQL Server Agent will be configured to run via SafePeak (using Alias), this login must
have sysadmin privileges.
5. Password – The password of the SQL username
6. SafePeak Port – The port which SafePeak will use for this instance.
 If you have only one Instance, use the same port as your SQL Server Instance.
 For multiple SQL Instances – best practice is to add “1000” to each additional instance
(1433, 2433, 3433 etc), in order to prevent ports conflicts (each SafePeak instance is
actually uses several ports for internal processes).
Click OK and the new instance will appear in the table of instances.
Alert Line - at the top of the screen, the alert line will notify you that the instance was successfully
recorded to be installed. It usually takes about 10 seconds until the installation process begins.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
How to configure SQL Named Instance
SafePeak fully supports SQL Server Named Instances, for example: MyDBServer\InstanceName.
To configure a named instance:
1) In the “SQL host or IP” – place only the host or IP of your server. Example: MyDBServer
2) In the “SQL port” – place only the Instance port. To find your instance port see “?” help:
3) SafePeak port can be the same or can differ from your SQL Server instance port.
SafePeak will be able to forward your application to the right port.
You application can connect to SafePeak as it is a regular named instance:
SafePeakIP\InstanceName
4) In the connection string for the InstanceName use the real SQL Instance Name.
The installation process contains several phases:

Installing – All needed services, firewall ports, directories are created

Learning instance structure – The Metadata Learning Service starts learning the instance
structure and creates the dependency relations. The process usually takes several minutes, but
can also take few hours for SQL Instances with many databases and very complex schemas.
The 8/15 represents learning status = learning of 8 databases completed out of total 15.
While learning schema the Dashboard screen will show “Cache: Disabled(DDL)”.
Queries can arrive but the Cache is disabled/locked:

Active – The Metadata Learning Service has completed learning the Instance Structure and
SafePeak is ready to accept requests for this instance.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
When the installation is finish – verify on Dashboard:
“SafePeak” and “Cache” status should be “Enabled”.
Please reference the product help included in SafePeak to continue. Please send any comments or
questions regarding this installation guide to support@safepeak.com.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
15.
Appendix – Connecting the Application to SafePeak
In order to connect the application to SafePeak, there are few steps to follow:
1. Option 1: Connect application using WINDOWS\System32\Drivers\Etc\hosts file
You may choose to reroute your application by changing the “hosts” file on all application
servers. This way all database access will be immediately rerouted via SafePeak.
Example:
# SafePeak IP
Database Hostname
10.10.10.245
MyDBServerName
2. Option 2: Update database connection string in the application
All the database traffic has to be routed via SafePeak. In order to do that, you need to change
the database connection string from the Database server to SafePeak server. The connection
string can be found in web.config files (for web servers) or the application management screen
(SharePoint, etc.)
The change itself is simple, examples:
 In .Net connection string with default Ports:
o From: Server=myDatbaseServerIpOrName;Database=myDataBase;User
Id=myUsername;Password=myPassword;
o To: Server=mySafePeakServerIpOrName;Database=myDataBase;User
Id=myUsername;Password=myPassword;
 In .Net connection string with non-default ports:
o To (IP comma Port):
Server=mySafePeakServerIpOrName,SafePeakPort;Database=myDataBase;U
ser Id=myUsername;Password=myPassword;
 In JDBC:
o From: jdbc:sqlserver://[db server]:[db port];databaseName=db1
o To: jdbc:sqlserver://[safepeak server]:[safepeak port];databaseName=db1
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
16.
Configuring Dynamic Objects and Manual SQL Patterns
Configuring Dynamic Object and Manual SQL Patterns configuration is done after the application is
connected and sent its queries for 30 minutes or more. This configuration part is critical and can make a
difference between 1% cache to 90% cache. The following matters will be addressed:
1. Dynamic Objects
2. Non-automated SQL Patterns (non-deterministic SQL queries’ patterns).
Dynamic Objects
Dynamic Objects are database objects that SafePeak Metadata Learning service couldn’t fully
understand. Most common objects are “stored procedures” and “user defined functions”.
In such cases, SafePeak takes the safest course of action to ensure data correctness. However, this
reduces SafePeak cache efficiency when the object is used. By default, when a dynamic object is
executed, SafePeak addresses it as follows:




Evict All Cache – SafePeak clears all data from the cache and disables SafePeak cache for the
duration of the current transaction;
Consider possible DDL execution – After the statement is executed, SafePeak sends the
SafePeak Metadata Learning service a request to analyze the database, and maintains the
cache disabled for the duration of this analysis. This shows up in the SafePeak Dashboard as
“Cache: DISABLED (DDL)”;
Contains possible TCL execution – After the statement is executed, SafePeak analyzes the
database response to determine if a transaction was opened or closed in the database;
Possibly Non-Deterministic – SQL statements that reference or execute these objects will
not be auto-applied.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
In most cases, by configuration of all required dynamic objects, it is possible to significantly increase
SafePeak cache efficiency.
There are four main options for an object to become “dynamic”:
a) Dynamic SQL execution.
The object contains statements that dynamically create an SQL and execute it. Although
SafePeak knows how to scan the dynamic SQL in procedures, it may not fully understand it in
cases where the SQL is based text-based parameters.
b) Encrypted objects
SafePeak username does not have the permissions to access the SQL text to determine what the
object does.
c) CLR objects
SafePeak handles SQL objects and does not try to understand objects written in CLR.
d) SQL parsing failure
On rare occasions, the SafePeak parser may find a statement it cannot parse in the object’s SQL
text and the object is considered and treated as “dynamic”.
Configuration of Dynamic Objects
Definition in SafePeak of any object includes:
a) Boolean flags: Evict All Cache, DDL command inside, Transaction inside, Deterministic query.
b) Dependencies: 1) READ, WRITE of tables and views; 2) Exec of Stored Procedure and functions.
What objects require configuration:
The focus of configuration should be on the actually executed dynamic object. See them in:
1. Dashboard – Important Notifications area
2. Cache management \ [Instance] \ [Database] \ Dynamic Objects (TAB):
a. Require Attention filter
b. All Dynamic Objects where “% of Dyn. Traffic” > 0%.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
How to configure:
1. Open the object:
2. Read the “Analysis Result and instructions” – information what needs to be configured.
3. See object schema and configure its dependencies:
“Schema and Dependencies (tab)“  “See Schema and Add Objects”:
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
4. Review the “Analysis result and instructions” line by line and add (if needed) missing objects
either as Read/Write/Execute dependencies.
5. Configure the Object Information flags. Near every checkbox there is a “?” help icon with
detailed explanation about the flag purpose.
When possible, uncheck all right checkboxes (Evict ALL, DDL, Transaction)
6. Click Save.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
Manual activation of Non-Automated SQL Patterns
In cases the sql pattern or its referenced stored procedures are using non-deterministic functions the
SafePeak will define such pattern as non-deterministic (Auto=No). Non-deterministic functions are those
that each function execution a return different result. Most common example is getdate() or
getutcdate(). In such cases SafePeak caching is not always possible, and the Administrator of SafePeak
needs to active/configure the caching manually.
1. Enter the SQL Patterns area:
Cache management \ [Instance] \ [Database] \ Show Patterns (button)
2. Select “Cacheable Manually” filter.
3. Review and configure settings of all/most SQL Patterns.
Focus on sql patterns that have slow database response time and/or high % of traffic.
4. If you make changes to the pattern click Save().
5. To Activate caching – Select the checkbox to ON.
6. Click Apply() when you finish configuration of all patterns
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
In many cases knowing the application or reading the query helps determine that the sql pattern can be
set for cache. For example: “select datepart(day, getdate())” is a cacheable query, as the result remains
the same until 00:00:00 o’clock. Another example is when a user knows that certain column all date
values are set to date only, like “12-Apr-2010 00:00:00” so all queries that have a getdate() condition to
such column will have the same result within scope of single day. A use third case is when a small period
of caching can create great benefit to the application. In all these cases it is up to the SafePeak
Administrator to activate and configure caching of the pattern.
In these cases, the pattern can be manually applied and configured, with or without advanced caching
rules, for providing performance and scalability for the application and the database.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
17.
Appendix – Connecting SQL Server Agent to SafePeak
If you have SQL Agent active and SQL Agent Jobs that perform changes on the database then
you need to reroute those jobs via SafePeak. This is done by defining an alias for SafePeak and
set this alias as the connection for the SQL Server agent.
It is crucial that you will connect the SQL Server Agent to SafePeak, otherwise you may find data
inconsistency as critical WRITE commands do not update SafePeak cache.
To configure the SQL Server Agent please refer to “Configuring-SQL-Agent” document in the
SafePeak website: http://www.safepeak.com/Product/Resource-Library/Configuring-SQL-Agent.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
18.
Appendix – Connecting Linked Servers to SafePeak
In order to redirect linked server to work with SafePeak instead of the SQL Server instance do
the following:
1. Open SQL management studio and connect to the SQL Server instance in which the link server
is defined
Review the link server security definition as it will be required when creating a new link server
2. Create an alias with the exact name of the link server pointing at SafePeak server as explained
in the Appendix on section 16
3. Delete the existing linked server definition (right click->delete) press ok in the delete object
window.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
4. Create a new linked using the alias defined earlier
Setup the security properties as were defined in the original linked server
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
19.
Appendix – IIS troubleshooting
When installing SafePeak on an existing or restored machine, there might be issues with
opening and logging-in into the SafePeak management interface. In case you encounter
those issues please do the following:
1. SSL configuration – In the current version, SafePeak does not support SSL configuration.
SafePeak requires SSL to be set to ignore on both sites defined on the SafePeak machine.
Open the IIS configuration on SafePeak machine and expand the tree until you reach ‘ui’
and ‘DCFService’, choose ‘ui’ and open the ‘SSL settings’ by double click on the icon
Set the ‘Client certificates’ button to ‘Ignore’ and click ‘Apply’ on the top right.
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
Repeat this operation for ‘DCFService’
2. .Net Framework registration – If you had .Net Framework 4.0 installed prior to SafePeak
installation, you will need to re-register the .Net Framework in order to Login into the
SafePeak UI
Open command line as administrator on SafePeak machine
Change directory to c:\Windows\Microsoft.NET\Framework64\[version folder]\
Currently the highest version folder is ‘v4.0.30319’
Run the following command:
aspnet_iisreg.exe –iru
Perform login into SafePeak management UI
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
20.
Appendix – SafePeak user permissions
1. Metadata Learning Permissions
SafePeak requires VIEW ANY DEFINITION permission and ability to access each
database, in order to learn the structure of the database and read the definition of stored
procedures.
This can be done in the following way:
1. Open the server properties (right click on the server), select “Permissions” page
Find SafePeak login and grant it “View any definition” + Press OK
2. Open the properties of the SafePeak login, Select “User Mapping” page
Check all (or just specific) databases that SafePeak needs access to + Press OK
2. Metadata Learning Login to Schema mapping
For Metadata purposes we compile a list of Login to default schema for each database.
To get this list the user logged for Metadata need to have permission to see other Logins.
SafePeak requires to grant SafePeak login with ALTER ANY LOGIN on SERVER permission.
3. SafePeak Logon Trigger
For SafePeak to work with Logon trigger SafePeak needs VIEW SERVER STATE
permission.
For Logon trigger installation SafePeak need CONTROL SERVER permission.
For management on SQL Server the list of logins to ignore a read & write permission on:
Master.dbo. SafePeakLoginListToIgnore.
The Logon trigger is created automatically on the database server during action of first
connection of SafePeak to the SQL Instance (Add Instance in SafePeak interface  Settings
 SQL instances management).
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
For Sales and Technical Support please visit www.safepeak.com
This guide is frequently updated to reflect changes in the product. The latest version can always
be accessed by customers under support at www.safepeak.com/download
Copyright © SafePeak TECHNOLOGIES LTD. All rights reserved.
Download PDF