TDAppTools v2.0 - Sql Monitor

General discussion forum about all things Unify and Gupta.

TDAppTools v2.0 - Sql Monitor

Postby Dave Rabelink » Thu Sep 29, 2016 2:44 pm

TDAppTools v2.0

Application add-on offering handy features for developers, testers, designers and service engineers.
Features to increase productivity in working with applications build with Team Developer.
TDAppTools is available for all TD versions, starting from TD 2.1 up to TD 7.0 (32bit).

TDAppTools is started from TD build applications giving a toolset to get more detailed information on the application internals and
the system it is running on, even in production environments.

So to be clear, it is not a Team Developer IDE add-on which would primarily be used by developers in the TD development environment, but a toolset to be started
from your running application to get more information on that running application, wherever it is used.
Runs from source while debugging in the IDE but offers the same features when running from executable (eg in production environment).


TDAppTools features

As TDAppTools is a personal project and mainly developed in spare free time it was not feasible to introduce all wanted tools at the start.
Those features should be compatible with most TD versions and offer generic functionality to be used in any project.
Therefore I chose to introduce features one at a time for each major release.

TDAppTools v1.0:

Gui Inspector
Inspect the GUI of the running application by showing internal details of GUI objects and their structure.


TDAppTools v2.0 (new):

Sql Monitor

Using Sql Monitor you can trace database actions performed by your application in real-time.
This is without having to enable logging (SQL.INI) or having to change the setup of your system in any way.

Just start the main trace window of Sql Monitor and it will detect when your application calls Sql functions.
These actions are displayed in the trace window and statement log.


List of features:

  • Detects calling of a set of predefined Sql functions from the current running application (eg SqlConnect, SqlPrepare, SqlFetchNext etc).
  • Works on any database brand (eg Oracle, SqlBase, DB2 etc) as long as the supported Sql functions are called from the application.
  • Enable and disable monitoring on-the-fly.
  • Shows the original sql statement executed.
  • Shows details on actions, like the parameter values of the sql function being called.
  • Inspecting result sets. Display the values of bind variables for each fetched record.
  • Exporting trace and result sets (records) to text, Excel (csv) and HTML.
  • Shows the actual time spent to execute the actions (measured on API level, so no extra noise of business logic etc).
  • Search for specific statements containing particular texts (like names for tables, columns, variables etc).
  • Search for specific records within result sets having a particular value for bind variables.
  • Pretty printed SQL statement using color coding.
  • Inspect fetched (string) buffers as-is or in HEX view. Also conversion options from UNICODE<->ANSI.
  • Break modes to halt execution when particular conditions are met. Application will wait.
  • Inspect sql statements, input bind variables BEFORE they are executed/send to the database (in breakmode).
  • Inspect output bind variables AFTER they are fetched from DB but before the application is about to process them (in breakmode).
  • Change the sql statement and/or input bind variable values BEFORE action is executed on database on-the-fly (in breakmode).
  • Change output bind variable values AFTER they are fetched from DB (in breakmode).
  • Change string (buffer) values by loading them from a file (in breakmode)
  • Save string (buffer) to file on disk.
  • Easy integration in projects with a very low footprint in source and at runtime

SqlMonitor_ResultsetViewer.png


Instead of creating a complete manual of TDAppTools, demo videos are created to demonstrate the features in depth.
So the video's are lengthy but they will show all details needed to know to be able to use the tool.

You can find the video of Sql Monitor on the TDWiki YouTube Channel here:
https://www.youtube.com/watch?v=EXAX53Dr4yI

You can find the video of Gui Inspector on the TDWiki YouTube Channel here:
https://www.youtube.com/watch?v=XCr-IQHEXCQ


Info on TDAppTools and download link on TDWiki :
http://tdwiki.daverabelink.net/index.ph ... TDAppTools


For questions, ideas and issues, respond here or send me a private email (see my signature).

TDAppTools is a personal project, developed in free spare time.
So, if you like the tools, please consider a donation to support this development.
You can find the DONATE button on the TDWiki in the toolbar at the left.

http://tdwiki.daverabelink.net
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles on Team Developer Wiki
Download samples from TD Sample Vault

Image
Go forward! Come join the TD, SqlBase & TDMobile community on
Team Developer Community Forum
User avatar
Dave Rabelink
 
Posts: 1655
Joined: Sat Feb 17, 2007 12:01 am
Location: Gouda, The Netherlands

Re: TDAppTools v2.0 - Sql Monitor

Postby Dave Rabelink » Tue Oct 18, 2016 11:08 am

TDAppTools v2.1

Sql Monitor

List of changes:

[list]
[*]New: Break in source.
[*]Fully compatible with TD 7.0 (x86)


Having "Break in source" feature you are able to break at the code line in the TD IDE where the SQL action is being executed.
For example, break on SqlfetchNext call in the source at the moment a record is fetched having specific data values or break
on SalPrepareAndExecute when a query is being processed.

You can find the video of TDAppTools V2.1 on the TDWiki YouTube Channel here:
https://www.youtube.com/watch?v=qud7C8xf0n0


Info on TDAppTools and download link on TDWiki :
http://tdwiki.daverabelink.net/index.ph ... TDAppTools
Regards,
Dave Rabelink

Image
Articles on Team Developer Wiki
Download samples from TD Sample Vault

