Sunday, October 19, 2008

Toad nomenclature

We have a bunch of terms referring to different aspects of the Toad application internally and I thought I would share some with you because it's not that uncommon that it slips out in the Yahoo Boards when we talk about it so why not just go through them and explain them.

ActionRefers to any toolbar or menu item. The name action comes from the internal name from these through the plugin interface.
AssemblyThis is actually a .Net term that refers to a loadable chunk of code (Basically a dll file if you are used to normal Windows programming).
CoreThis refers to the part of the application that is shared between all products of the .Net Toads.
Database ConnectionWe use this term to refer to an actual connection to a database (In difference to a toad connection).
DOEDocument object editor. The window that is used to create or alter an object.
DOVDocument object viewer. The control that describes a specific object either in the RHS or the Object Details.
FacilityThis is an abstract representation of functionality that a plugin can provide to the core to extend it's functionality. Examples of facilities are version control provider, connection providers and support for file types.
LHSLeft hand side of the database browser. Also refers to the entire content of the Object Explorer.
Object PaletteUsed to be the name of the Object Explorer and some of us have a hard time learning the new name.
PluginA non core part of Toad. Plugins can extend functionality of the code by providing actions and facilities.
ProviderA provider is a facility that facilitates connections to databases. For instance the MySQL provider gives Toad the ability to connect to a MySQL database.
QP5The parser that Toad uses to parse SQL. The acronym stands for Quest Parser 5. This is a really cool piece of code that a team in Belgium is developing. It is used in several different Quest products.
RHSRight hand side of the database browser. Also the document containing the details for the Object Explorer. Contains a DOV.
Toad ConnectionWe use this term to refer to the one connection that the user has made to a database. This differs from a database connection which is an actual connection to the database. One toad connection can be represented by one or more database connections. I'm going to write a separate entry all about connection and transaction handling in Toad at some point because that is complicated enough for it's own article.
TDAToad for Data Analysis, our short hand acronym to refer to this specific product.
TRLToad Resource Locator. This is the way we pass around information about database objects between different parts of the application. Basically they are a string that uniquely identifies one database object in one database.

Command line reference

The documentation of what command line options are available on the Toad.exe is not necessarily that well covered in the documentation. True there is rarely any need to specify anything on it unless something goes wrong. I just thought I'd go through what is available.

First of all the format. Toad allows any parameters to be specified regardless of if it knows what they are or not because some plugins might want to read it later on unbeknown to the original startup code. All parameters are specified using this format.

toad /{parameter name}={value} {files to open on startup}

Also if you want to specify an option with space in it you can quote it like this.

toad "/{parameter name}={value}" "{A file to open}"

Here are the following parameters that we support in Toad as of version 4.1.

ParameterValueDescription
datadirDirectory Specify an alternative data directory for Toad to read it's settings from instead of the default location.
profile"true"Start Toad and generate profiling information. This is sometimes used by us if you Toad is behaving very slow to track down what is wrong. The information generated is included in the support bundle if it is available.
batch "true" Run toad in batch mode. This means that it will just open all available files without opening up the user interface and then exit. Used by automation.
prestart "true" Pre start Toad. This means that toad is run in the background to be available to "pop up" when you actually want it. This feature is never actually used but if you are ok with pre loading on windows startup you can add toad /prestart=true to your startup menu and have lightning fast startups when you actually need Toad. Will use memory even if you are not using Toad. This is how a lot of other apps fake quick startup times like for instance Adobe Reader.
installinit "true" Used by installation to initialize a cache of the available plugins of to the application. When run by this it needs to write to the install directory, but in case you have this which is normally the case you can rerun this as many times you want.
feedback "true" Enable usage reporting.
license "edit" Display the license entry form on startup.
transpose "1" Allow transposing when exporting grids. That means switching X and Y axises of the grid.
exportbenchmark "1" Generate a log file to help benchmarking the export engine. The file will be included in your next support bundle
excelverbose "1" Generate a lot of verbose info when exporting into Excel.
profilevc "1" Generate a profiling log to help benchmarking the version control code. The file will be included in your next support bundle
debuglog Filename Generate a log of some debugging events. The file will always be placed in the application data directory.
yukondebuglog "1" Generates debugging information for the SqlServer 2005 debugger. The file will be included in your next support bundle.
dbmsverbose "1" Generate very verbose DBMS_OUTPUT output.
oraclelastplan "1" Include the latest Oracle explain plan to your support bundle.
db2debuglogreports "1" Generate debugging information for the DB2 debugger. The file will be included in your next support bundle.
db2debuglog "1" Generate debugging information for the db2 command line executions. The file will be included in your next support bundle.

To end with an example running Toad like this will enable usage reporting and using a new application data directory and then open a file on startup.

toad /feedback=true "/datadir=c:\Users\MyUser\My Documents\ToadDir" "c:\Users\MyUser\My Documents\A Sql File.sql"

