FAQ      Foxhound Home      RisingRoad      Breck.Carter@gmail.com


How do I ... ? (general)

How do I install Foxhound?
How do I install version 11 of SQL Anywhere on the same machine used to run an earlier version of SQL Anywhere?
How do I start Foxhound?
How do I stop Foxhound?
How do I stop and restart Foxhound?
How do I install a new version of Foxhound?
How do I reinstall Foxhound?
How do I backup my Foxhound database?
How do I backup my Foxhound database on a regular basis?
How do I restore the old build of Foxhound after installing a new build?
How do I reinstall an earlier build of Foxhound?
How do I restore the Foxhound database from a backup?
How do I remove Foxhound from my system?
How do I figure out what went wrong during an installation?
How do I see Foxhound diagnostics, errors and exceptions?
How do I start Foxhound in "safe mode"?
How do I keep the Foxhound database file from growing so large?
How do I shrink the size of the Foxhound database?
How do I keep the Foxhound log file from growing so large?
How do I tell Foxhound to use an HTTP port other than 80?
How do I change the Alerts criteria? (threshold settings, etcetera)
How do I tell different databases apart in Alert emails?
How do I get something to show up in the Last Statement column?
How do I get something to show up in the Total Waits, Waiting Time columns?

Question: How do I install Foxhound?

Answer: Just run the Foxhound InstallShield setup you have received. You should see this dialog box:

When the InstallShield process reaches the end, click on the Post-Setup button to continue the installation. This part is critical; if you don't let the post-setup process run, Foxhound won't be fully installed:

This is what the post-setup process for a new installation looks like:

See also...
How do I install a new version of Foxhound?
How do I reinstall Foxhound?
Another version of this product is already installed.
Why is it called "unsetup" instead of "uninstall"?
How do I remove Foxhound from my system?


Question: How do I install version 11 of SQL Anywhere on the same machine used to run an earlier version of SQL Anywhere?

Answer: Follow the normal process for installing SQL Anywhere 11; version 11 of SQL Anywhere can coexist on the same computer as all earlier versions from 5.5 through 10.

There is one caveat, however: The SQL Anywhere 11 installation modifies the Windows PATH environment variable. If you have been relying on the PATH to determine where SQL Anywhere utilities such as dbbackup.exe and dbvalid.exe are located, your Windows command lines and batch files may start executing the version 11 copies of those utilities instead of the version you want. Either change the PATH variable, or modify your Windows command lines to explicitly specify the folder containing the utilities.

Each version of SQL Anywhere comes with its own environment variable that makes it easier to code commands; here's an example of how to use the SQLANY10 environment variable to execute the version 10 copy of dbvalid.exe:

   "%SQLANY10%\win32\dbvalid.exe" -c "ENG=ddd10;DBN=ddd10;UID=dba;PWD=sql" -d -o dbvalid_log_ddd10.txt

Here's a list of the environment variables for each version:

  • Version 5.5: SQLANY
  • Version 6: ASANY

  • Version 7: ASANY7

  • Version 8: ASANY8

  • Version 9: ASANY9

  • Version 10: SQLANY10

  • Version 11: SQLANY11


Question: How do I start Foxhound?

Answer: 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 shortcut does both steps:

Start - All Programs - Foxhound1 - Start Foxhound via Firefox
So does this shortcut:
Start - All Programs - Foxhound1 - 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: You can do the two steps separately, as follows:

Start - All Programs - Foxhound1 - Tools - Start Foxhound Engine
Specify http://localhost in your browser
Method 3: The following shortcuts help with debugging. Each one stops the SQL Anywhere engine if it's running, starts it again with extra diagnostics turned on, and then connects to Foxhound from your browser:
Start - All Programs - Foxhound1 - Tools - Start Foxhound via Firefox - debug
Start - All Programs - Foxhound1 - Tools - Start Foxhound via IE - debug
See also...
How do I stop Foxhound?
How do I stop and restart Foxhound?


Question: How do I stop Foxhound?

Answer: Method 1: Use the following desktop shortcut:

Start - All Programs - Foxhound1 - Tools - Stop Foxhound Engine
Method 2: Go to the Foxhound Options page, scroll to the bottom and click on the Stop Foxhound Engine button.

Method 3: Open the Processes tab in Task Manager, click on the "Image Name" column name to sort the process names alphabetically, select the dbeng11.exe or dbsrv11.exe task that's running the Foxhound database and then click on the End Process button.

Caution: If you have two or more SQL Anywhere engines running it can be difficult to determine which one's running the Foxhound database.
See also...
How do I start Foxhound?
How do I stop and restart Foxhound?


Question: How do I stop and restart Foxhound?

Answer: Follow the instructions here:

How do I stop Foxhound?
How do I start Foxhound?
Alternative: The following shortcuts help with debugging. Each one stops the SQL Anywhere engine if it's running, starts it again with extra diagnostics turned on, and then connects to Foxhound from your browser:
Start - All Programs - Foxhound1 - Tools - Start Foxhound via Firefox - debug
Start - All Programs - Foxhound1 - Tools - Start Foxhound via IE - debug
See also...
How do I start Foxhound?
How do I stop Foxhound?


Question: How do I install a new version of Foxhound?

Answer:


Note: A successful installation overwrites existing files. It is your responsibility to make a backup of your existing Foxhound installation if you want one. The simplest way to make a complete backup is to stop the Foxhound engine, then make a copy of the entire Foxhound1 folder and subfolders... do this BEFORE installing the new version of Foxhound. Here is where the folder is located on Windows XP and Vista:
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1
C:\ProgramData\RisingRoad\Foxhound1

To install a new version, first you have to run the Foxhound "unsetup" process:
Click on start - All Programs - Foxhound1 - Tools - Unsetup Foxhound
The next step is to install the new version; see How do I install Foxhound?

If you forget to run unsetup first you may see this message: Another version of this product is already installed. Just run unsetup and try again.

Note that the post-setup process will try to copy and upgrade the data stored in your existing Foxhound database before overwriting it.


Caution: If you are using the Windows Vista 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; see The $backup_foxhound1.bat file looked for a path specification in the FOXHOUND1 environment variable and it was empty.

See also...
How do I install Foxhound?
How do I reinstall Foxhound?
Another version of this product is already installed.
Why is it called "unsetup" instead of "uninstall"?
How do I remove Foxhound from my system?
How do I backup my Foxhound database?
How do I backup my Foxhound database on a regular basis?
The $backup_foxhound1.bat file looked for a path specification in the FOXHOUND1 environment variable and it was empty.


Question: How do I reinstall Foxhound?

Answer:


Note: A successful installation overwrites existing files. It is your responsibility to make a backup of your existing Foxhound installation if you want one. The simplest way to make a complete backup is to stop the Foxhound engine, then make a copy of the entire Foxhound1 folder and subfolders... do this BEFORE installing the new version of Foxhound. Here is where the folder is located on Windows XP and Vista:
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1
C:\ProgramData\RisingRoad\Foxhound1

To reinstall Foxhound, just run the InstallShield setup you have received. What you do next depends on which dialog box appears...


If you see this dialog box, you can proceed with the reinstallation:

When the InstallShield process reaches the end, click on the Post-Setup button to continue the installation. This part is critical; if you don't let the post-setup process run, the old installation of Foxhound will not be replaced:

This is what the post-setup process looks like. The registration status (Beta, Evaluation, Full) of your current Foxhound database is copied over to the new one, as well as other settings and all the Monitor samples that have been gathered:


If you see this dialog box, you have to run the Foxhound "unsetup" process first and then run the Foxhound InstallShield setup:

For more information about running the Foxhound unsetup process, see Another version of this product is already installed.


If you see this dialog box, click on Remove to run the Foxhound "unsetup" process, and then run the Foxhound InstallShield setup.

Do not click on Modify or Repair; they won't damage anything, but nothing will happen when you click on the Post-Setup button at the end of Modify or Repair process:


Caution: If you are using the Windows Vista 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; see The $backup_foxhound1.bat file looked for a path specification in the FOXHOUND1 environment variable and it was empty.

See also...
How do I install Foxhound?
How do I install a new version of Foxhound?
Another version of this product is already installed.
Why is it called "unsetup" instead of "uninstall"?
How do I remove Foxhound from my system?
How do I backup my Foxhound database?
How do I backup my Foxhound database on a regular basis?
Foxhound Introduction - Backup and Restore
The $backup_foxhound1.bat file looked for a path specification in the FOXHOUND1 environment variable and it was empty.


Question: How do I backup my Foxhound database?

Answer: Use Foxhound1 - Tools - Backup Foxhound Database.

See also...
Foxhound Introduction - Backup and Restore
How do I backup my Foxhound database on a regular basis?


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

Answer: 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\Foxhound1\$backup_foxhound1.bat
Here's how to set up a scheduled backup task on Vista:
1. Click on start - All Programs - Accessories - System Tools - Task Scheduler.

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

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

C:\ProgramData\RisingRoad\Foxhound1\$backup_foxhound1.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\Foxhound1\backup\generation1 (the oldest)
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1\backup\generation2
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1\backup\generation3 (the latest)
and on Vista:
C:\ProgramData\RisingRoad\Foxhound1\backup\generation1 (the oldest)
C:\ProgramData\RisingRoad\Foxhound1\backup\generation2
C:\ProgramData\RisingRoad\Foxhound1\backup\generation3 (the latest)


Caution: If you are using the Windows Vista 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; see The $backup_foxhound1.bat file looked for a path specification in the FOXHOUND1 environment variable and it was empty.

Caution: If you are using the Windows Vista 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; see Why doesn't the Foxhound backup process create the generation2 subfolder?


See also...
How do I backup my Foxhound database?
Foxhound Help - Backup and Restore
The $backup_foxhound1.bat file looked for a path specification in the FOXHOUND1 environment variable and it was empty.
Why doesn't the Foxhound backup process create the generation2 subfolder?


Question: How do I restore the old build of Foxhound after installing a new build?

Answer: Foxhound's executable code is stored together with Foxhound data inside the Foxhound database, so "restoring the old build of Foxhound" is the same as "restoring the old Foxhound database".

The post-setup process creates a backup copy of your existing Foxhound database, and you can restore that copy by copying the foxhound.db and foxhound.log files as follows:

On Windows XP, copy the foxhound.db and foxhound.log files from:
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1\backup\previous_build
to:
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1

On Windows Vista, copy the foxhound.db and foxhound.log files from:

C:\ProgramData\RisingRoad\Foxhound1\backup\previous_build
to:
C:\ProgramData\RisingRoad\Foxhound1

See also...
What is the upgrade policy for installing new builds of Foxhound?


Question: How do I reinstall an earlier build of Foxhound?

Answer: The regular re-installation process will work for an earlier build. HOWEVER, the post-upgrade process will NOT copy the data from your current Foxhound database to the one that's being installed when the current installed build number is later than the one that's being installed. That means you lose your sample data and option settings, and it means you will have to activate Foxhound as if it were a brand new installation.

You can preserve some of your data if you plan ahead and take a backup of your current Foxhound database before installing a new version. Then, if you decide to re-install the old version, you can do a restore rather than run another installation process. You will lose all the sample data recorded while the new version was running, plus all the changes you made to option settings... but you will get your old data back and you won't have to activate Foxhound again.

See also...
How do I reinstall Foxhound?
How do I backup my Foxhound database?
How do I backup my Foxhound database on a regular basis?
How do I restore the Foxhound database from a backup?


Question: How do I restore the Foxhound database from a backup?

Answer: If you have been making backups with Foxhound1 - Tools - Backup Foxhound Database, you can restore from one of those backups as follows:

On Windows XP, copy the foxhound.db and foxhound.log files from:
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1\backup\generation3 (for the latest backup)
to:
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1

On Windows Vista, copy the foxhound.db and foxhound.log files from:

C:\ProgramData\RisingRoad\Foxhound1\backup\generation3 (for the latest backup)
to:
C:\ProgramData\RisingRoad\Foxhound1

See also...
How do I backup my Foxhound database?
How do I backup my Foxhound database on a regular basis?
How do I restore the Foxhound database from a backup?


Question: How do I remove Foxhound from my system?

Answer: First, stop the Foxhound database if it's running.

You can do this by clicking on start - All Programs - Foxhound1 - Tools - Stop Foxhound Engine.

Second, run the Foxhound "unsetup" process. There are three ways to do this:

  • Click on start - All Programs - Foxhound1 - Tools - Unsetup Foxhound, or
  • use the Control Panel - Add or Remove Programs dialog to remove Foxhound Version 1, or

  • run this command: MsiExec.exe /X{B6CE87CB-2838-49AC-9E48-6E867BDD4B93}

Third, delete the Foxhound1 folder and all the files and subfolders.

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

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

