r/SQLServer • u/PathTooLong • Apr 09 '26
Question SQL Server Profiler and Datetime parameters
It really bugs me when running the SQL Server Profiler with datetime type parameters. The captured SQL always has fraction milliseconds. ChatGTP says this is an issue because the datetime is sent as binary but the profiler has problems processing it. This is really a problem when you are troubleshooting SQL statements and the profiler shows your date range with fractional milliseconds. You have to know the profiler has issues and adjust the parameters when testing is SSMS. I am using the latest SSMS/Profiler.
Edit: as many people posted below, SQL Server Profile is deprecated - https://learn.microsoft.com/en-us/sql/tools/sql-server-profiler/sql-server-profiler?view=sql-server-ver17
•
u/AutoModerator Apr 09 '26
After your question has been solved /u/PathTooLong, please reply to the helpful user's comment with the phrase "Solution verified".
This will not only award a point to the contributor for their assistance but also update the post's flair to "Solved".
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
11
u/Leiothrix Apr 09 '26
The definition of datetime is Defines a date that is combined with a time of day with fractional seconds that is based on a 24-hour clock.
I'm not sure what your problem actually is here.
2
u/IndependentTrouble62 Apr 09 '26
Profiler is deprecated for a reason. Its has flas like this and its very expensive to run the trace. You can use extended events to get around issues like this.
1
u/CPDRAGMEISH Apr 09 '26 edited Apr 09 '26
IT'S OK
Filter events with like instead of equal.
1
u/CPDRAGMEISH Apr 14 '26
IT'S OK
It Helpsd ?