Wednesday, October 22, 2008

Inside the application data directory

If you have ever looked in the Toad data directory you were probably a little bit bewildered about all the stuff in there. This article will try to shed some light on what all the files in there are used for by the Toad application.

First off all before we start off here, lets begin with something really basic. If you don't know where the application data directory is there is a very easy way to find it. Just go into the Help|About of Toad and click on the Application Data Directory link.

This will bring up a windows explorer window showing the data directory. Just one note, if you want to tinker with something in here be sure to shut down Toad first.

So now you see the stuff in the directory. Lets start going through the files to see what they are all used for.

NameDescription
Action.logThis file tracks your usage within Toad. If you agree to share this with us (And please do, it really does help us) it's contents will be sent automatically to us periodically. We collect the data regardless though and it will be included in a support bundle.
Connections.xmlThis file contains all the contents of your connection manager (Or new connection dialog if that is your fancy).
ConnectionTrace.logCreated to contain the SQL Output connection trace log file when you log to file.
ExceptionTrace.logThis file contains a log of all exceptions that have been encountered while running the application. This file helps us a lot when you generate a support bundle.
Settings.xml Global settings configuration file. This file contains a lot of application settings save in a SOAP formatted XML file.
SqlServerPlanPrefs.xml File used to generate SQL Server execution plans.
ToadSupportBundle.zip The last support bundle you have generated.

There can be some more log files generated too by setting different command line option to generate additional debug information. All these files will then be included in the support bundle when generated.

Now lets look at what is in all the sub directories and what they contain.

NameDescription
Automation This is a temporary directory used by automation when running automation scripts.
Cache This directory is used to spool cache database meta data out to disc if this is enabled. The data in here is in binary format and can always be recreated by fetching it from the database.
CNSScripter This is a temporary directory used by compare and sync, some script generation for alter dialogs and the script tab in the Object Explorer.
Context This directory contains settings that depend on the context within Toad. Depending on the sub folder name it contains different information. First have database browser filters, and their named equivalent in two different folders ("Filter" and "NamedFilter" respectively). We also have the RHS layout of each type in the "Type" directory. Finally you have custom data editing statements in the "Adapter" directory.
Keyboard Contains keyboard layout customizations if you have done any.
Layout Contains different layouts of parts of the application. Examples of these are the tool tip panes of the editor and column layouts of the messages tool window.
ModuleSettings This is another directory where we have a lot of settings saved. They are saved in the same format as the Settings.xml file. The files here are divided by functionality.
Plugins Directory that can be used by different plugins of Toad for whatever they choose.
Session Files in this directory store desktop configurations. That means they contain toolbar customizations, tool window locations by default but can contain more or less information.
SQLRecall Data files for SQLRecall.
Templates This directory has different templates used in different parts of the application. This includes code snippets, some connection startup scripts and DOE templates (Only supported by Toad for DB2 currently).

If you are running into problems which you suspect might be settings related the easiest way to check that out is to just rename the settings directory (You need to close Toad first) and then restart Toad. If this solves the problem the two files that you can almost always copy over from your old directory without any problems is the connections.xml, sessions.tss file and the Layout directory. Replacing these files you can reset all your options "the hard way" without loosing your connection history and the layout of all tool windows which are usually the part that takes the most work to restore in my opinion.

2 comments:

Anonymous said...

I read your disclaimer that this doesn't apply to Toad for Oracle but surely to config file management is the same. No?

Henrik "Mauritz" Johnson said...

Unfortunately no, Toad for Oracle stems from a completely separate code base and does not share configuration management with the other Toad products.