See also...
How do I install Foxhound?
How do I install a new version of Foxhound?
How do I reinstall Foxhound?
Another version of this product is already installed.
Why is it called "unsetup" instead of "uninstall"?


Question: How do I figure out what went wrong during an installation?

Answer: If the problem occurred during the post-setup part of the Foxhound installation, a complete record of everything that happened may be found in the post_setup_trace.txt file located here on Windows XP:

C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1\setup\post_setup_trace.txt
and here on Vista:
C:\ProgramData\RisingRoad\Foxhound1\setup\post_setup_trace.txt

See also...
How do I see Foxhound diagnostics, errors and exceptions?


Question: How do I see Foxhound diagnostics, errors and exceptions?

Answer: See Foxhound Options - Display Diagnostics.

See also...
How do I figure out what went wrong during an installation?


Question: How do I start Foxhound in "safe mode"?

Answer: Safe-mode startup, also known as safe startup, stops sampling of all target databases by the Foxhound Monitor when Foxhound is started. This sometimes helps if Foxhound is unresponsive when it starts.

To enable safe-mode startup, create a text file named startup.txt containing these exact 4 characters

safe
and place 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\Foxhound1
and on Vista it is here:
C:\ProgramData\RisingRoad\Foxhound1

See also...
Why is Foxhound unresponsive when it starts?
How do I see Foxhound diagnostics, errors and exceptions?


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

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

See also...

Foxhound Options - Connection sampling threshold
Foxhound Options - Purge sample data
How do I keep the Foxhound log file from growing so large?
How do I shrink the size of the Foxhound database?


Question: How do I shrink the size of the Foxhound database?

Answer: The easiest way is to purge old sample data and then recreate the Foxhound database as follows:

  • Use the Foxhound Options - Purge sample data feature to speed up the deletion of old sample data.
  • Wait until the background purge process has had enough time to increase the amount of free space to the level you want; for example, from 2% to 75%.

    This may take a few hours or even days if you have a lot of data to delete; watch the amount of free space displayed by the Foxhound Options - Purge sample data feature.

  • Reinstall Foxhound following these instructions.

    This process will create and reload a new Foxhhound database with just the remaining data and much less free space.

See also...
Foxhound Options - Purge sample data
How do I reinstall Foxhound?
How do I keep the Foxhound database file from growing so large?
How do I keep the Foxhound log file from growing so large?


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

Answer: The easiest way is to regularly use the Foxhound1 - 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.

You can automate this task; see How do I backup my Foxhound database on a regular basis?

See also...
Foxhound Help - Controlling Growth
Foxhound Help - Backup and Restore
How do I keep the Foxhound database file from growing so large?


Question: How do I tell Foxhound to use an HTTP port other than 80?

Answer: You can edit one or more of the following Windows command files to specify a different HTTP port:

$start_foxhound1_engine.bat

$start_foxhound1_firefox.bat

$start_foxhound1_firefox_debug.bat

$start_foxhound1_ie.bat

$start_foxhound1_ie_debug.bat

By default, these command file are installed in this location on Windows XP:
C:\Documents and Settings\All Users\Application Data\RisingRoad\Foxhound1
and in this location on Vista:
C:\ProgramData\RisingRoad\Foxhound1
Look for a line inside each command file that says this:
-xs http(port=80;maxsize=0;to=600;kto=600)^
and change the 80 to something else, like 12345:
-xs http(port=12345;maxsize=0;to=600;kto=600)^
Then, look for a line that says this:
http://localhost/foxhound
and if you find it (all five command files have it except for $start_foxhound1_engine.bat) change it like this:
http://localhost:12345/foxhound

See also...
What HTTP port should I use for Foxhound?
IANA port number assignments
Can't start HTTP listener on address 127.0.0.1:80
Could not bind to address ...
Database server shutdown due to startup error


Question: How do I change the Alerts criteria? (threshold settings, etcetera)

Answer: Alerts criteria are specific to each Monitor session.

Use the Monitor Database button on the Foxhound menu to open the Monitor page, and then click on the Alerts Criteria link at the top right:


Question: How do I tell different databases apart in Alert emails?

Answer:

  • Specify a different DSN or Connection String name for each target database when starting a Foxhound Monitor session for that database, or
  • set the GlobalDBId property to a different non-default value for each target database that uses Version 7 or later of SQL Anywhere. If the target database GlobalDBId property is set to a non-default value, that value will be shown in (parentheses) after the DSN or Connection String name in Alert emails. This makes it easier to tell different remote databases apart in a replicating or synchronizing environment.

Here's how to set the GlobalDBId option:

   SET OPTION PUBLIC.global_database_id = '47';

Here's how to display the value after you've set it:

   SELECT DB_PROPERTY ( 'GlobalDBId' )

Here are the non-default GlobalDBId value ranges:

  • Versions 7.0.0 through 8.0.0: 1 to 2147483646
  • Versions 8.0.1 and later: 0 to 2147483646


Question: How do I get something to show up in the Last Statement column?

Answer: Turn on the capturing of the most recently-prepared SQL statement for each connection:

  • Specify the -zl server command line option, or
  • call sa_server_option() to set RememberLastStatement to 'YES'.

Another reason the Last Statement column may be empty is that SQL Anywhere is reusing a previously-prepared SQL statement. This may happen even if the application code is using dynamic SQL; here is an example:

A PowerBuilder 10.5 application repeatedly executes the following embedded SQL statement written in PowerScript, using an ODBC connection to a SQL Anywhere 10.0.1 database:

UPDATE inventory
   SET item_count = item_count + 1
 WHERE item_id = :ll_pkey
 USING itr_sql;

Each execution provides a different value for the ll_pkey host variable (420001, 680001, 350001, ...) but otherwise the SQL remains the same. Nothing shows up in the LastStatement connection property even though dbsrv10 -zl (capture most recently-prepared SQL statement) is specified.

Request-level logging shows that the statement is prepared twice, but after the second PREPARE it starts doing CACHED_DROP_STMT and VALIDATE_STMT operations... no more DROP_STMT or PREPARE operations. This has the side-effect of causing the original SQL statement to no longer show up in the LastStatement connection property.

=,<,21,PREPARE,update inventory SET item_count =item_count + 1 WHERE item_id =? 
+1,>,21,PREPARE,65548
=,<,22,COMMIT
=,<,21,EXEC,65548
=,H,21,0,int,420001  
=,>,21,EXEC
+1,<,21,COMMIT
=,>.,21
+1,<,21,DROP_STMT,65548
=,>,21,DROP_STMT

=,<,21,PREPARE,update inventory SET item_count =item_count + 1 WHERE item_id =? 
=,>,21,PREPARE,65549
=,<,21,EXEC,65549
=,H,21,0,int,680001  
=,>,21,EXEC
=,<,21,COMMIT
=,>.,21
=,<,21,CACHED_DROP_STMT,65549

=,>,21
=,<,21,VALIDATE_STMT,65549
=,>,21
=,<,21,EXEC,65549
=,H,21,0,int,350001  
=,>,21,EXEC
=,<,21,COMMIT
+1,>.,21
=,<,21,CACHED_DROP_STMT,65549

=,>,21
=,<,21,VALIDATE_STMT,65549
=,>,21
=,<,21,EXEC,65549
+1,H,21,0,int,10001  
=,>,21,EXEC
=,<,21,COMMIT
+1,>.,21
=,<,21,CACHED_DROP_STMT,65549

... and so on.

This optimization isn't done by PowerBuilder, it's done by SQL Anywhere itself. It is a new feature in SQL Anywhere Version 10, called client statement caching, and it is done by these client interfaces: ODBC, OLE DB, ADO.NET, embedded SQL and the iAnywhere JDBC driver. It is not done for Open Client, jConnect, or HTTP connections.

A really crude workaround is to use PowerBuilder's own EXECUTE IMMEDIATE feature to stop this optimization, which in turn will force the SQL to show up in the LastStatement connection property.

A better workaround is to just turn off the client statement caching feature:

   SET TEMPORARY OPTION MAX_CLIENT_STATEMENTS_CACHED = '0'; -- 0 to 100, default 10

These workarounds have a dark side: the performance penalty that results from turning off the optimization. In the long run, it's may be better to live without seeing Last Statement.


Question: How do I get something to show up in the Total Waits, Waiting Time columns?

Answer: Turn on the capturing of timing information for each connection:

  • Specify the -zt server command line option, or
  • call sa_server_option() to set RequestTiming to 'YES'.


This page was last generated on July 3, 2012.      FAQ      Foxhound Home      RisingRoad      Breck.Carter@gmail.com