8

Trying to diagnose an problem, I've ran into that inconsistency. In SQL Server Profiler, the RPC Starting event uses the regional settings to write real numbers (example: in Portuguese(Brazil) 14.5 will be expressed as 14,5). Normally that's not a problem, except where the RPC call is a stored procedure with real number parameters. So what is expected to be expressed as:

exec usp_something 'blabla', 14.5

Is expressed as:

exec usp_something 'blabla', 14,5

Which gives a lot of headaches when you have a long parameter list. Didn't find any clue online how to change that behavior.

Someone knows a way to change that behavior?

Btw: I'm aware that the workaround is to use SP Starting event instead, which uses '.' for decimal separator.

4
  • 1
    Do you also see this with an Extended Event trace of rpc_starting events? I suspect this is a bug but, given Profiler/SQL Trace are deprecated, it might not get much attention.
    – Dan Guzman
    May 11, 2018 at 10:14
  • @Dan :All logins' default language are English. SQL Server Profiler version: 10.0.1600.22 Apr 12, 2019 at 17:50
  • @Dan: OS language is portuguese (both client and server) Apr 12, 2019 at 17:51
  • 2
    Yeah. That might be the reason. I bet if you create a new OS (for testing) with English version you will not see the strange behavior. Apr 12, 2019 at 18:12

1 Answer 1

0

Starting SQL Server 2008, Microsoft has introduced Extended events. It can be used instead of SQL trace; maybe it does not have this bug. Here is the simplest code to create one:

CREATE EVENT SESSION [NewSession] ON SERVER 
ADD EVENT sqlserver.rpc_completed

It is more readable and easy to understand. Paul Randal has a great article. It describes how to convert your SQL trace to a new session (Extended Event)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.