Image
Go forward! Come join the TD, SqlBase & TDMobile community on
Team Developer Community Forum
User avatar
Dave Rabelink
 
Posts: 1655
Joined: Sat Feb 17, 2007 12:01 am
Location: Gouda, The Netherlands

Re: TDAppTools v2.0 - Sql Monitor

Postby mcwizardry » Thu Nov 24, 2016 8:50 am

Just tried this out today and I like it a lot. This is a great tool.
mcwizardry
 
Posts: 19
Joined: Fri Apr 04, 2014 2:26 am

Re: TDAppTools v2.0 - Sql Monitor

Postby Bonus83 » Mon Jan 23, 2017 8:27 am

Hi Dave,

both tools are outstanding.

As it is not possible to see how you archived this I want to know if your code can be used to archive some kind of stack trace function?
So in case of an SQL error or any other error (thrown by the dev) get a stack trace to write it to the logs?

Thank you

Timo
Bonus83
 
Posts: 28
Joined: Mon May 13, 2013 12:46 am

Re: TDAppTools v2.0 - Sql Monitor

Postby Dave Rabelink » Tue Jan 24, 2017 12:54 am

Hi Timo,

A stacktrace-like functionality is a feature I wanted to have for ages now.
Problem is that this seems not to be accessible from the "outside" of the TD runtime.
(at least, I'm still searching...)

That would be the first tool for TDAppTools I wanted to add if I could find out a way to do it.

At this point, only the Gupta devs could pinpoint to a potential solution.
WIthout peeking into the sources of TD runtime right now it is a black-box.

THere are a lot of features TD offers in the IDE and are surely available at runtime which are on my list to put into a tool.

I will again ask the Gupta devs to think about ways to get such tools feasible...
Regards,
Dave Rabelink

Image
Articles on Team Developer Wiki
Download samples from TD Sample Vault

Image
Go forward! Come join the TD, SqlBase & TDMobile community on
Team Developer Community Forum
User avatar
Dave Rabelink
 
Posts: 1655
Joined: Sat Feb 17, 2007 12:01 am
Location: Gouda, The Netherlands

Re: TDAppTools v2.0 - Sql Monitor

Postby Ninelabs » Sun Feb 26, 2017 8:26 pm

Hi Dave,

This tool looks to be fantastic (and a stack trace would also be the top of my list!) I am running into an issue using it with 5.1SP6 Build 14553 - it comes up with "Error encountered loading library: vti51". Would this error be occurring because we are patched with an EMP (EMP 5368)? If so, no probs - will be upgrading to V7 in the next couple of weeks so will wait. Otherwise, is it an indication that I've stuffed something up? I simply call the IsInstalled followed by the GUI or SQLMonitor starter functions from the APL (as shown in the video). The location of the vti51.dll doesn't matter (and that library is used by the Visual Toolchest libraries anyway so I know it can be found). Is it simply a permissions thing (Windows 7?)

My code is:
Code: Select all
Popup Menu: TD App Tools
   Resource Id: 46053
   Enabled when:
   Status Text:
   Picture File Name:
   Menu Item Name:
   Menu Item: GUI Monitor
      Resource Id: 46055
      Keyboard Accelerator: (none)
      Status Text:
      Menu Settings
         Enabled when:
         Checked when:
      Menu Actions
         If PALTDAppTools_IsInstalled(  )
            Call PALTDAppTools_ShowGuiInspector( hWndNULL, FALSE, hWndNULL )
         Else
            Call SalMessageBox( 'Error! TD App Tools has not been installed or the installation is invalid. Please see the System Administrator.', 'TD App Tools', MB_IconAsterisk )
      Picture File Name:
      Menu Item Name:
   Menu Item: SQL Monitor
      Resource Id: 46054
      Keyboard Accelerator: (none)
      Status Text:
      Menu Settings
         Enabled when:
         Checked when:
      Menu Actions
         If PALTDAppTools_IsInstalled(  )
            Call PALTDAppTools_ShowSqlMonitor( hWndNULL, FALSE, FALSE )
         Else
            Call SalMessageBox( 'Error! TD App Tools has not been installed or the installation is invalid. Please see the System Administrator.', 'TD App Tools', MB_IconAsterisk )
      Picture File Name:
      Menu Item Name:


Thanks for developing this!

Cheers,

Tristan
Ninelabs
 
Posts: 2
Joined: Tue Jan 18, 2011 12:27 am

Re: TDAppTools v2.0 - Sql Monitor

Postby Dave Rabelink » Mon Feb 27, 2017 1:22 am

Hi Tristan,

I tried to fix it. Can you check the fixed version to see if the issue is solved?

You can get it here:
http://tdsamples.daverabelink.net/index ... /TD51_Fix/
Regards,
Dave Rabelink

Image
Articles on Team Developer Wiki
Download samples from TD Sample Vault

Image
Go forward! Come join the TD, SqlBase & TDMobile community on
Team Developer Community Forum
User avatar
Dave Rabelink
 
Posts: 1655
Joined: Sat Feb 17, 2007 12:01 am
Location: Gouda, The Netherlands

Re: TDAppTools v2.0 - Sql Monitor

Postby Ninelabs » Mon Feb 27, 2017 7:28 pm

Hi Dave,
It still gives the same error unfortunately.
Cheers,
Tristan
Ninelabs
 
Posts: 2
Joined: Tue Jan 18, 2011 12:27 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron