Help for Foxhound 4.0.4740a

Table of Contents     [RisingRoad]


Foxhound 4 

Introduction and Setup

Foxhound is two products in one: it is both a database monitor and a schema troubleshooter for SQL Anywhere.

A database monitor is a computer program that measures the activity of a database management system and displays those measurements in a meaningful way, so that you can easily see that everything's OK or quickly learn about problems and threats to performance and availability. A monitor can also send email alerts and even drop connections when something goes wrong.

A schema troubleshooter is a computer program that performs a static analysis of the tables, columns, indexes, foreign key relationships and other objects in the database, displays those objects in a way that's easy to understand and easy to navigate, together with various facts, figures and curiosities which may be problems that need attention.

Requirements

Foxhound Setup

Starting Foxhound

Customizing the Setup

Running Foxhound as a Service

Connecting to Target Databases

Backup

Restore

Controlling Growth

Safe Mode Startup

Starting Multiple Copies of Foxhound

Environment Variables

End User License Agreement

SAP® SQL Anywhere® is a trademark of SAP AG.


Foxhound 4 » Introduction and Setup 
Requirements

1. Windows - Foxhound works with target databases running on other operating systems but the Foxhound engine itself only runs on Windows, and has been tested on Microsoft Windows 7.

2. ODBC - Foxhound itself uses ODBC to connect to your target databases. You don't necessarily need ODBC installed on the servers running your target databases, and you can specify DSN-less connections for Foxhound by using the "String" tab on the main menu page.

3. Chrome, Firefox, IE - The Foxhound client has been tested with the latest versions of Chrome, Firefox and Internet Explorer.

4. JavaScript - Foxhound needs "JavaScript" or "Active scripting" to be enabled in your browser.

5. SQL Anywhere versions 6, 7, 8, 9, 10, 11, 12, 16 and 17 for target databases - Foxhound has also been tested with target databases created with SQL Anywhere 5.5 and running on SQL Anywhere 6 software.

6. SQL Anywhere 16 (build 2127 or later) or SQL Anywhere 17 for Foxhound - Foxhound works with target databases using 6 to 17 of SQL Anywhere but the Foxhound engine itself needs the 32-bit or 64-bit non-authenticated version of SQL Anywhere 16 (build 2127 or later) or SQL Anywhere 17 to run.

7. SQLANY16 or SQLANY17 - The delivered Foxhound shortcuts expect that the SQLANY16 and/or SQLANY17 environment variables will be created by the SQL Anywhere installation (which will happen by default). If neither is the case you may have to modify the corresponding *.bat files. Here are the default settings for Windows 7:

   SET SQLANY16=C:\Program Files\SQL Anywhere 16 

   SET SQLANY17=C:\Program Files\SQL Anywhere 17 

8. FOXHOUND4 - The delivered Foxhound shortcuts expect that the FOXHOUND4 environment variable will be created by the Foxhound installation (which will happen by default). If that is not the case you may have to modify the corresponding *.bat files. Here is the default setting for Windows 7:

   SET FOXHOUND4=C:\ProgramData\RisingRoad\Foxhound4\

9. Disk space - When re-installing or upgrading Foxhound, 60% or more extra disk space may be required during the post-setup process. The "60% or more" figure applies to the amount of disk space occupied by the existing Foxhound installation, not the total used disk space on the drive.


Foxhound 4 » Introduction and Setup 
Foxhound Setup

Foxhound consists of server and client components.

The Foxhound server (or "engine") runs as a single SQL Anywhere database in a Version 16 or 17 network server configured to run as an HTTP (web) server.

The Foxhound client is browser based, with the default URL being this:

http://localhost:80/

The standard Foxhound installation creates Windows Start menu shortcuts to batch files that start both the Foxhound engine and the Foxhound client on the same computer.


Foxhound 4 » Introduction and Setup 
Starting Foxhound

Starting Foxhound is a two-step process: Starting the Foxhound database in a SQL Anywhere engine, and connecting to the Foxhound HTTP server from your browser.

Method 1: The following desktop shortcuts do both steps:

All Programs - Foxhound4 - Start Foxhound via default browser

All Programs - Foxhound4 - Tools - Start Foxhound via Chrome

All Programs - Foxhound4 - Tools - Start Foxhound via Firefox

All Programs - Foxhound4 - Tools - Start Foxhound via IE
The shortcuts above work even if the SQL Anywhere engine is already running; they just ignore the error message produced because the engine's already running, and they press on connecting to Foxhound from the browser.

Method 2: The following "debug" versions of those shortcuts do exactly the same thing, except that (a) they stop the Foxhound database if it is running, before starting it again, and (b) they display any diagnostic messages produced if the Foxhound database fails to start:

All Programs - Foxhound4 - Tools - Start Foxhound via default browser - debug

All Programs - Foxhound4 - Tools - Start Foxhound via Chrome - debug

All Programs - Foxhound4 - Tools - Start Foxhound via Firefox - debug

All Programs - Foxhound4 - Tools - Start Foxhound via IE - debug

Method 3: You can also start the Foxhound database and open the browser in separate steps:

Start - All Programs - Foxhound4 - Tools - Start Foxhound Engine

Specify http://localhost in your browser.

By default the Foxhound shortcuts choose SQL Anywhere 16 over 17, and 64-bit over 32-bit, depending on which folders exist.

You can override those choices with the FOXHOUND4SVER and FOXHOUND4BIN environment variables.

This applies to the version of SQL Anywhere being used to run Foxhound itself, and has nothing to do with the version of SQL Anywhere being used to start your target databases.

Here's how those choices are made by the command files used by the Foxhound shortcuts:

IF EXIST "!SQLANY17!" (  
   SET SDIR=!SQLANY17!
   SET SPGM=dbsrv17.exe
)
IF EXIST "!SQLANY16!" (  
   SET SDIR=!SQLANY16!
   SET SPGM=dbsrv16.exe
)
IF /I "!FOXHOUND4SVER!z"=="17z" (
   SET SDIR=!SQLANY17!
   SET SPGM=dbsrv17.exe
)
IF /I "!FOXHOUND4SVER!z"=="16z" (
   SET SDIR=!SQLANY16!
   SET SPGM=dbsrv16.exe
)

IF EXIST "!SDIR!\Bin32" (SET BIN=Bin32)
IF EXIST "!SDIR!\Bin64" (SET BIN=Bin64)
IF /I "%FOXHOUND4BIN%z"=="Bin32z" (SET BIN=Bin32)
IF /I "%FOXHOUND4BIN%z"=="Bin64z" (SET BIN=Bin64)


Foxhound 4 » Introduction and Setup 
Customizing the Setup These are the command files which start Foxhound:
$backup_foxhound4.bat
$start_foxhound4_chrome.bat
$start_foxhound4_chrome_debug.bat
$start_foxhound4_default_browser.bat
$start_foxhound4_default_browser_debug.bat
$start_foxhound4_engine.bat
$start_foxhound4_firefox.bat
$start_foxhound4_firefox_debug.bat
$start_foxhound4_ie.bat
$start_foxhound4_ie_debug.bat

By default, those command files are installed here on Windows 7:

   C:\ProgramData\RisingRoad\Foxhound4

You can customize those batch files, or create new ones as you see fit. Each one contains the following commands or a variation thereof:

SET SDIR=!SQLANY16!
SET SPGM=dbsrv16.exe
SET BIN=Bin32

