One of the truly unique features of dbWatch is its integrated SQL Worksheet, which, although simple in operation has some sophisticated applications, including cross-database queries.

The SQL Worksheet is not developed from a developer-centric perspective and therefore doesn’t include many developer-oriented features such as code optimization or analysis features.
It is meant to give responsible DBA’s the ability to locate any problems and correct them, without having to switch between a multitude of tools (same SQL Worksheet for all supported databases).

The toolbar along the top of the SQL Worksheet allows you to load and save SQL queries from file and save the output to file.

The tree on the lower left side lets you select among all the instances that are available in dbWatch. The upper text area on the right side is where you can enter the SQL statements you want to execute.

First let us select an instance, for example the “DGRAC1” instance. Notice that the current login is shown in the square brackets after the name. This can be changed by right clicking on the instance, as shown below.

Next, lets type in a simple query to execute. For example “select STARTUP_TIME from v$instance”, and click on “Execute” (or use the shortcut Ctrl+E).

So far everything is as expected. The result appears neatly in the lower window.

Now lets try one of the cool features of the SQL Worksheet. When we select an additional instance in the instance tree, and hit Execute.

You will now see two rows in the resultset, one from each instance. But we don’t know which row is from which instance. This leads us to another feature.

dbWatch can add 3 columns to the resultset. A row number, the given name and the group name for the instance the row belongs to. Click on “Given name” in the view above the instance tree, and execute the statement again.

You now see that the given name appears as the first column.

The example only returns one row per instance, but there are no limits on what types of results you can merge in this way. The only requirement is that all instances must return the same number of columns. Go ahead and play around with it yourself to see more of this amazing feature.

← Property System / Reporting →


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment