 |
|
 |
Hey Doga,
Great dll. I've got a sybase database on my local machine and have a blackbox program that connnects to it. The read-only username and password is stored with the DSN, however the program passes it a different set of credentials in order to do write operations. I was wondering if this tracer can be used to recover the username and password.
Cheers,
Fidel
|
|
|
|
 |
|
 |
Thank you for the article, however, we cannot get the DLL to function. We have tried it on Vista AND on XP SP2 and SP3. We tried to build your code on VS 2008 Team Edition, VS 2005 Pro and Dev Studio 6.0 Ent. The test App is a legacy C++, MFC ODBC app (though we have tried your DLL with C# and C++/ATL code, too.)
We have built and copied the DLL to the System32 directory as instructed. Modified the permissions to exactly resemble the permission on the MS ODBCTrace.dll. But still nothing. No Trace log, no ODBCTracer icon.
The MS supplied DLL DOES work correctly, though.
Has anyone got this code to work? Any suggestions for us?
Any Help/input is appreciated.
Trent
Trent G. Fryar
CEO, Senior Software Developer
Rebel Software Systems, Inc.
Trent.Fryar@csa-rebel.com
|
|
|
|
 |
|
 |
It seems that this project is desd.
There is a derived project at SourceForge:
http://sourceforge.net/projects/odbctrace/
Although it is dead, too.
There is no such free project, to my knowledge, that is updated to run on newer systems.
|
|
|
|
 |
|
 |
Hi
There are very small SQL script in SQL-log file. Only 256 symbols.
How grow type szSqlStr SQLWCHAR*
I change function void ODBCTraceArg(ODBCTraceCall *call, int argnumber)
case TYP_SQLWCHAR_PTR:
{
if (arg->value)
{
char buffer[5120];wcstombs(buffer, (SQLWCHAR*)arg->value, sizeof(buffer));
ODBCTraceDump("\t\t\t%s\t%s\t%s\r\n", arg->name.c_str(), TracerType2SQLType(arg->type), buffer);
}
else
ODBCTraceDump("\t\t\t%s\t%s\tNullpointer\r\n", arg->name.c_str(), TracerType2SQLType(arg->type));
break;
}
But, size of script grow to 1001 symbols only.
modified on Thursday, April 17, 2008 4:16 AM
|
|
|
|
 |
|
 |
For All, You can watch the decision of this question on a forum sql.ru
|
|
|
|
 |
|
 |
At first , I download your code and compiler it to a dll,then i want use the odbcad32.exe to debug the dll,but failed, so how can i debug this dll?
Second, would you please tell me,whether can i grasp all the odbc event by code,if can ,how can i do?
thanks for a lot!
|
|
|
|
 |
|
 |
Hi there,
I am currently trying to debug some ODBC problem in a third-party application.
Actually, the application shows 'Communication Link Failure' and 'Function Sequence Error' messages.
However, I don't have VisualStudio so I can't compile ODBCTracer.dll. Is there a place where this wonderful tool can be downloaded from in binary form?
I have already tried to get a bit of tracing information using the standard odbctrac.dll but that does not seem to capture any ODBC traffic. Has anyone else had this problem?
Best regards,
snowbird
|
|
|
|
 |
|
 |
When attempting to use ODBCTracer I receive the following error from ODBC Administrator:
General error: either C:\Windows\System32\ODBCTracer.dll is not an ODBC tracing dll or it is obsolete.
I am using Windows XP (x64) SP 2
with ODBC Administrator odbcad32.exe v3.526.3959.0
Any suggestions?
|
|
|
|
 |
|
 |
plancake wrote: When attempting to use ODBCTracer I receive the following error from ODBC Administrator:
General error: either C:\Windows\System32\ODBCTracer.dll is not an ODBC tracing dll or it is obsolete.
I am using Windows XP (x64) SP 2
with ODBC Administrator odbcad32.exe v3.526.3959.0
Any suggestions?
I got this message, and it was resolved by copying the dll to C:\Windows\System32\
|
|
|
|
 |
|
 |
I am running an MS Access DB as a front end connecting to an Oracle DB on a shared network. I am getting the error "ODBC--call failed" everytime I run a select query. This error started happening when I upgraded from Access 97 to Access 2003. I tried using the ODBC Tracer. I set the directory where I want the SQL.log file to be created. Then I started the Tracer and ran the query. I stopped the Tracer after the error message popped up. The file isn't created. I tried changing the directory and running the Tracer again and it didn't work. Can anyone please offer a solution to either the error message, or the Tracer problem?
Thanks.
Sean
|
|
|
|
 |
|
 |
Can I in any way customize the ODBC driver manager utility?
Uday
|
|
|
|
 |
|
 |
Hi,
I saw your ODBC tracer, Its really Great!! In your article i found that you have written your own ODBC driver, Can you Please tell me where we can get more idea of writing own ODBC driver for windows env, Any samples will be helpful...
Thanks in Advance for your reply...
Regards
Rajendra BC
|
|
|
|
 |
|
 |
Hi,
I had downloaded the sources of the MySQL-ODBC-driver and an easier implementation of an odbc-driver of the SQLite database. By looking at these projects you can scrutinize the functions you will have to implement and export by your odbc-drivers DLL. Finally, the odbc specification within the MSDN was very helpful for me.
Arinir
|
|
|
|
 |
|
 |
Thanks Arinir,
I am following your steps, I have one doubt, I created one dll & I registed in ODBC driver manager in windows and created a DSN for mydriver...I could not able to access the my function call from VC..it is giving error message as
IM001 [Microsoft][ODBC Driver Manager] Driver does not support this function.
Senerio: I have implemented a function SQLConnect in driver DLL which i have registered. When I call SQLConnect in VC application, above error generated..
Is this a problem in DLL? Or something else?
Is there any mandatory things that should be followed while writing the driver DLL OR can we just register any DLL as ODBC driver? Can you please help to solve this problem....
regards
Rajendra BC
|
|
|
|
 |
|
 |
Hello, I tried this tool, it works with MS Access, but not with any program compiled in VC++ caling bare bone ODBC API. Any program I create, generates memory excetion at execution of SQLSetEnvAttr(). The program below works with tracing stopped, but after I start tracing using your library this program fails. (I have ODBC drivers version 3.525.1117.0, Windows XP and VC++ 7).
#include
#include
void main()
{
SQLHANDLE henv;
SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv);
SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_INTEGER);
SQLFreeHandle(SQL_HANDLE_ENV, henv);
}
|
|
|
|
 |
|
 |
Hi there, I am thinking of using your tool to try and solve some problems.
Before I get into it can you tell me if it is possible to trace the actual SQL query sent to the ODBC driver.
It doen't have to do it off the shelf - lust if the functionality is possible.
Thanks
Chris C
|
|
|
|
 |
|
 |
The SQL query is send to the driver in many different ODBC functions (e.g. SQLExecuteDirect, SQLPrepare). The ODBCTracer traces all parameters on stack. Therefore, it also traces the SQL queries. Please, take a closer look at those functions.
Arinir
-- modified at 3:59 Thursday 12th January, 2006
|
|
|
|
 |
|
 |
Thanks for your speedy reply - it looks like your stuff will do exactly what I need with a few tweaks.
However I am having problems selecting the custom trace dll. I've copied it into system32 and checked the security settings are identical to the original MS odbctrac.dll. When I select the new file and click apply it reverts to the MS one.
Do I need to to a regsvr32 ?
The OS is Windows Server 2003 Enterprise Edition and the ODBC is for MS SQL Server 2000.
If I click other dlls then the system alerts that it is not a trace dll; there is no message for the your one.
I can't see any relevant events in the system, security or application logs.
The dll was compiled on an XP SP1 box with MS Development Environment 7.1.3088
using MS Visual C++.NET.
The compile succeeded with 3 warnings as below
------ Build started: Project: ODBCTracer, Configuration: Debug Win32 ------
Compiling...
StdAfx.cpp
Compiling...
SystemTraySDK.cpp
c:\ODBC Tracer\SystemTraySDK.cpp(476) : warning C4018: '>=' : signed/unsigned mismatch
ODBCTracerOptions.cpp
c:\ODBC Tracer\ODBCTracerOptions.cpp(161) : warning C4018: '<' : signed/unsigned mismatch
ODBCTracer.cpp
odbctracedump.cpp
Hyperlink.cpp
Generating Code...
Compiling resources...
Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
Creating library .\Debug/ODBCTracer.lib and object .\Debug/ODBCTracer.exp
Performing Post-Build Event...
1 file(s) copied.
Build log was saved at "file://c:\ODBC Tracer\Debug\BuildLog.htm"
ODBCTracer - 0 error(s), 3 warning(s)
---------------------- Done ----------------------
Build: 1 succeeded, 0 failed, 0 skipped
Many thanks again
Chris
|
|
|
|
 |
|
 |
Hi I've sorted out some of the issues - e.g. compiling for release and others but am still having problems.
After copying the dll to system32 the system said it needed mscvp71.dll
So I copied:
msvcp71.dll 7.10.3077.0
msvcr71.dll 7.10.3052.4
mfc71.dll 7.10.3077.0
to system 32.
I can now select ODBCTracer.dll as my custom dll and it retains it, until I post a query to SQL Server via my ODBC connection using a simple asp page.
The result is that the custom dll reverts to the default MS one in the Tracing settings for the ODBS driver.
Can you give me any pointers over what issues there might be.
I have run "depends" for the dll and it reports that I need MSJAVA.dll which seems surprising.
Any help would be appreciated
Chris
|
|
|
|
 |
|
 |
Very nice work! In my case I needed a complete implementation of the supported entry points (effectively duplicating odbctrac.dll). I essentially re-did the tracing APIs using a Perl script against sql.h and sqlucode.h to regenerate the tracing functions. I presume you used a similar approach? I also added support for the VS calls FireVSDebugEvent and TraceVSControl, also adding performance counter wrappers around all calls.
I ran into one minor snag. The ESP register was not restored correctly in a couple instances. I was able to correct most of the problem by adding prototypes for ODBCTraceErrors(), ODBCTrace(), ODBCTraceArg() in ODBCTrace.h. Without this the compiler assumes an "int" return type rather then void which affects ESP restoration for these calls. As a very slight optimization these functions were declared with PASCAL calling conventions.
Still, there is one instance in which the ESP register is not restored correctly. I've looked and looked, but I can't see which function might be the culprit. I know the fix is as simple as adding another function prototype.
Do you (or anyone else) see what else might be missing?
|
|
|
|
 |
|
 |
Your problem with the ESP register is somehow particular. What I don't understand is why there is a need for a prototype for ODBCTraceErrors() or ODBCTraceArg() (for functions only used in odbctracedump.cpp)?
I am also confused why the problem occurs in some cases and in others not. If this has something to do with the calling convention or function prototype this problem would occur with any traced application. Especially, the calling convention of the tracel module must be the same as the one of the driver manager.
Arinir
|
|
|
|
 |
|
 |
Looks like I created the problem. DOH! I made a mistake in the way I altered a couple calls to use the fastcall calling convention. I was trying to get more accurate timing information around API calls and went a bit too far. MY prototypes were actually the problem.
Very sorry for the false alarm.
|
|
|
|
 |
|
 |
Hi, great-looking utility, but I haven't got it working yet. I'm on Windows XP with an ASP.Net application using ODBC to talk to Firebird (via the Firebird ODBC driver v1.2)
Do you have to register the DLL, or just copy it into System32? I've enabled tracing, and everything has slowed down, so I'm assuming that it's running. However, the log file is empty and there is no system tray icon, so I'm unable to configure it.
Any ideas? Perhaps Firebird ODBC driver doesn't support the trace calls?
|
|
|
|
 |
|
 |
Hi macronencer. You will have to copy the dll to your system32 directory. But before you enable tracing, you must change the tracer module by opening the ODBC administrator dialog. In the german version of WinXP there is a label called Benutzerdefinierte-Ablaufverfolgungs-DLL (must be something like "custom trace dll" in English). Please, select the ODBCTracer.dll and activate tracing afterwards.
Support for tracing is implemented by the ODBC driver manager, so every ODBC application can be traced. I don't think this has something to do with Firebird. Although, I have tested this tool on WinXP and Win2000 without detecting any errors, maybe your system has something "special". Please, give me any information possible about your system (windows version, service pack). Maybe I can figure out what the problem is...
Arinir
|
|
|
|
 |
|
 |
Nice Project.
I tested it under windows XP for intersystems cache ODBC driver.
Unfortunaly that don't work under NT4.
The message dialog is well displayed, but when I try to display
the option dialog I got an exception.
I am interested to modify the source code to include it in my
project TraceTool[^] , as a plugin
Thierry
|
|
|
|
 |