-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native dependencies #37
Comments
Bonus question: https://www.nuget.org/packages/Microsoft.SqlServer.XEvent.XELite#readme-body-tab ever had a look at that? |
I tried a quick & dirty net8.0 port of My csproj for reference:
|
Hey Christoph! Thank you for your amazing work! SMO 140 was used because it was the only version that was working at the time I released the tool. Later versions did not work. I never revisited this choice later, as everything was working smoothly and I didn't feel the need to upgrade. I have never tried to use the streaming API with .NET core, sorry. XELite seems very promising! Thanks for the pointer! That could be another way around the problem.
These are for loading the configuration from json files. I could try to replicate the same behavior with newer packages from nuget, like Newtonsoft. Regarding QueryableXEventData , it's a brave new world. I should take the time to make it work in .NET core, I have no idea what is the equivalent, but I assume it is very much doable. If you want we can do this together. |
Maybe the best approach is a super-simple command line app that includes SMO and MDS only, and there try to connect - before starting a bigger transformation process. Thing is the API shapes of SMO definitely have changed extensively, and to be honest the documentation is super-thin... eg https://stackoverflow.com/questions/60227557/infinite-iteration-with-sql-xevents-queryablexeventdata doesn't apply any more as QueryableXEventData isn't there any more. Do you have contacts that could point you in the direction of the "current" patterns of the current version of SMO? (side question: your samples from Friday are located where?) |
I gave the XELite library a try: https://github.com/christophwille/poc-oh/blob/main/src/SqlXEventStreaming/Program.cs - that is really simple. |
Wow, ok, looks like you already did all the heavy lifting! That's phenomenal! |
The dependencies of XELite are very thin, yes, I only added Microsoft.Data.SqlClient "for good measure" to be sure to use latest. |
I went hunting a bit more, and found this: https://github.com/microsoft/sqltoolsservice/blob/main/src/Microsoft.SqlTools.ServiceLayer/Profiler/ProfilerService.cs - it is using XELite. |
You might remember the Linux question I asked during your talk in Vienna. I wanted to follow up here as I started looking at the code.
Question no1 is of course my VS complaining about netfw version used because I only have the newer target packs (it not being net48).
Question no2 is about SMO and 140 - is this for downlevel support, do newer versions no longer contain the necessary .dlls, do newer version not play nicely with older version of SQL Server? (by a strange coincidence that preview version has something to do with the very recent SqlClient 6.0.1 release)
https://www.nuget.org/packages/Microsoft.SqlServer.SqlManagementObjects/172.61.0-preview#versions-body-tab
(I checked with ILSpy, eg Microsoft.SqlServer.Management.XEvent.dll is an AnyCPU assembly, location: C:\Users\username\.nuget\packages\microsoft.sqlserver.sqlmanagementobjects\172.61.0-preview\lib\net8.0)
It is just me trying to understand how hard it could be to get this off the ground for Linux. Because, we are using Smo (nuget) on Linux today for submitting GO-separated scripts to SQL Server.
The text was updated successfully, but these errors were encountered: