4

Is there a SQL profiler MSSSQL that can be installed and run on Mac? It doesn't matter if it is a paid version as long as it can run on my Mac OS. Thanks.

  • 1
    Do you just need a sql client? Have you tried sqlops? docs.microsoft.com/en-us/sql/sql-operations-studio/download – Sir Swears-a-lot Nov 20 '17 at 8:36
  • 1
    What version of sql are you trying to trace? Why do you specifically need profiler? What are you trying to achieve? – Sir Swears-a-lot Nov 20 '17 at 8:38
  • My version is MSSQL Server 2016 13.0.2164. I am trying to trace the database error process on my stored procedure. – Sandy Pabilonia Nov 20 '17 at 10:15
  • My initial reaction is that profiler is the wrong tool for this job. Profiler is useful to identify unexpected traffic, connections and load on a server. It helps you see what is occurring when you aren't sure whats happening in what order at the time. You should be able to debug a Stored procedure using normal client tools. What problem do you have and what errors are you getting? Start with the basics, does the login executing the SP have sufficient privileges? and does it have the requisites privileges to carry out each of the tasks within the SP? – Sir Swears-a-lot Nov 20 '17 at 22:24
  • Thanks Peter, I know how to debug a stored procedure what I am aiming with the profiler is to be able to trace what SP is causing a certain problem when the basics is not enough to identify the problem. Anyway, I have already followed Brent's suggestion of using VM as I would using microsoft SSMS anyway. Brent's is correct we have website's like to share knowledge to people who are seeking for it and leveling our answer with their knowledge is the way to go. ;) Cheers! – Sandy Pabilonia Nov 21 '17 at 0:25
6

No, but here's a few options:

Run a server-side trace. You don't get the Profiler GUI, but the good news is that this kind of tracing is faster. (Heck, I recommend this to folks even when they have Windows on the desktop.) SQL Server Central has a good Stairway to Server-side Tracing. Server-side traces can output to file or to table - I'd caution against writing the trace data into a table on the same server that you're monitoring because that'll have a performance impact.

Run Profiler in a VM. After all, if you're managing SQL Server, you probably need SQL Server Management Studio anyway, and that's still Windows-only. (That's how I manage SQL Server personally - I'm a Microsoft Certified Master of SQL Server, and I've been using Macs since the mid-2000s.)

Run sp_BlitzCache. The open source sp_BlitzCache analyzes the most resource-intensive queries in your plan cache - without starting a heavy-overhead trace or XE session. SQL Server is already gathering this data for you on every supported version/edition. Yes, right now, even as you're reading advice on a web site. You can run it from anything app runs T-SQL, like Microsoft's new cross-platform SQL Operations Studio. (Disclaimer: I'm one of the sp_BlitzCache authors.)

Use Extended Events instead. (This isn't really a solution, but I know someone's going to suggest it, so might as well get it out of the way. The Extended Events people are like vegans, crossfitters, and atheists: they can't wait to tell you about their religion.) Extended Events is the replacement for Profiler, but the thing is, if you're just getting started, you're going to want to use SSMS's excellent wizard for setting up a new XE session - meaning, you still need SSMS. There's also a "Profiler" extension for Azure Data Studio, but...that's actually Extended Events.

Get a third party monitoring tool. If you need to know what's happening on your SQL Server on a regular basis, this is usually more lightweight than running Profiler. Plus, they have way more smarts built in to tell you what's been happening.

| improve this answer | |
  • An Extended Events trace is a viable solution since it can be created with DDL on macOS using SOS and viewed by using 'sys.fn_xe_file_target_read_file' from a query window. I think a GUI XE trace create/view would be a nice feature to suggest for SOS. – Dan Guzman Nov 20 '17 at 11:53
  • Wow, your answer is amazing, Brent. Can I call you amazing Brent? It is full of needed information with an extra wittiness (made me laugh). Thanks a lot. – Sandy Pabilonia Nov 20 '17 at 12:00
  • I think I will go with the VM. What VM can you suggest me using Brent? – Sandy Pabilonia Nov 20 '17 at 12:09
  • @SandyPabilonia hahaha, thanks. You can use VMware Fusion or Parallels or VirtualBox. – Brent Ozar Nov 20 '17 at 12:34
  • @DanGuzman as I wrote in the answer, XE isn't a viable solution when someone's asking a question like this. You gotta know who you're working with on the other side - if they're asking this question, they're not a good fit for crafting XE sessions by hand, and figuring out how to read them by hand. They're not quite at your experience level. ;-) – Brent Ozar Nov 20 '17 at 12:36
0

Microsoft Azure Data Studio runs on mac, and has a Sql Profiler plugin available for free, installable from within the app

https://docs.microsoft.com/en-gb/sql/azure-data-studio/

| improve this answer | |

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.