Help for Foxhound 1.2.4025a

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 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.

Foxhound Design Decisions

Foxhound Highlights

Requirements

Foxhound Setup

Customizing the Setup

Running Foxhound as a Service

Connecting to Target Databases

Backup and Restore

Controlling Growth

Safe Mode Startup

SQL Anywhere is a trademark of Sybase, Inc.


Foxhound Design Decisions    [Top]


Foxhound Highlights    [Top]


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 12, Firefox 5 and Internet Explorer 9.

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

5. SQL Anywhere version 5.5.5.2787 through version 12 for target databases - If you have any target databases running on SQL Anywhere 5.5, you may have to upgrade them to 5.5.5.2787 for Foxhound to work properly with them.

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

7. SQLANY12 - The delivered *.bat files expect that the SQLANY12 environment variable points to SQL Anywhere 12. 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 SQLANY12=C:\Program Files\SQL Anywhere 12 
8. FOXHOUND1 - The delivered *.bat files expect that the FOXHOUND1 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 FOXHOUND1=C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1\
and for Windows Vista and Windows 7 it is this:
   SET FOXHOUND1=C:\ProgramData\RisingRoad\Foxhound\

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. For more information see this Q&A entry:

How do I start Foxhound?


Customizing the Setup    [Top]

By default the Foxhound batch files are installed in this location on Windows XP:

C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1
and on Vista and Windows 7 it is here:
C:\ProgramData\RisingRoad\Foxhound1
These are the command files which start Foxhound:
$backup_foxhound1.bat
$start_foxhound1_chrome.bat
$start_foxhound1_chrome_debug.bat
$start_foxhound1_engine.bat
$start_foxhound1_firefox.bat
$start_foxhound1_firefox_debug.bat
$start_foxhound1_ie.bat
$start_foxhound1_ie_debug.bat

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 "%SQLANY12%\Bin64\dbsrv12.exe" (SET BIN=Bin64)
IF "%FOXHOUND1BIN%"=="Bin32" (SET BIN=Bin32)

CD /D "%FOXHOUND1%"

"%SQLANY12%\%BIN%\dbspawn.exe"^
  -f^
  "%SQLANY12%\%BIN%\dbsrv12.exe"^
  -c 25p^
  -ch 50p^
  -cr-^
  -gk all^
  -gn 120^
  -gna 0^
  -n foxhound1^
  -o foxhound1_debug.txt^
  -oe foxhound1_debug_startup.txt^
  -on 1M^
  -qn^
  -sb 0^
  -x tcpip^
  -xd^
  -xs http(port=80;maxsize=0;to=600;kto=600)^
  foxhound1.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 dbsrv12.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 the command line parameters for running Foxhound as a service on Windows 7; the values are the same as those described in the previous section Customizing the Setup except that full path specifications are given for the -o, -oe and database file parameters:

-c 25p
-ch 50p
-cr-
-gk all
-gn 120
-gna 0
-n foxhound1
-o "C:\ProgramData\RisingRoad\Foxhound1\foxhound1_debug.txt"
-oe "C:\ProgramData\RisingRoad\Foxhound1\foxhound1_debug_startup.txt"
-on 1M
-qn
-sb 0
-x tcpip
-xd
-xs http(port=80;maxsize=0;to=600;kto=600)
"C:\ProgramData\RisingRoad\Foxhound1\foxhound1.db"
-n f

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.

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 12;

For best results, Foxhound needs DBA privileges when it connects to the target database. Without DBA privileges, the Foxhound schema display will be unable to show DBSPACE information in the Facts & Figures section.

For next-best results, Foxhound needs the RESOURCE privilege. Without it, the Foxhound Monitor will not be able to create 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 OK: YYY if finds the three procedures, and SPs OK: NNN if it doesn't.

Note: If you want to monitor a secondary (read only) database in a high availability environment, start a monitor session on the primary (updatable) database first so the procedures described above can be stored on the primary and then reach the secondary database via the high availability synchronization process. Foxhound can't send the procedures directly to the secondary database because it's read only.

Here is how you can let Foxhound create those procedures without giving it DBA privileges:

  1. Create a user id to be used by Foxhound on the target database; e.g.:

    GRANT CONNECT TO FOXHOUND IDENTIFIED BY SQL;

  2. Give that user id the RESOURCE privilege:

    GRANT RESOURCE TO FOXHOUND;

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

  4. Check to make sure "SPs are OK: YYY" appears on the Foxhound Monitor page.

If you don't want to let Foxhound to have either RESOURCE or DBA privileges, 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 SQL;

  2. Find the following three text files in the Foxhound folder (which defaults to C:\ProgramData\RisingRoad\Foxhound1 on Windows 7 and C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1 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 OK: YYY" appears on the Foxhound Monitor page.


Backup and Restore    [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. For more information see these Q&A entries:

How do I backup my Foxhound database?

How do I backup my Foxhound database on a regular basis?

For more information on how to restore the Foxhound database from a backup, see this Q&A entry:

How do I restore the Foxhound database from a backup?


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.

Foxhound transaction log growth can be controlled by regularly using the backup process described in the previous section. That backup process deletes old backup copies of the transaction log as well as deleting and restarting the current transaction log.

Foxhound automatically controls database file growth with an internal purge process that runs every hour. By default the purge process deletes data when it reaches 1 month old. You can speed up or slow down this process by changing the purge settings on the Foxhound Options page.

For more information see these Q&A entries:

How do I keep the Foxhound database file from growing so large?

How do I keep the Foxhound log file from growing so large?

[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".

For more information see this Q&A entry:

How do I start Foxhound in "safe mode"?

[Top]



























































[Top]