Hi,
I have tried to using a SQL 6.5 STARTUP stored procedure that automatically uses xp_sqltrace to trace system activity and am noticing some strange behaviuor.

Firstly a call to xp_sqltrace does not return a TraceId and Version, so I cannot save the traceid and stop this trace by TraceId

As the xp_sqltrace trace, runs until stopped, I tried to implement some cyclic housekeeping of the files, by stopping it on a regular basis, and within the original startup stored procedure delete old files and then restart tracing to a new file by using xp_cmdshell and xp_reg functions to assist in this, but I am getting supurious SQL dll access violation messages, such as:-
Stored function 'xp_cmdshell' in the library 'xpsql60.dll' geneated access violation. SQL is terminating process xx

When I run the same code in an ISQL/W window it is all fine, so I am wondering if any one come across any strange startup stored procedure funnies

Thanks in advance



behaviour as , xp_cmdshell and xp_regread routines to automatically trace activity to files and provide cyclic resuse