The history of Toad for SQL Server

I recently took some time to look through the different releases we have made of Toad over the years since we started and just thought I would share it with you guys. I chose the Toad for SQL Server release because that was the one which had made the most releases (For instance Toad for DB2 never made the 3.1 release). I have to say that looking at from where we have come Toad is becoming a lot more polished. Especially starting with 4.0 it seem that we have started putting more time into polishing stuff up than just trying to cram as much features as possible. It is also pretty remarkable how little Toad has changed from our first release. Even if you went straight from 1.0 to 4.0 you would probably feel pretty at home with the application even though there is a lot more functionality in it.

This only goes through some really superficial first impressions. There is tons of functionality that has been added all over the application which is not covered at all in this retrospect. Also this only covers the .Net based version of Toad (Everything except the original Toad for Oracle). Finally the Toad for Data Analysis obviously has a very different look even though it is based on the same code and that isn't covered covered either and it isn't that interesting either since it did not join "the family" until version 3.0 of Toad for SQL Server and as such hasn't seen that much change.

Toad for SQL Server v1.0

When you start the app up you get nothing but the startup page (Which is interestingly a different page in this version than all the other versions) and a new connection dialog. Also fetching around a 200000 record long query takes over 1 minute in this release (It’s also N*Log N so fetching 500K takes over 5 minutes). This is also the only release we made that had the history node in the connection manager.

Toad for SQL Server2.0

Very small visual changes for this release. We added the composite image manager for better icons in the object palette. Also switched out SandDock to UIDock for the tool windows. We also fixed the fetching speed when you fetch everything we are pretty fast in this release, you don’t get any updates until you fetched all the data though. When you fetch just the first 50 rows and then continue we are still really slow. If you look closely you can also see that we switched the tab control in the object palette, added filtering and the column list pane at the bottom. We also added the connection output to the editor. In this release we finally managed to get NGen to work properly so startup time went from 12 seconds in 1.0 to around 9 seconds in this release.

Toad for SQL Server 3.0

This is the first release that figured out that my installed SQL Server instance is called SQLEXPRESS automatically. It also the first with FastData in it so fetching is now pretty fast (Pretty much as fast as before but with updates as you are fetching. This is also the only release which has indication of not null (The blue column header).

Toad for SQL Server 3.1

The most obvious changes here is the new connection tool bar (Which replaced the old connection bar). We also have the new quick search functionality implemented here. We have also added spooling to FastData so we now fetch the 200000 row query in about 5 seconds. This is the first release which doesn’t limit results in the editor by default any more.

Toad for SQL Server 3.2

Here the most obvious change is the panes of the editor. Apart from that there are few visible changes from before. This was mainly a stability improvement release.

Toad for SQL Server 4.0

Now this one is different! First of all we trimmed the grids so that you see a lot more rows from the start. The tabs in the editor has been tweaked to something that most people will find more useful (And they also follow the skin of the main application). The browser is in tree view. You also no longer get the configuration wizard on start up. The toolbars are rearranged so you can see all the buttons (We also no longer show the connection toolbar by default). A lot of the icons have been cleaned up. This is also the first release where the two tool windows showing on the left show up that way by default (In all previous screenshots I opened and rearranged them manually). And also we add the auto hidden tool windows to the right of the screen. And finally we changed the name of the object palette to object explorer.

Toad for SQL Server 4.1 Beta

An interesting change here is that we fixed a bug all the way from 1.0 of the product to not apply a skin by default. We also fixed the “edit” indicator button on grids. You can also see that the connection output is now gone and replaced with the messages tab. More work on cleaning up icons. We also see that we don’t expand the database node by default anymore in difference from 4.0. Another change in the 4.1 release is that on my machine this starts in around 5 seconds. Every release up to this release has started in around 9 seconds except for the 1.0 release which took 12 seconds.

Starting this blog

Every once in a while I've been writing Toad stuff on my personal blog and I figured it is time to stop doing that and try to do this blog into something a little bit more useful.

I will try to write tips and tricks about how to use Toad as I can think of them.

I'm one of the original developers of the .Net versions of Toad (All products except the original Oracle one) and currently work on what we internally call the "core" which means the piece of the application that is shared between the different platforms.

The entries on this blog are also posted on ToadWorld. For feedback and direct communication with all the developers of the product the best venue is till the Yahoo Groups. The information here has not gone through the normal peer review process of our normal documentation and sometime it might be about features that have not been properly tested (And that is why we aren't documented because we aren't ready for people to start banging on it). So use the information you find here at your own risk. Also please excuse me for all my spelling and grammatical errors, English isn't my first language (Truth be told I'm not that great at spelling in Swedish either).

I have a bunch of stuff I want to write about already so originally there will probably be a bunch of postings as I start out (Assuming I stick to it). After a while it should settle down a bit to just a few posts a month as I've worked through my backlog.