sql_profiler is a simple and fast replacement for SQL Server Profiler.
It's a .NET-Core command-line port of ExpressProfiler, and runs everywhere .NET Core runs.
So it runs on
- Windows (x86-32, x86-64)
- Linux (x86-64, ARM-32)
- Mac/OS-X.
It's a fork of ExpressProfiler for MS-SQL-Server (actually a fork of a slightly modified version - working datetime-format for any language).
I used it to port ExpressProfiler to .NET Core (command-line).
sql_profiler can be used with both Express and non-Express editions of SQL Server 2005/2008/2008r2/2012/2014.
Installation or administrative rights are not required.
Trace permission are required for the SQL-user.
Invocation
./sql_profiler --server {computername\instance} --username WebAppWebServices --password TOP_SECRET --db "The DB you want to profile";
or from the project:
dotnet run sql_profiler --server {computername\instance} --username WebAppWebServices --password TOP_SECRET --db "The DB you want to profile";
If you omit the username, it will attempt to connect with integrated security.
Grant rights:
-- To Grant access to a Windows Login
USE Master;
GO
GRANT ALTER TRACE TO [DomainNAME\WindowsLogin]
GO
-- To Grant access to a SQL Login
USE master;
GO
GRANT ALTER TRACE TO manvendra
GO
Build for Windows x86-64:
dotnet restore -r win-x64
dotnet build -r win-x64
dotnet publish -f netcoreapp2.0 -c Release -r win-x64
Build for Windows x86-32:
dotnet restore -r win-x86
dotnet build -r win-x86
dotnet publish -f netcoreapp2.0 -c Release -r win-x86
Build for Linux x86-32:
not supported by framework
Build for Linux x86-64:
dotnet restore -r linux-x64
dotnet build -r linux-x64
dotnet publish -f netcoreapp2.0 -c Release -r linux-x64
Build for Linux ARM-32 (Raspberry PI/Chromebook/Android):
dotnet restore -r linux-arm
dotnet build -r linux-arm
dotnet publish -f netcoreapp2.0 -c Release -r linux-arm
Build for Linux ARM-64:
not supported by framework
Build for Mac OSX x86-32:
not supported by framework
Build for Mac OSX x86-64:
dotnet restore -r osx-x64
dotnet build -r osx-x64
dotnet publish -f netcoreapp2.0 -c Release -r osx-x64
Mac build requires MacOS >= Sierra (10.12+)
Build for Android (arch?):
dotnet restore -r android
dotnet build -r android
dotnet publish -f netcoreapp2.0 -c Release -r android