CD /D "%FOXHOUND4%"

"!SDIR!\!BIN!\dbspawn.exe"^
  -f "!SDIR!\!BIN!\!SPGM!"^
  -c 25p^
  -ch 50p^
  -cr-^
  -gk all^
  -gn 220^
  -gna 0^
  -n foxhound4^
  -o foxhound4_debug.txt^
  -oe foxhound4_debug_startup.txt^
  -on 1M^
  -sb 0^
  -ufd restart^
  -x tcpip^
  -xd^
  -xs http(port=80;maxsize=0;to=600;kto=600)^
  foxhound4.db^
  -n f

Here is a description of each part of those commands:


Foxhound 4 » Introduction and Setup 
Running Foxhound as a Service

Foxhound is often used to monitor heavily-loaded target databases, and in such an environment some care must be taken to ensure Foxhound's own CPU and disk requirements don't adversely affect overall performance. The simplest solution is to run the Foxhound engine on its own computer that is:

It is often more important to locate the Foxhound engine close to the target database, than to locate the client-side web browser close to the Foxhound engine. That's because the communication between Foxhound and the target database is more intense and more susceptible to long-range response time (latency) issues than is the HTTP traffic between the browser and Foxhound.

Having said all that, a centrally-located Foxhound engine is easier to set up and administer when it is run as a Windows service using the dbsrv16.exe network server.

You can use Sybase Central or the dbsvc.exe utility to create Windows service; both techniques are described in the SQL Anywhere Help.

Here is an example of a Windows 7 script that deletes and creates a service for running Foxhound using the 64-bit version of SQL Anywhere 16; it also displays the service parameters after it is created, and then lists all the SQL Anywhere-related services that exist:

ECHO Create SQL Anywhere 16 Bin64 Foxhound Service

"C:\Program Files\SQL Anywhere 16\Bin64\dbsvc.exe" -d Foxhound4 -y 

PAUSE

ECHO Create SQL Anywhere 16 Bin64 Foxhound Service

"C:\Program Files\SQL Anywhere 16\Bin64\dbsvc.exe" -d Foxhound4 -y 

PAUSE

"C:\Program Files\SQL Anywhere 16\Bin64\dbsvc.exe"^
  -o "C:\ProgramData\RisingRoad\Foxhound4\dbsvc_log.txt"^
  -y ^
  -as ^
  -i^
  -s Automatic^
  -sn Foxhound4^
  -sd "Foxhound Version 4 Database Monitor Bin64 Service"^
  -t Network^
  -w Foxhound4 "C:\Program Files\SQL Anywhere 16\Bin64\dbsrv16.exe"^
  -c 25p^
  -ch 50p^
  -cr-^
  -gk all^
  -gn 220^
  -gna 0^
  -n foxhound4^
  -o "C:\ProgramData\RisingRoad\Foxhound4\foxhound4_debug.txt"^
  -oe "C:\ProgramData\RisingRoad\Foxhound4\foxhound4_debug_startup.txt"^
  -on 1M^
  -qn^
  -sb 0^
  -ufd restart^
  -x tcpip^
  -xd^
  -xs http(port=80;maxsize=0;to=600;kto=600)^
  "C:\ProgramData\RisingRoad\Foxhound4\foxhound4.db"^
  -n f

PAUSE

"C:\Program Files\SQL Anywhere 16\Bin64\dbsvc.exe" -g Foxhound4

PAUSE

"C:\Program Files\SQL Anywhere 16\Bin64\dbsvc.exe" -l

PAUSE

PAUSE

"C:\Program Files\SQL Anywhere 16\Bin64\dbsvc.exe" -g Foxhound4

PAUSE

"C:\Program Files\SQL Anywhere 16\Bin64\dbsvc.exe" -l

PAUSE

To use SQL Anywhere 17 to run the service,

Note: When you run Foxhound as a service, you will probably have to create System DSNs instead of User DSNs if you want your target databases to appear on the DSN tab of the Foxhound Menu page.

You may also have to launch the ODBC Administrator from Control Panel - Administrative Tools rather than from the Foxhound Menu page, and you may have to specify TCP/IP rather than Shared Memory for the Foxhound connections to your target databases even if they are running on the same computer.

Also, those DSNs must be set up on the same computer that is running the Foxhound engine. In other words, if you move the Foxhound engine from your workstation to a server somewhere else, you will have to move or copy the DSNs over there as well.


Foxhound 4 » Introduction and Setup 
Connecting to Target Databases

Foxhound uses ODBC to connect to the target databases. If you have an ODBC DSN, you can choose it on the DSN tab of the Foxhound Menu page.

If you don't have a DSN, or don't want to use one, you can specify a DSN-less connection by specifying the connection string on the String tab of the Menu page. The main difference between using the String tab and setting up a DSN in the ODBC Administrator is the String tab needs to know what driver to use, as in:

DRIVER=SQL Anywhere Native;

Foxhound needs to connect to the target database in order to collect Monitor statistics and display schema information. For most purposes, a user id with CONNECT permission is sufficient:

GRANT CONNECT TO FOXHOUND IDENTIFIED BY 'ZAdt5Yq8';

   -- or --

CREATE USER FOXHOUND IDENTIFIED BY 'ZAdt5Yq8';

That user id can then be used to connect to a SQL Anywhere database using a connection string like this:

Name: ddd

String: ENG=ddd; DBN=ddd; UID=FOXHOUND; PWD=ZAdt5Yq8; DRIVER=SQL Anywhere Native; 

A user id with only CONNECT permission does have some limitations, depending on the version of SQL Anywhere being used to run the target database.

Tip: For a SQL Anywhere Version 12 or earlier target database, here's how to let the FOXHOUND user id do everything EXCEPT the following:

  1. Perform AutoDrop processing shown in section 12. AutoDrop Criteria of the Monitor Options page.
    Message: Permission denied: you do not have permission to disconnect "xxx"

  2. Use any actions in section 14. Change Target Settings of the Monitor Options page
    Message: Permission denied: you do not have permission to execute the procedure "sa_server_option"

  3. Set the DEDICATED_TASK option in section 15. Monitor Connection Settings of the Monitor Options page.
    Message: Only the DBA can set the option 'dedicated_task' SQLCODE=-204, ODBC 3 State="42000"

    GRANT CONNECT TO FOXHOUND IDENTIFIED BY 'ZAdt5Yq8';
    GRANT RESOURCE TO FOXHOUND;
    GRANT EXECUTE ON dbo.sa_locks TO FOXHOUND;
    GRANT EXECUTE ON dbo.sa_disk_free_space TO FOXHOUND;
    

Tip: For a SQL Anywhere Version 16 or later target database, here's how to let the FOXHOUND user id do everything with no exceptions:

CREATE USER FOXHOUND IDENTIFIED BY 'ZAdt5Yq8';
GRANT RESOURCE TO FOXHOUND;
GRANT MANAGE ANY DBSPACE TO FOXHOUND;
GRANT MONITOR TO FOXHOUND;
GRANT DROP CONNECTION TO FOXHOUND;
GRANT SET ANY SYSTEM OPTION TO FOXHOUND;
GRANT SERVER OPERATOR TO FOXHOUND;

Tip: If you are willing to GRANT DBA TO FOXHOUND then all the problems go away.

If not, here's a table introducing the symptoms and solutions:

Target SQL
Anywhere  
Version          Symptom                     Reason                  Solution(s)
================================================================================================
                                                                     GRANT CONNECT TO FOXHOUND 
                                                                       IDENTIFIED BY 'ZAdt5Yq8';
--------------   -------------------------   ---------------------   ---------------------------
12 and earlier   Foxhound Monitor displays   Foxhound is not         GRANT RESOURCE TO FOXHOUND;
                 "SPs NNN" and may perform   allowed to CREATE    
                 the target database.        three special              -- or --
                                             stored procedures          
                                             on the target           CREATE the procedures 
                                             database.               manually using SQL files 
                                                                     delivered with Foxhound
                                                                       (see below).
--------------   -------------------------   ---------------------   ---------------------------
12 and earlier   Foxhound doesn't display    Foxhound is not         GRANT EXECUTE ON
                 free space on the target    allowed to call the       dbo.sa_disk_free_space
                 database disk drives,       sa_disk_free_space()      TO FOXHOUND;
                 and doesn't issue Alerts    procedure on the        
                 5, 6, 7 or 8 about low      target database.        -- or --
                 disk space.
                                                                     GRANT DBA TO FOXHOUND;

                                                                     -- this solves all the
                                                                        other problems too.
--------------   -------------------------   ---------------------   ---------------------------
12 and earlier   Foxhound doesn't display    Foxhound is not         GRANT EXECUTE ON
                 detailed information        allowed to call the       dbo.sa_locks
                 about why a connection is   sa_locks() procedure      TO FOXHOUND;
                 blocked.                    on the target                  
                                             target database.        -- or --

                                                                     GRANT DBA TO FOXHOUND;

                                                                     -- this solves all the
                                                                        other problems too.
--------------   -------------------------   ---------------------   ---------------------------
12 and earlier   Foxhound can't AutoDrop     Foxhound is not         GRANT DBA TO FOXHOUND;
                 any connections on the      allowed to execute 
                 target database.            the DROP CONNECTION     -- this solves all the
                                             statement on the           other problems too.        
                                             target database.   
--------------   -------------------------   ---------------------   ---------------------------
12 and earlier   Foxhound can't set the      Foxhound is not         GRANT DBA TO FOXHOUND;
                 DEDICATED_TASK option on    allowed to execute
                 the target database.        the SET TEMPORARY       -- this solves all the
                                             OPTION DEDICATED_TASK      other problems too.
                                             statement on the          
                                             target database.   
--------------   -------------------------   ---------------------   ---------------------------
12 and earlier   Foxhound can't make the     Foxhound is not         GRANT DBA TO FOXHOUND;
                 changes specified by the    allowed to call the
                 Change Target Settings      sa_server_option()      -- or --
                 section of the Monitor      procedure on the        
                 Option page.                target database.        Use dbsrv12 -zp -zl -zt   
================================================================================================
                                                                     CREATE USER FOXHOUND 
                                                                       IDENTIFIED BY 'ZAdt5Yq8';
--------------   -------------------------   ---------------------   ---------------------------
16 and later     Foxhound Monitor displays   Foxhound is not         GRANT RESOURCE TO FOXHOUND;
                 "SPs NNN" and may perform   allowed to CREATE    
                 slowly.                     three special           -- or --
                                             stored procedures          
                                             on the target           CREATE the procedures 
                                             database.               manually using SQL files 
                                                                     delivered with Foxhound 
                                                                       (see below).
--------------   -------------------------   ---------------------   ---------------------------
16 and later     Foxhound doesn't display    Foxhound is not         GRANT MANAGE ANY DBSPACE
                 anything in Free Disk       allowed to call the       TO FOXHOUND;
                 Space Sys, Temp, Log,       sa_disk_free_space()
                 Other, and doesn't issue    procedure on the        -- or --
                 Alerts 5, 6, 7 or 8 about   target database.
                 low disk space.                                     GRANT EXECUTE ON
                                                                       dbo.sa_disk_free_space
                                                                       TO FOXHOUND;
--------------   -------------------------   ---------------------   ---------------------------
16 and later     Foxhound Monitor doesn't    Foxhound is not         GRANT MONITOR TO FOXHOUND;
                 gather information about    allowed to call the 
                 any connections other       CONNECTION_PROPERTY() 
                 than Foxhound's own         function on the             
                 connection to the target    target database for     
                 database.                   any other connections. 
                                             Foxhound is also not
                                             allowed to call the
                                             sa_locks() procedure
                                             on the target 
                                             database.
--------------   -------------------------   ---------------------   ---------------------------
16 and later     Foxhound can't AutoDrop     Foxhound is not         GRANT DROP CONNECTION
                 any connections on the      allowed to execute        TO FOXHOUND;
                 target database.            the DROP CONNECTION 
                                             statement on the           
                                             target database.   
--------------   -------------------------   ---------------------   ---------------------------
16 and later     Foxhound can't set the      Foxhound is not         GRANT SET ANY SYSTEM OPTION
                 DEDICATED_TASK option on    allowed to execute        TO FOXHOUND;
                 the target database.        the SET TEMPORARY 
                                             OPTION DEDICATED_TASK  
                                             statement on the          
                                             target database.   
--------------   -------------------------   ---------------------   ---------------------------
16 and later     Foxhound can't make the     Foxhound is not         GRANT SERVER OPERATOR 
                 changes specified by the    allowed to call the       TO FOXHOUND;
                 Change Target Settings      sa_server_option()
                 section of the Monitor      procedure on the        -- or --
                 Option page.                target database.           
                                                                     Use dbsrv16 -zp -zl -zt 
================================================================================================

All the solutions use simple GRANT statements shown above, except one; here's the full story on the special Foxhound stored procedures:

How To Install The Foxhound SPs

Three stored procedures are delivered with Foxhound for installation on your target databases.

These procedures are optional but highly recommended:

  • rroad_connection_properties greatly improves Foxhound performance when the target database has a large number of client connections.

  • rroad_database_properties improves Foxhound performance when gathering database-level properties, as well as enabling these Foxhound display fields:
    • Log Size - based on DB_EXTENDED_PROPERTY ( 'FileSize', 'translog' )
    • Log Used - based on DB_EXTENDED_PROPERTY ( 'FreePages', 'translog' )
    • Temp Size - based on DB_EXTENDED_PROPERTY ( 'FileSize', 'temp' )
    • Temp Used - based on DB_EXTENDED_PROPERTY ( 'FreePages', 'temp' )
    • Temp Frags - based on DB_EXTENDED_PROPERTY ( 'DBFileFragments', 'temp' )

  • rroad_engine_properties improves Foxhound performance when gathering server-level properties.

Foxhound will automatically install and call these stored procedures if it can.

The phrase "if it can" means "the user id with which Foxhound connects to the target database has the RESOURCE authority" as in:

GRANT RESOURCE TO FOXHOUND;
Foxhound will keep trying to install those procedures each time it connects to the target database; e.g., each time sampling is stopped and started, or each time Foxhound is started.

As mentioned above, Monitor performance will suffer without those procedures, especially if the target database has a lot of connections. The Foxhound Monitor page displays SPs YYY if finds the three procedures, and SPs NNN if it doesn't.

. . . but Wait, There Is Another Way!

If you don't want to let the Foxhound user id to have either RESOURCE or DBA privileges on the target database, but you are willing to install those three procedures on the target database yourself, here's how:

(Note: If you choose to use this method, you will have to repeat these steps for each target database you wish to monitor, and again each time you upgrade to a new version or build of Foxhound.)
  1. Create a user id to be used by Foxhound on the target database; e.g.:
    GRANT CONNECT TO FOXHOUND IDENTIFIED BY 'ZAdt5Yq8';
    

  2. Find the following three text files in the Foxhound folder (which defaults to C:\ProgramData\RisingRoad\Foxhound4 on Windows 7 and C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound4 on Windows XP):
    rroad_connection_properties.sql
    rroad_database_properties.sql
    rroad_engine_properties.sql
    

  3. Edit each file to specify the user id you chose in step 1; e.g., change {OWNER} to FOXHOUND:
    CREATE PROCEDURE FOXHOUND.rroad_connection_properties() 
    CREATE PROCEDURE FOXHOUND.rroad_engine_properties() 
    CREATE PROCEDURE FOXHOUND.rroad_database_properties(d INTEGER) 
    

  4. Use dbisql to run those files against the target database.

  5. If the Foxhound Monitor is already connected to the target database, click on Stop Sampling, then Start Sampling.

  6. Check to make sure "SPs YYY" appears on the Foxhound Monitor page.

Tip: One of the reasons to run Foxhound on the 32-bit version of SQL Anywhere is to make it easier to use the 32-bit version of ODBC to connect to your target database... but that may not be necessary!

For example, if you have a SQL Anywhere 9 target database you may be able to connect to it using a more recent SQL Anywhere ODBC driver.

It's easiest to do this with Foxhound Menu - String tab rather than the DSN tab... you don't have to mess around with the ODBC Administrator.

The following connection string worked for Foxhound connecting to a SQL Anywhere 9.0.2.3951 database:

Name:   ddd9
String: ENG=ddd9; DBN=ddd9; UID=dba; PWD=sql; DRIVER=SQL Anywhere 16; 

You can also use the magic "SQL Anywhere Native" driver to let SQL Anywhere choose which driver to use:

Name:   ddd9
String: ENG=ddd9; DBN=ddd9; UID=dba; PWD=sql; DRIVER=SQL Anywhere Native;
This also works for SQL Anywhere 6.0.3 database running on a 6.0.4 (3594) server:
Name:   ddd6
String: ENG=ddd6; DBN=ddd6; UID=dba; PWD=sql; DRIVER=SQL Anywhere 16; 


Foxhound 4 » Introduction and Setup 
Backup

It is a good idea to take regular backups of the Foxhound database, for two reasons: To protect against loss, and to control the growth of the Foxhound transaction log file.

Foxhound doesn't take backups automatically, but the standard Foxhound installation creates two Windows Start menu shortcuts to batch files that perform full and incremental log backups:

All Programs 
   - Foxhound4 
      - Tools 
         - Backup Foxhound Database 
         - Backup Foxhound Transaction Log
Here's how to set up a scheduled backup task on Windows XP:
1. Click on start - All Programs - Accessories - System Tools - Scheduled Tasks.

2. Doubleclick on Add Scheduled Task.

3. Proceed with the Scheduled Task Wizard, using the Browse button to specify this command to execute:

C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound4\$backup_foxhound4.bat
Here's how to set up a scheduled backup task on Vista or Windows 7:
1. Click on start - All Programs - Accessories - System Tools - Task Scheduler.

2. Click on Action - Create Basic Task...

3. Proceed with the Create Basic Task Wizard, using the Browse button to specify this command to execute:

C:\ProgramData\RisingRoad\Foxhound4\$backup_foxhound4.bat
Once you have set up a scheduled task, you can click on right mouse - Run to make sure the backup task runs ok.

Here's where the backups are stored on Windows 7:

C:\ProgramData\RisingRoad\Foxhound4\backup\generation1 (the oldest)
C:\ProgramData\RisingRoad\Foxhound4\backup\generation2
C:\ProgramData\RisingRoad\Foxhound4\backup\generation3 (the latest)

Caution: If you are using the Windows 7 Task Scheduler to take regular backups of your Foxhound database using the technique described here, you should reboot your computer after installing a new version of Foxhound.

Caution: If you are using the Windows 7 Task Scheduler to take regular backups of your Foxhound database using the technique described here, be careful not to accidentally create two copies of the same scheduled task.


Foxhound 4 » Introduction and Setup 
Restore

A typical Foxhound backup consists of a full backup of the database and log files, plus zero or more subsequent incremental log backup files, created by running the following shortcuts:

Foxhound4
   - Tools
      - Backup Foxhound Database
      - Backup Foxhound Transaction Log

Here is a step-by-step example of a Foxhound restore (for a detailed description of the restore process see this article Which log backups are required to restore a database?):

1. Verify that the full and incremental backup files exist; in this example there is a full backup of the database and log plus two incremental log backup files:

 Directory of C:\ProgramData\RisingRoad\Foxhound4\backup\generation3

07/28/2014  02:56 PM             1,297 backup_log.txt
07/28/2014  02:55 PM     1,572,806,656 foxhound4.db
07/28/2014  02:55 PM        13,680,640 foxhound4.log
07/28/2014  02:56 PM    <DIR>          logs

 Directory of C:\ProgramData\RisingRoad\Foxhound4\backup\generation3\logs

07/28/2014  02:56 PM            65,536 140728AA.log
07/28/2014  02:56 PM            65,536 140728AB.log
Note that the latest backups are always placed in the "generation3" folder; earlier backups may be found in "generation2" and "generation1".

2. Copy the full backup database file from the "generation3" folder to the main "Foxhound4" folder:

From: C:\ProgramData\RisingRoad\Foxhound4\backup\generation3\foxhound4.db

To:   C:\ProgramData\RisingRoad\Foxhound4\foxhound4.db

3. Prepare a command file to apply all the transaction log files that exist in the "generation3" and "generation3\logs" folders:

"%SQLANY16%\bin64\dbsrv16.exe"^
  -gn 220^
  -o C:\ProgramData\RisingRoad\Foxhound4\foxhound4_debug.txt^
  -oe C:\ProgramData\RisingRoad\Foxhound4\foxhound4_debug_startup.txt^
  -on 1M^
  C:\ProgramData\RisingRoad\Foxhound4\foxhound4.db^
  -ad C:\ProgramData\RisingRoad\Foxhound4\backup\generation3
PAUSE
"%SQLANY16%\bin64\dbsrv16.exe"^
  -gn 220^
  -o C:\ProgramData\RisingRoad\Foxhound4\foxhound4_debug.txt^
  -oe C:\ProgramData\RisingRoad\Foxhound4\foxhound4_debug_startup.txt^
  -on 1M^
  C:\ProgramData\RisingRoad\Foxhound4\foxhound4.db^
  -ad C:\ProgramData\RisingRoad\Foxhound4\backup\generation3\logs
PAUSE
To use SQL Anywhere 17 to run the restore, change all occurrences of '16' to '17' in the script above.

4. Run that command file; here are some excerpts from the foxhound4_debug.txt file:

I. 07/28 15:03:17. SQL Anywhere Network Server Version 16.0.0.1915 ...
I. 07/28 15:03:17. Starting database "foxhound4" (C:\ProgramData\RisingRoad\Foxhound4\foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:17. Database recovery in progress
I. 07/28 15:03:17.     Last checkpoint at Mon Jul 28 2014 14:55
I. 07/28 15:03:17.     Checkpoint log...
I. 07/28 15:03:18.     Transaction log: C:\ProgramData\RisingRoad\Foxhound4\backup\generation3\foxhound4.log...
I. 07/28 15:03:19.     Checkpointing...
I. 07/28 15:03:19. Starting checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:20. Finished checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:20. Recovery complete
I. 07/28 15:03:20. Database server shutdown automatically after log applied
I. 07/28 15:03:22. Database server stopped at Mon Jul 28 2014 15:03
I. 07/28 15:03:25. SQL Anywhere Network Server Version 16.0.0.1915 ...
I. 07/28 15:03:25. Starting database "foxhound4" (C:\ProgramData\RisingRoad\Foxhound4\foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:26. Database recovery in progress
I. 07/28 15:03:26.     Last checkpoint at Mon Jul 28 2014 15:03
I. 07/28 15:03:26.     Transaction log: C:\ProgramData\RisingRoad\Foxhound4\backup\generation3\logs\140728AA.log...
I. 07/28 15:03:27. Starting checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:27. Finished checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:27. Starting checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:28. Finished checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:28.     Transaction log: C:\ProgramData\RisingRoad\Foxhound4\backup\generation3\logs\140728AB.log...
I. 07/28 15:03:28. Starting checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:28. Finished checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:28.     Checkpointing...
I. 07/28 15:03:28. Starting checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:29. Finished checkpoint of "foxhound4" (foxhound4.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:29. Recovery complete
I. 07/28 15:03:29. Database server shutdown automatically after log applied
I. 07/28 15:03:31. Database server stopped at Mon Jul 28 2014 15:03

5. Start the Foxhound engine normally.

Note: This example assumes a full restore from backup. In particular, it assumes the transaction log C:\ProgramData\RisingRoad\Foxhound4\foxhound4.log will be automatically recreated in Step 5. If an old copy of that file remains in that folder, Step 5 will fail with an error message "Can't use log file "foxhound4.log" since the database file has been used more recently".


Foxhound 4 » Introduction and Setup 
Controlling Growth

The Foxhound Monitor process will cause the Foxhound database and transaction log files to grow in size. This growth can be quite rapid, as much as several gigabytes per day, if target databases have hundreds or thousands of connections.

There are several ways you can limit the growth of the Foxhound database:

To limit the growth of the Foxhound Transaction log you can use the Foxhound4 - Tools - Backup Foxhound Database shortcut which will backup and restart the active Foxhound transaction log file, keeping only the three most recent backups and discarding older copies.

Another way to limit the transaction log size is to specify the dbsrv16 -m option in the following command files, to tell SQL Anywhere to truncate the transaction log whenever a checkpoint is performed:

$backup_foxhound4.bat
$start_foxhound4_chrome.bat
$start_foxhound4_chrome_debug.bat
$start_foxhound4_default_browser.bat
$start_foxhound4_default_browser_debug.bat
$start_foxhound4_engine.bat
$start_foxhound4_firefox.bat
$start_foxhound4_firefox_debug.bat
$start_foxhound4_ie.bat
$start_foxhound4_ie_debug.bat

By default, those command files are installed here on 7:

   C:\ProgramData\RisingRoad\Foxhound4


Foxhound 4 » Introduction and Setup 
Safe Mode Startup

If Foxhound takes too long to start up, perhaps because there are a large number of Monitor sessions to start or because Foxhound simply becomes unresponsive, you can try starting Foxhound in "safe mode".

Safe mode startup, also known as "safe startup", stops sampling of all target databases by the Foxhound Monitor when Foxhound is started, and then temporarily disables most Monitor functionality. This sometimes helps if Foxhound is unresponsive when it starts.

Here's how you can turn safe mode startup on and off to "reset" Foxhound:

  1. Stop Foxhound.

  2. Turn on safe mode startup by creating a text file named startup.txt containing these exact 4 characters
    safe
    and placing that file in the Foxhound installation folder.

    By default, Foxhound is installed in this location on Windows 7:

    C:\ProgramData\RisingRoad\Foxhound4

  3. Start Foxhound. All the Monitor sessions will now be stopped, and most Monitor functionality will be disabled (the History page will still work, however).

  4. Stop Foxhound.

  5. Turn safe mode startup off by deleting or renaming the startup.txt file described above.

  6. Start Foxhound. All the Monitor sessions will still be stopped, but all Monitor functionality will be available again.

Tip: Safe Mode Startup can be used to start an old Foxhound database without losing any old data to the purge process:


Foxhound 4 » Introduction and Setup 
Starting Multiple Copies of Foxhound

You can use the Extended Edition of Foxhound to start multiple copies of the Foxhound database, each running in a separate SQL Anywhere database server and monitoring a separate set of target databases.

Example 1: Make 9 Copies Of Foxhound

Example 2: Start 10 Copies Of Foxhound

Example 3: Start 10 Foxhound Browser Sessions

Example 4: Stop 10 Copies Of Foxhound

Note: Here's what the End User License Agreement has to say...

In the case of the Extended Edition, an unlimited number of copies of the Foxhound database may be created and started using separate instances of SQL Anywhere on the same local network, with the requirement that a separate Extended Edition registration key be purchased for each multiple of 10 copies of Foxhound started.

Here's an example showing how 10 copies of Foxhound can be set up on one computer:

  1. Make sure your original copy of the Foxhound database is activated as an Extended Edition copy.

  2. Stop and/or delete any Foxhound Monitor sampling sessions you don't want to run on all copies of Foxhound.
    Your original copy of the Foxhound database is going to serve as a model or template for the other nine copies. In other words, when the nine new copies are first started they will contain exactly the same settings as the original copy, and you can only customize each copy after it is started.
  3. Shut down your original copy of the Foxhound database.

  4. Make 9 file copies (see example 1 below) of your original foxhound4.db file in nine different folders.
    By default, Foxhound is installed in this location on Windows XP:
    C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound4
    and on Vista and Windows 7 it is here:
    C:\ProgramData\RisingRoad\Foxhound4
  5. Use dbsrv16.exe (see example 2 below) to start your original Foxhound database plus the nine copies as follows:

    • use different runtime server names: foxhound4, foxhound4b, foxhound4c, ..., foxhound4j

    • use different HTTP ports; e.g., 49301, ... 49310

    • choose cache memory options carefully; e.g., -c 5p -ch 10p

  6. Start 10 browser sessions (see example 3 below) using the different HTTP ports.

  7. Use Monitor Options - 2. Manage Multiple Monitor Sessions in each browser session to set up the target databases for each copy of Foxhound.

  8. See example 4 below for a script to stop all 10 copies of Foxhound.
Example 1: Make 9 Copies Of Foxhound

Example 2: Start 10 Copies Of Foxhound

Example 3: Start 10 Foxhound Browser Sessions

Example 4: Stop 10 Copies Of Foxhound


Foxhound 4 » Introduction and Setup » Starting Multiple Copies of Foxhound 
Example 1: Make 9 Copies Of Foxhound

Here is a sample Windows command file that makes the 9 copies in nine different folders and then starts all 10 copies of Foxhound:

REM ******************************************************************
ECHO Making nine Foxhound database copies...

SETLOCAL ENABLEDELAYEDEXPANSION
SETLOCAL ENABLEEXTENSIONS

CD /D "%FOXHOUND4%"

MD b
MD c
MD d
MD e
MD f
MD g
MD h
MD i
MD j

COPY /V /Y foxhound4.db b
COPY /V /Y rroad4.dll   b
COPY /V /Y rroad464.dll b

COPY /V /Y foxhound4.db c
COPY /V /Y rroad4.dll   c
COPY /V /Y rroad464.dll c

COPY /V /Y foxhound4.db d
COPY /V /Y rroad4.dll   d
COPY /V /Y rroad464.dll d

COPY /V /Y foxhound4.db e
COPY /V /Y rroad4.dll   e
COPY /V /Y rroad464.dll e

COPY /V /Y foxhound4.db f
COPY /V /Y rroad4.dll   f
COPY /V /Y rroad464.dll f

COPY /V /Y foxhound4.db g
COPY /V /Y rroad4.dll   g
COPY /V /Y rroad464.dll g

COPY /V /Y foxhound4.db h
COPY /V /Y rroad4.dll   h
COPY /V /Y rroad464.dll h

COPY /V /Y foxhound4.db i
COPY /V /Y rroad4.dll   i
COPY /V /Y rroad464.dll i

COPY /V /Y foxhound4.db j
COPY /V /Y rroad4.dll   j
COPY /V /Y rroad464.dll j

PAUSE


Foxhound 4 » Introduction and Setup » Starting Multiple Copies of Foxhound 
Example 2: Start 10 Copies Of Foxhound

REM ******************************************************************
ECHO Starting ten Foxhound engines...

SETLOCAL ENABLEDELAYEDEXPANSION
SETLOCAL ENABLEEXTENSIONS

IF EXIST "!SQLANY17!" (  
   SET SDIR=!SQLANY17!
   SET SPGM=dbsrv17.exe
)
IF EXIST "!SQLANY16!" (  
   SET SDIR=!SQLANY16!
   SET SPGM=dbsrv16.exe
)
IF /I "!FOXHOUND4SVER!z"=="17z" (
   SET SDIR=!SQLANY17!
   SET SPGM=dbsrv17.exe
)
IF /I "!FOXHOUND4SVER!z"=="16z" (
   SET SDIR=!SQLANY16!
   SET SPGM=dbsrv16.exe
)

IF EXIST "!SDIR!\Bin32" (SET BIN=Bin32)
IF EXIST "!SDIR!\Bin64" (SET BIN=Bin64)
IF /I "%FOXHOUND4BIN%z"=="Bin32z" (SET BIN=Bin32)
IF /I "%FOXHOUND4BIN%z"=="Bin64z" (SET BIN=Bin64)

CD /D "%FOXHOUND4%"

REM Maintenance Note: When making changes to the dbspawn command 
REM    line, check all the OTHER command files that execute dbspawn.

IF EXIST "%FOXHOUND4%\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4 -o foxhound4_debug.txt -oe foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49201) -xd -xs http(port=49301;maxsize=0;to=600;kto=600) foxhound4.db -n f

IF ERRORLEVEL 1 GOTO dbsrv_failure

IF EXIST "%FOXHOUND4%\b\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\b\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4b -o b\foxhound4_debug.txt -oe b\foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49202) -xd -xs http(port=49302;maxsize=0;to=600;kto=600) b\foxhound4.db -n f

IF ERRORLEVEL 1 GOTO dbsrv_failure

IF EXIST "%FOXHOUND4%\c\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\c\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4c -o c\foxhound4_debug.txt -oe c\foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49203) -xd -xs http(port=49303;maxsize=0;to=600;kto=600) c\foxhound4.db -n f

IF ERRORLEVEL 1 GOTO dbsrv_failure

IF EXIST "%FOXHOUND4%\d\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\d\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4d -o d\foxhound4_debug.txt -oe d\foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49204) -xd -xs http(port=49304;maxsize=0;to=600;kto=600) d\foxhound4.db -n f

IF ERRORLEVEL 1 GOTO dbsrv_failure

IF EXIST "%FOXHOUND4%\e\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\e\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4e -o e\foxhound4_debug.txt -oe e\foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49205) -xd -xs http(port=49305;maxsize=0;to=600;kto=600) e\foxhound4.db -n f

IF ERRORLEVEL 1 GOTO dbsrv_failure

IF EXIST "%FOXHOUND4%\f\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\f\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4f -o f\foxhound4_debug.txt -oe f\foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49206) -xd -xs http(port=49306;maxsize=0;to=600;kto=600) f\foxhound4.db -n f

IF ERRORLEVEL 1 GOTO dbsrv_failure

IF EXIST "%FOXHOUND4%\g\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\g\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4g -o g\foxhound4_debug.txt -oe g\foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49207) -xd -xs http(port=49307;maxsize=0;to=600;kto=600) g\foxhound4.db -n f

IF ERRORLEVEL 1 GOTO dbsrv_failure

IF EXIST "%FOXHOUND4%\h\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\h\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4h -o h\foxhound4_debug.txt -oe h\foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49208) -xd -xs http(port=49308;maxsize=0;to=600;kto=600) h\foxhound4.db -n f

IF ERRORLEVEL 1 GOTO dbsrv_failure

IF EXIST "%FOXHOUND4%\i\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\i\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4i -o i\foxhound4_debug.txt -oe i\foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49209) -xd -xs http(port=49309;maxsize=0;to=600;kto=600) i\foxhound4.db -n f

IF ERRORLEVEL 1 GOTO dbsrv_failure

IF EXIST "%FOXHOUND4%\j\foxhound4_debug_startup.txt" DEL /F /Q "%FOXHOUND4%\j\foxhound4_debug_startup.txt"

"!SDIR!\!BIN!\dbspawn.exe" -f "!SDIR!\!BIN!\!SPGM!" -c 5p -ch 10p -cr- -gk all -gn 220 -gna 0^
  -n foxhound4j -o j\foxhound4_debug.txt -oe j\foxhound4_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49210) -xd -xs http(port=49310;maxsize=0;to=600;kto=600) j\foxhound4.db -n f

IF ERRORLEVEL 1 ( GOTO dbsrv_failure ) ELSE ( GOTO dbsrv_success )

:dbsrv_failure
ECHO ******************************************************************
ECHO *** ERROR ********************************************************
ECHO *** dbspawn/dbsrv set ERRORLEVEL = %ERRORLEVEL%
ECHO *** To display startup diagnostics,
PAUSE
IF NOT EXIST "%FOXHOUND4%\foxhound4_debug_startup.txt" ( GOTO file_does_not_exist ) ELSE ( GOTO file_exists ) 

:file_does_not_exist
REM ******************************************************************
ECHO *** No startup diagnostics are available.
PAUSE
GOTO end

:file_exists
REM ******************************************************************
TYPE "%FOXHOUND4%\foxhound4_debug_startup.txt"
PAUSE
GOTO end

:dbsrv_success
REM ******************************************************************
IF NOT EXIST "%FOXHOUND4%\foxhound4_debug_startup.txt" ( GOTO end ) ELSE ( GOTO display_file ) 

:display_file
ECHO ******************************************************************
ECHO *** ERROR ********************************************************
ECHO *** To display startup diagnostics,
PAUSE
TYPE "%FOXHOUND4%\foxhound4_debug_startup.txt"
GOTO end

:end
REM ******************************************************************
ECHO All done...
PAUSE
EXIT


Foxhound 4 » Introduction and Setup » Starting Multiple Copies of Foxhound 
Example 3: Start 10 Foxhound Browser Sessions

REM ******************************************************************
ECHO Starting ten Chrome browser sessions...

SETLOCAL ENABLEDELAYEDEXPANSION
SETLOCAL ENABLEEXTENSIONS

IF EXIST "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" ( GOTO use_AppData ) ELSE ( GOTO use_LocalSettings )
 
:use_AppData
START "f01" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49301/foxhound
START "f02" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49302/foxhound
START "f03" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49303/foxhound
START "f04" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49304/foxhound
START "f05" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49305/foxhound
START "f06" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49306/foxhound
START "f07" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49307/foxhound
START "f08" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49308/foxhound
START "f09" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49309/foxhound
START "f10" "%UserProfile%\AppData\Local\Google\Chrome\Application\chrome.exe" http://localhost:49310/foxhound

GOTO end

:use_LocalSettings
START "f01" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49301/foxhound
START "f02" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49302/foxhound
START "f03" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49303/foxhound
START "f04" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49304/foxhound
START "f05" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49305/foxhound
START "f06" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49306/foxhound
START "f07" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49307/foxhound
START "f08" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49308/foxhound
START "f09" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49309/foxhound
START "f10" "%UserProfile%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" http://localhost:49310/foxhound

:end
PAUSE


Foxhound 4 » Introduction and Setup » Starting Multiple Copies of Foxhound 
Example 4: Stop 10 Copies Of Foxhound

REM ******************************************************************
ECHO Stopping ten Foxhound engines...

SETLOCAL ENABLEDELAYEDEXPANSION
SETLOCAL ENABLEEXTENSIONS

IF EXIST "!SQLANY17!" (  
   SET SDIR=!SQLANY17!
)
IF EXIST "!SQLANY16!" (  
   SET SDIR=!SQLANY16!
)
IF /I "!FOXHOUND4SVER!z"=="17z" (
   SET SDIR=!SQLANY17!
)
IF /I "!FOXHOUND4SVER!z"=="16z" (
   SET SDIR=!SQLANY16!
)

IF EXIST "!SDIR!\Bin32" (SET BIN=Bin32)
IF EXIST "!SDIR!\Bin64" (SET BIN=Bin64)
IF /I "%FOXHOUND4BIN%z"=="Bin32z" (SET BIN=Bin32)
IF /I "%FOXHOUND4BIN%z"=="Bin64z" (SET BIN=Bin64)

"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4; UID=STOPPER; PWD=SQL;" -y
"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4b; UID=STOPPER; PWD=SQL;" -y
"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4c; UID=STOPPER; PWD=SQL;" -y
"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4d; UID=STOPPER; PWD=SQL;" -y
"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4e; UID=STOPPER; PWD=SQL;" -y
"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4f; UID=STOPPER; PWD=SQL;" -y
"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4g; UID=STOPPER; PWD=SQL;" -y
"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4h; UID=STOPPER; PWD=SQL;" -y
"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4i; UID=STOPPER; PWD=SQL;" -y
"!SDIR!\!BIN!\dbstop.exe" -c "ENG=foxhound4j; UID=STOPPER; PWD=SQL;" -y

PAUSE


Foxhound 4 » Introduction and Setup 
Environment Variables
FOXHOUND4

SQLANY16

SQLANY17

FOXHOUND4BIN

FOXHOUND4SVER

FOXHOUND4UPGRADE


Foxhound 4 » Introduction and Setup » Environment Variables 
FOXHOUND4

The FOXHOUND4 environment variable must have a valid value for the Foxhound 4 shortcuts to work properly.

By default FOXHOUND4 is set by the Foxhound installation process to contain the drive and path of the folder where Foxhound is installed.

Normally you do not have to create the FOXHOUND4 environment variable, but if you do, here's how:

Start 
  - Control Panel 
    - System 
      - Advanced system settings 
        - Environment Variables... 
          - System Variables
            - Edit...
                Variable name:   FOXHOUND4
                Variable value:  C:\ProgramData\RisingRoad\Foxhound4\

Foxhound 4 » Introduction and Setup » Environment Variables 
SQLANY16

At least one of the SQLANY16 or SQLANY17 environment variables must have a valid value for the Foxhound 4 shortcuts to work properly.

By default Foxhound will use SQLANY17 unless SQLANY16 is defined in which case Foxhound will use SQLANY16 (to override this rule see FOXHOUND4SVER below).

By default SQLANY16 is set by the SQL Anywhere 16 installation process to contain the drive and path of the folder where SQL Anywhere 16 is installed.

Normally you do not have to create the SQLANY16 environment variable, but if you do, here's how:

Start 
  - Control Panel 
    - System 
      - Advanced system settings 
        - Environment Variables... 
          - System Variables
            - Edit...
                Variable name:   SQLANY16
                Variable value:  C:\Program Files\SQL Anywhere 16

Note: This discussion of the SQLANY16 environment variable applies to the version of SQL Anywhere being used to run Foxhound itself, and has nothing to do with the version of SQL Anywhere being used to start your target databases.


Foxhound 4 » Introduction and Setup » Environment Variables 
SQLANY17

At least one of the SQLANY16 or SQLANY17 environment variables must have a valid value for the Foxhound 4 shortcuts to work properly.

By default Foxhound will use SQLANY17 unless SQLANY16 is defined in which case Foxhound will use SQLANY16 (to override this rule see FOXHOUND4SVER below).

By default SQLANY17 is set by the SQL Anywhere 17 installation process to contain the drive and path of the folder where SQL Anywhere 17 is installed.

Normally you do not have to create the SQLANY17 environment variable, but if you do, here's how:

Start 
  - Control Panel 
    - System 
      - Advanced system settings 
        - Environment Variables... 
          - System Variables
            - Edit...
                Variable name:   SQLANY17 
                Variable value:  C:\Program Files\SQL Anywhere 17

Note: This discussion of the SQLANY17 environment variable applies to the version of SQL Anywhere being used to run Foxhound itself, and has nothing to do with the version of SQL Anywhere being used to start your target databases.


Foxhound 4 » Introduction and Setup » Environment Variables 
FOXHOUND4BIN

FOXHOUND4BIN is an optional environment variable. It can be used to change the default SQL Anywhere installation subfolder used by Foxhound from Bin32 to Bin64 or vice versa.

By default Foxhound will use Bin32 subfolder unless Bin64 exists in which case Foxhound will use Bin64. To override this rule create FOXHOUND4BIN as follows:

Start 
  - Control Panel 
    - System 
      - Advanced system settings 
        - Environment Variables... 
          - System Variables
            - Edit...
                Variable name:   FOXHOUND4BIN
                Variable value:  Bin32
                      -- or --   Bin64

After setting FOXHOUND4BIN you must stop and restart the Foxhound database to put the change into effect.

For example, if you have installed both 32-bit and 64-bit versions of SQL Anywhere, you can force the Foxhound 4 shortcuts to use the 32-bit version by setting FOXHOUND4BIN to Bin32.

Note: This discussion of the FOXHOUND4BIN environment variable applies to the version of SQL Anywhere being used to run Foxhound itself, and has nothing to do with the version of SQL Anywhere being used to start your target databases.

Tip: One of the reasons to run Foxhound on the 32-bit version of SQL Anywhere is to make it easier to use the 32-bit version of ODBC to connect to your target database... but that may not be necessary!

For example, if you have a SQL Anywhere 9 target database you may be able to connect to it using a more recent SQL Anywhere ODBC driver.

It's easiest to do this with Foxhound Menu - String tab rather than the DSN tab... you don't have to mess around with the ODBC Administrator.

The following connection string worked for Foxhound connecting to a SQL Anywhere 9.0.2.3951 database:

Name:   ddd9
String: ENG=ddd9; DBN=ddd9; UID=dba; PWD=sql; DRIVER=SQL Anywhere 16; 

You can also use the magic "SQL Anywhere Native" driver to let SQL Anywhere choose which driver to use:

Name:   ddd9
String: ENG=ddd9; DBN=ddd9; UID=dba; PWD=sql; DRIVER=SQL Anywhere Native;
This also works for SQL Anywhere 6.0.3 database running on a 6.0.4 (3594) server:
Name:   ddd6
String: ENG=ddd6; DBN=ddd6; UID=dba; PWD=sql; DRIVER=SQL Anywhere 16; 

Foxhound 4 » Introduction and Setup » Environment Variables 
FOXHOUND4SVER

FOXHOUND4SVER is an optional environment variable. It can be used to change the default SQL Anywhere installation version used by Foxhound from 16 to 17 or vice versa.

By default Foxhound will use SQLANY17 unless SQLANY16 is defined in which case Foxhound will use SQLANY16. To override this rule create FOXHOUND4SVER follows:

Start 
  - Control Panel 
    - System 
      - Advanced system settings 
        - Environment Variables... 
          - System Variables
            - Edit...
                Variable name:   FOXHOUND4SVER 
                Variable value:  16
                      -- or --   17

After setting FOXHOUND4SVER you must stop and restart the Foxhound database to put the change into effect.

For example, if you have installed both SQL Anywhere 16 and 17, you can force the Foxhound 4 shortcuts to use SQL Anywhere 17 by setting FOXHOUND4SVER to 17.

Note: This discussion of the FOXHOUND4SVER environment variable applies to the version of SQL Anywhere being used to run Foxhound itself, and has nothing to do with the version of SQL Anywhere being used to start your target databases.


Foxhound 4 » Introduction and Setup » Environment Variables 
FOXHOUND4UPGRADE

FOXHOUND4UPGRADE is an optional environment variable that is very rarely used. It can be used to change the factory setting default behavior of the post-setup data upgrade process when reinstalling Foxhound.

The factory default setting is ALL which means "upgrade all the data."

When you run the data upgrade process you will be asked to change or confirm the setting:

Post-Setup Process for Foxhound Version 4.0
*** Checking for a post-setup path parameter...
*** A post-setup path parameter was provided...
C:\ProgramData\RisingRoad\Foxhound4\
*******************************************************************
***                   Foxhound 4.0.xxxx
***
*** Here's where Foxhound is being installed:
*** C:\ProgramData\RisingRoad\Foxhound4\
***
*** Starting the Foxhound 4.0.xxxx post-setup process...
*** Creating foxhound4.db.4.0.xxxx.ORIGINAL_COPY...
*** Checking for an existing Foxhound4 installation...
***  ...yes, there is an existing Foxhound4 installation.
*** Checking if the existing data should be upgraded...
***  ...yes, the existing Foxhound4 data should be upgraded.
******************************************************************
*** PLEASE READ THIS, AND CONFIRM OR CHANGE **********************
******************************************************************
***
*** "FOXHOUND4UPGRADE" specifies how much data is to be upgraded.
***
*** If you want to CHANGE the setting, type in a new value...
***    ALL       - upgrade all the data
***    OPTIONS   - no samples, just the Foxhound options
***    yyyymmdd  - options plus samples since yyyymmdd
***    nnn       - options plus last nnn days of samples
***    NOTHING   - don't upgrade any data
*** and press Enter to continue.
***
*** If you LIKE the current setting...
***    FOXHOUND4UPGRADE=ALL which means upgrade all the data
*** just press Enter.
******************************************************************
Current FOXHOUND4UPGRADE=ALL
New     FOXHOUND4UPGRADE=

You can change the default setting ahead of time by creating the FOXHOUND4UPGRADE environment variable:

Start 
  - Control Panel 
    - System 
      - Advanced system settings 
        - Environment Variables... 
          - System Variables
            - Edit...
                Variable name:   FOXHOUND4UPGRADE
                Variable value:  ALL
                      -- or --   OPTIONS
                      -- or --   yyyymmdd
                      -- or --   nnn
                      -- or --   NOTHING

If you specify an invalid value, Foxhound uses OPTIONS.


Foxhound 4 » Introduction and Setup 
End User License Agreement

RisingRoad - 3QC Inc. License Terms

Foxhound Version 4

By using the software, you accept the following terms. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.

1. No-Nonsense License Agreement

The Foxhound software is protected by United States and Canadian copyright law and international copyright treaty provisions. Therefore, you must treat Foxhound just like a book, except that you may copy it onto a computer to be used and you may make archival copies of Foxhound for the sole purpose of backing-up our software and your data and protecting your investment from loss.

By saying "just like a book," RisingRoad means, for example, that one copy of Foxhound may be executed on any number of computers, and may be freely moved from one computer to another, so long as there is no possibility of it being executed on one computer while it's being executed on another.

By saying "one copy of Foxhound", RisingRoad means a copy of the Foxhound software that has been activated by the application of one single unique registration key obtained from RisingRoad.

Just like one copy of a book can't be read by two different people in two different places at the same time, neither can one copy of Foxhound be executed on two different computers at the same time. (Unless, of course, this License Agreement has been violated.)

2. Use on a Network and the Internet

In the case of the Rental and Basic Editions, one copy of Foxhound may be executed on a computer attached to a local area network and/or the internet, with multiple users accessing the single Foxhound database from browsers running on different computers. The "just like a book" analogy begins to weaken at this point, but it still applies if you think of more than one person reading the same book over someone else's shoulder... it's still one copy of the book, and one copy of Foxhound executing.

In the case of the Extended Edition, an unlimited number of copies of the Foxhound database may be created and started using separate instances of SQL Anywhere on the same local network, with the requirement that a separate Extended Edition registration key be purchased for each multiple of 10 copies of Foxhound started.

3. Further Explanation of Copyright Law and the Scope of This License Statement

You may not download or transmit your copy of Foxhound electronically (either by direct connection or telecommunication transmission) for the purpose of executing it on multiple computers at the same time.

You may transfer all of your rights to use your copy of Foxhound to another person, provided that you transfer to that person (or destroy) all of the software and documentation provided in this package, together with all copies, tangible or intangible, including copies in RAM or installed on a disk, as well as all back-up copies. Remember, once you transfer your copy of Foxhound, it may only be executed on the single computer to which it is transferred and, of course, only in accordance with copyright law and international treaty provisions.

Except as stated in this paragraph, you may not otherwise transfer, rent, lease, sub-license, time-share, or lend the Foxhound software or documentation. Your use of Foxhound is limited to acts that are essential steps in the use of Foxhound on your computer as described in the documentation. You may not otherwise modify, alter, adapt, merge, decompile or reverse-engineer Foxhound, and you may not remove or obscure RisingRoad copyright notices.

6. Disclaimer of Warranty

The software is licensed "as is". You bear the risk of using it. RisingRoad gives no express warranties, guarantees or conditions. RisingRoad excludes the implied warranties of merchantability, fitness for a particular purpose and non-infringement.


Foxhound 4 » Introduction and Setup » End User License Agreement