I'm trying to find ANY examples of using the
Microsoft.SqlServer.Management.Trace namespace.
What I'm looking for is an example of being able to create and initialise a
new trace, haing this processed on the Server, and then initializes some
sort of traceReader against this.
e.g the equivalent of:
MyTraceConnection = new Something ("localhost");
MyTrace = new SqlTrace (CaptureTSQL || CaptureLogonEvent ||
CaptureLogoutEvent 0)
MyTrace.Open(MyTraceConnection)
OnTraceEvent (TraceInfo x) {
Console.Writeline ( x.ToString() ) ;
}
---
Any examples There seems to be nothing in MSDN, or SQL2005 info.
Thanks
Steven

Microsoft.SqlServer.Management.Trace.TraceServer - Examples ?
Hamaclapa
And, I don't have such a folder
Am I missing something
Crowny
Also, I found the SqlServerSamples.msi on http://www.microsoft.com/downloads/details.aspx FamilyId=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en about half way down the page.
MilleniumHandAndShrimp
The sample code, if installed in the default folderr, should be in the C:\Program Files\Microsoft SQL Server\90\Samples\Engine\Programmability\SMO\... folder.
petehk
I tried AddRemovePrograms, but didn't find it
However, I've had yet another look at the files from SqlServerSamples.msi, and finally found it...
After I removed the "SignAssembly", the project worked
Though it does seem odd that you can't create a trace against a server, without a .TDF file.
I thought this was what the Microsoft.SqlServer.Management.Smo.ServerTraceEventSet was for, to allow you to define a dynamic trace
japher
http://www.microsoft.com/downloads/details.aspx FamilyId=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en