Help for Foxhound 3.0.4386a

Table of Contents     [RisingRoad]


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

End User License Agreement

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


Requirements    [Top]

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 browser versions, currently Google Chrome 34, Firefox 28 and Internet Explorer 11.

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

5. SQL Anywhere versions 5.5, 6, 7, 8, 9, 10, 11, 12, 16 and OnDemand 1.0 for target databases - If you have any target databases running on SQL Anywhere 5.5 you may have to upgrade them to 5.5.05.2787 for Foxhound to work properly with them.

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

7. SQLANY16 - The delivered *.bat files expect that the SQLANY16 environment variable points to SQL Anywhere 16. If that is not the case you may have to modify the *.bat files. Here is the default setting on Windows XP, Vista and Windows 7:

   SET SQLANY16=C:\Program Files\SQL Anywhere 16 
8. FOXHOUND3 - The delivered *.bat files expect that the FOXHOUND3 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 *.bat files. Here is the default setting for Windows XP:
   SET FOXHOUND3=C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound3\
and for Windows Vista and Windows 7 it is this:
   SET FOXHOUND3=C:\ProgramData\RisingRoad\Foxhound3\

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 Setup    [Top]

Foxhound consists of server and client components.

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

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

http://localhost/

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.


Starting Foxhound    [Top]

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 - Foxhound3 - Start Foxhound via default browser

All Programs - Foxhound3 - Tools - Start Foxhound via Chrome

All Programs - Foxhound3 - Tools - Start Foxhound via Firefox

All Programs - Foxhound3 - 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 - Foxhound3 - Tools - Start Foxhound via default browser - debug

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

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

All Programs - Foxhound3 - 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 - Foxhound3 - Tools - Start Foxhound Engine

Specify http://localhost in your browser.


Customizing the Setup    [Top] These are the command files which start Foxhound:
$backup_foxhound3.bat
$start_foxhound3_chrome.bat
$start_foxhound3_chrome_debug.bat
$start_foxhound3_default_browser.bat
$start_foxhound3_default_browser_debug.bat
$start_foxhound3_engine.bat
$start_foxhound3_firefox.bat
$start_foxhound3_firefox_debug.bat
$start_foxhound3_ie.bat
$start_foxhound3_ie_debug.bat

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

   C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound3

and on Windows 7 they are here:

   C:\ProgramData\RisingRoad\Foxhound3

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 BIN=Bin32
IF EXIST "%SQLANY16%\Bin64\dbsrv16.exe" (SET BIN=Bin64)
IF "%FOXHOUND3BIN%"=="Bin32" (SET BIN=Bin32)

CD /D "%FOXHOUND3%"

"%SQLANY16%\%BIN%\dbspawn.exe"^
  -f "%SQLANY16%\%BIN%\dbsrv16.exe"^
  -c 25p^
  -ch 50p^
  -cr-^
  -gk all^
  -gn 120^
  -gna 0^
  -n foxhound3^
  -o foxhound3_debug.txt^
  -oe foxhound3_debug_startup.txt^
  -on 1M^
  -sb 0^
  -ufd restart^
  -x tcpip^
  -xd^
  -xs http(port=80;maxsize=0;to=600;kto=600)^
  foxhound3.db^
  -n f

Here is a description of each part of those commands:


Running Foxhound as a Service    [Top]

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 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; it also displays the service parameters after it is created, and then lists all the SQL Anywhere-related services that exist:

ECHO Create Bin64 Foxhound Service

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

PAUSE

"C:\Program Files\SQL Anywhere 16\Bin64\dbsvc.exe"^
  -o "C:\ProgramData\RisingRoad\Foxhound3\dbsvc_log.txt"^
  -y ^
  -as ^
  -i^
  -s Automatic^
  -sn Foxhound3^
  -sd "Foxhound Version 3 Database Monitor Bin64 Service"^
  -t Network^
  -w Foxhound3 "C:\Program Files\SQL Anywhere 16\Bin64\dbsrv16.exe"^
  -c 25p^
  -ch 50p^
  -cr-^
  -gk all^
  -gn 160^
  -gna 0^
  -n foxhound3^
  -o "C:\ProgramData\RisingRoad\Foxhound3\foxhound3_debug.txt"^
  -oe "C:\ProgramData\RisingRoad\Foxhound3\foxhound3_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\Foxhound3\foxhound3.db"^
  -n f

PAUSE

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

PAUSE

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

PAUSE

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.


Connecting to Target Databases    [Top]

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 that the String tab needs to know what driver to use, as in:

DRIVER=SQL Anywhere 16;

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 one of these:

Name: ddd12
String: ENG=ddd12; DBN=ddd12; UID=FOXHOUND; PWD=ZAdt5Yq8; DRIVER=SQL Anywhere 12; 

   -- or --

Name: ddd16
String: ENG=ddd16; DBN=ddd16; UID=FOXHOUND; PWD=ZAdt5Yq8; DRIVER=SQL Anywhere 16; 

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: 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)
--------------   -------------------------   --------------------   ---------------------------
12 and earlier   Foxhound Monitor displays   Foxhound is not        GRANT RESOURCE TO FOXHOUND;
                 "SPs are OK: NNN" and       allowed to CREATE    
                 may perform slowly.         three special             -- or --
                                             stored procedures          
                                             on the target          CREATE the procedures 
                                             database.              manually using SQL files 
                                                                    delivered with Foxhound.
--------------   -------------------------   --------------------   ---------------------------
12 and earlier   Foxhound doesn't display    Foxhound is not        GRANT DBA TO FOXHOUND;
                 free space on the target    allowed to call the     
                 database disk drives,       sa_disk_free_space()   -- this also solves all
                 and doesn't issue Alerts    procedure on the          the other problems.       
                 5, 6, 7 or 8 about low      target database.   
                 disk space.
--------------   -------------------------   --------------------   ---------------------------
12 and earlier   Foxhound doesn't display    Foxhound is not        GRANT DBA TO FOXHOUND;
                 detailed information        allowed to call the     
                 about why a connection is   sa_locks() procedure   -- this also solves all
                 blocked.                    on the target             the other problems.       
                                             target database.   
 --------------   -------------------------   --------------------   ---------------------------
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.   
--------------   -------------------------   --------------------   ---------------------------
16               Foxhound Monitor displays   Foxhound is not        GRANT RESOURCE TO FOXHOUND;
                 "SPs are OK: NNN" and       allowed to CREATE    
                 may perform slowly.         three special             -- or --
                                             stored procedures          
                                             on the target          CREATE the procedures 
                                             database.              manually using SQL files 
                                                                    delivered with Foxhound.
--------------   -------------------------   --------------------   ---------------------------
16               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 
                 Alerts 5, 6, 7 or 8 about   target database.
                 low disk space.
--------------   -------------------------   --------------------   ---------------------------
16               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               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.   
--------------   -------------------------   --------------------   ---------------------------

All the solutions use simple GRANT statements shown above, except one; here's the story on "CREATE the procedures manually":

For best results the Foxhound Monitor needs to be able to call the following procedures on the target database:

rroad_connection_properties
rroad_database_properties
rroad_engine_properties

Without those procedures, Monitor performance will suffer, 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.

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\Foxhound3 on Windows 7 and C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound3 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.


Backup    [Top]

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 
   - Foxhound3 
      - 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\Foxhound3\$backup_foxhound3.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\Foxhound3\$backup_foxhound3.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 XP:

C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound3\backup\generation1 (the oldest)
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound3\backup\generation2
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound3\backup\generation3 (the latest)
and on Vista and Windows 7:
C:\ProgramData\RisingRoad\Foxhound3\backup\generation1 (the oldest)
C:\ProgramData\RisingRoad\Foxhound3\backup\generation2
C:\ProgramData\RisingRoad\Foxhound3\backup\generation3 (the latest)

Caution: If you are using the Windows Vista or 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 Vista or 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.


Restore    [Top]

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:

Foxhound3
   - 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\Foxhound3\backup\generation3

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

 Directory of C:\ProgramData\RisingRoad\Foxhound3\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 "Foxhound3" folder:

From: C:\ProgramData\RisingRoad\Foxhound3\backup\generation3\foxhound3.db

To:   C:\ProgramData\RisingRoad\Foxhound3\foxhound3.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 120^
  -o C:\ProgramData\RisingRoad\Foxhound3\foxhound3_debug.txt^
  -oe C:\ProgramData\RisingRoad\Foxhound3\foxhound3_debug_startup.txt^
  -on 1M^
  C:\ProgramData\RisingRoad\Foxhound3\foxhound3.db^
  -ad C:\ProgramData\RisingRoad\Foxhound3\backup\generation3
PAUSE
"%SQLANY16%\bin64\dbsrv16.exe"^
  -gn 120^
  -o C:\ProgramData\RisingRoad\Foxhound3\foxhound3_debug.txt^
  -oe C:\ProgramData\RisingRoad\Foxhound3\foxhound3_debug_startup.txt^
  -on 1M^
  C:\ProgramData\RisingRoad\Foxhound3\foxhound3.db^
  -ad C:\ProgramData\RisingRoad\Foxhound3\backup\generation3\logs
PAUSE

4. Run that command file; here are some excerpts from the foxhound3_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 "foxhound3" (C:\ProgramData\RisingRoad\Foxhound3\foxhound3.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\Foxhound3\backup\generation3\foxhound3.log...
I. 07/28 15:03:19.     Checkpointing...
I. 07/28 15:03:19. Starting checkpoint of "foxhound3" (foxhound3.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:20. Finished checkpoint of "foxhound3" (foxhound3.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 "foxhound3" (C:\ProgramData\RisingRoad\Foxhound3\foxhound3.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\Foxhound3\backup\generation3\logs\140728AA.log...
I. 07/28 15:03:27. Starting checkpoint of "foxhound3" (foxhound3.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:27. Finished checkpoint of "foxhound3" (foxhound3.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:27. Starting checkpoint of "foxhound3" (foxhound3.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:28. Finished checkpoint of "foxhound3" (foxhound3.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:28.     Transaction log: C:\ProgramData\RisingRoad\Foxhound3\backup\generation3\logs\140728AB.log...
I. 07/28 15:03:28. Starting checkpoint of "foxhound3" (foxhound3.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:28. Finished checkpoint of "foxhound3" (foxhound3.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:28.     Checkpointing...
I. 07/28 15:03:28. Starting checkpoint of "foxhound3" (foxhound3.db) at Mon Jul 28 2014 15:03
I. 07/28 15:03:29. Finished checkpoint of "foxhound3" (foxhound3.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\Foxhound3\foxhound3.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 "foxhound3.log" since the database file has been used more recently".


Controlling Growth    [Top]

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 two ways you can limit the growth of the Foxhound database:

The easiest way to limit the growth of the Foxhound Transaction log is to regularly use the Foxhound3 - 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_foxhound3.bat
$start_foxhound3_chrome.bat
$start_foxhound3_chrome_debug.bat
$start_foxhound3_default_browser.bat
$start_foxhound3_default_browser_debug.bat
$start_foxhound3_engine.bat
$start_foxhound3_firefox.bat
$start_foxhound3_firefox_debug.bat
$start_foxhound3_ie.bat
$start_foxhound3_ie_debug.bat

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

   C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound3

and on Windows 7 they are here:

   C:\ProgramData\RisingRoad\Foxhound3

[Top]


Safe Mode Startup    [Top]

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 XP:

    C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound3
    and on Vista and Windows 7 it is here:
    C:\ProgramData\RisingRoad\Foxhound3

  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.

[Top]


Starting Multiple Copies of Foxhound    [Top]

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.

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 foxhound3.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\Foxhound3
    and on Vista and Windows 7 it is here:
    C:\ProgramData\RisingRoad\Foxhound3
  5. Use dbsrv16.exe (see example 2 below) to start your original Foxhound database plus the nine copies as follows:

  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.

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

Example 1: Make 9 Copies Of Foxhound   [Topic Top]

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

CD /D "%FOXHOUND3%"

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

COPY /V /Y foxhound3.db b
COPY /V /Y rroad3.dll   b
COPY /V /Y rroad364.dll b

COPY /V /Y foxhound3.db c
COPY /V /Y rroad3.dll   c
COPY /V /Y rroad364.dll c

COPY /V /Y foxhound3.db d
COPY /V /Y rroad3.dll   d
COPY /V /Y rroad364.dll d

COPY /V /Y foxhound3.db e
COPY /V /Y rroad3.dll   e
COPY /V /Y rroad364.dll e

COPY /V /Y foxhound3.db f
COPY /V /Y rroad3.dll   f
COPY /V /Y rroad364.dll f

COPY /V /Y foxhound3.db g
COPY /V /Y rroad3.dll   g
COPY /V /Y rroad364.dll g

COPY /V /Y foxhound3.db h
COPY /V /Y rroad3.dll   h
COPY /V /Y rroad364.dll h

COPY /V /Y foxhound3.db i
COPY /V /Y rroad3.dll   i
COPY /V /Y rroad364.dll i

COPY /V /Y foxhound3.db j
COPY /V /Y rroad3.dll   j
COPY /V /Y rroad364.dll j

PAUSE

Example 2: Start 10 Copies Of Foxhound   [Topic Top]

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

SET BIN=Bin32
IF EXIST "%SQLANY16%\Bin64\dbsrv16.exe" (SET BIN=Bin64)
IF "%FOXHOUND3BIN%"=="Bin32" (SET BIN=Bin32)

CD /D "%FOXHOUND3%"

REM Maintenance Note: This script does not use the
REM    same set of dbsrv16 options as the other
REM    scripts that launch Foxhound...
REM       $backup_foxhound3.bat
REM       $start_foxhound3_engine.bat
REM       $start_foxhound3_chrome.bat
REM       $start_foxhound3_chrome_debug.bat
REM       $start_foxhound3_firefox.bat
REM       $start_foxhound3_firefox_debug.bat
REM       $start_foxhound3_ie.bat
REM       $start_foxhound3_ie_debug.bat

IF EXIST "%FOXHOUND3%\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3 -o foxhound3_debug.txt -oe foxhound3_debug_startup.txt^
  -o 1M -sb 0 -ufd restart -x tcpip(port=49201) -xd -xs http(port=49301;maxsize=0;to=600;kto=600) foxhound3.db -n f

IF ERRORLEVEL 1 GOTO dbsrv16_failure

IF EXIST "%FOXHOUND3%\b\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\b\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3b -o b\foxhound3_debug.txt -oe b\foxhound3_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\foxhound3.db -n f

IF ERRORLEVEL 1 GOTO dbsrv16_failure

IF EXIST "%FOXHOUND3%\c\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\c\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3c -o c\foxhound3_debug.txt -oe c\foxhound3_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\foxhound3.db -n f

IF ERRORLEVEL 1 GOTO dbsrv16_failure

IF EXIST "%FOXHOUND3%\d\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\d\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3d -o d\foxhound3_debug.txt -oe d\foxhound3_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\foxhound3.db -n f

IF ERRORLEVEL 1 GOTO dbsrv16_failure

IF EXIST "%FOXHOUND3%\e\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\e\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3e -o e\foxhound3_debug.txt -oe e\foxhound3_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\foxhound3.db -n f

IF ERRORLEVEL 1 GOTO dbsrv16_failure

IF EXIST "%FOXHOUND3%\f\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\f\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3f -o f\foxhound3_debug.txt -oe f\foxhound3_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\foxhound3.db -n f

IF ERRORLEVEL 1 GOTO dbsrv16_failure

IF EXIST "%FOXHOUND3%\g\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\g\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3g -o g\foxhound3_debug.txt -oe g\foxhound3_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\foxhound3.db -n f

IF ERRORLEVEL 1 GOTO dbsrv16_failure

IF EXIST "%FOXHOUND3%\h\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\h\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3h -o h\foxhound3_debug.txt -oe h\foxhound3_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\foxhound3.db -n f

IF ERRORLEVEL 1 GOTO dbsrv16_failure

IF EXIST "%FOXHOUND3%\i\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\i\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3i -o i\foxhound3_debug.txt -oe i\foxhound3_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\foxhound3.db -n f

IF ERRORLEVEL 1 GOTO dbsrv16_failure

IF EXIST "%FOXHOUND3%\j\foxhound3_debug_startup.txt" DEL /F /Q "%FOXHOUND3%\j\foxhound3_debug_startup.txt"

"%SQLANY16%\%BIN%\dbspawn.exe" -f "%SQLANY16%\%BIN%\dbsrv16.exe" -c 5p -ch 10p -cr- -gk all -gn 120 -gna 0^
  -n foxhound3j -o j\foxhound3_debug.txt -oe j\foxhound3_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\foxhound3.db -n f

IF ERRORLEVEL 1 ( GOTO dbsrv16_failure ) ELSE ( GOTO dbsrv16_success )

:dbsrv16_failure
ECHO ******************************************************************
ECHO *** ERROR ********************************************************
ECHO *** dbspawn/dbsrv16 set ERRORLEVEL = %ERRORLEVEL%
ECHO *** To display startup diagnostics,
PAUSE
IF NOT EXIST "%FOXHOUND3%\foxhound3_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 "%FOXHOUND3%\foxhound3_debug_startup.txt"
PAUSE
GOTO end

:dbsrv16_success
REM ******************************************************************
IF NOT EXIST "%FOXHOUND3%\foxhound3_debug_startup.txt" ( GOTO end ) ELSE ( GOTO display_file ) 

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

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

Example 3: Start 10 Foxhound Browser Sessions   [Topic Top]

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

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

Example 4: Stop 10 Copies Of Foxhound   [Topic Top]

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

SET BIN=Bin32
IF EXIST "%SQLANY16%\Bin64\dbstop.exe" (SET BIN=Bin64)

"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3;UID=STOPPER;PWD=SQL" -y
"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3b;UID=STOPPER;PWD=SQL" -y
"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3c;UID=STOPPER;PWD=SQL" -y
"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3d;UID=STOPPER;PWD=SQL" -y
"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3e;UID=STOPPER;PWD=SQL" -y
"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3f;UID=STOPPER;PWD=SQL" -y
"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3g;UID=STOPPER;PWD=SQL" -y
"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3h;UID=STOPPER;PWD=SQL" -y
"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3i;UID=STOPPER;PWD=SQL" -y
"%SQLANY16%\%BIN%\dbstop.exe" -c "ENG=foxhound3j;UID=STOPPER;PWD=SQL" -y

PAUSE

[Top]


End User License Agreement    [Top]

RisingRoad - 3QC Inc. License Terms

Foxhound Version 3

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.

[Top]



























































[Top]