Skip to main content
16 votes
Accepted

Duration unit in SQL Server trace file

As CPU is in milliseconds.From the beginning with SQL Server 2005, the server reports the duration of an event in microseconds (one millionth, or 10-6 of a second) and the amount of CPU time used by ...
Md Haidar Ali Khan's user avatar
8 votes
Accepted

Howto avoid textdata of trace gets truncated?

SSMS always truncates long strings unless typed as XML in which case you can set it to allow unlimited. The workaround I usually use (from Adam Machanic's workaround to a connect item (internet ...
Martin Smith's user avatar
  • 84.9k
7 votes
Accepted

Mysterious procedure calls without parameters - but no exceptions generated

SET PARSEONLY ON will do this. FMTONLY will generate an error. EG: USE [AdventureWorks] GO set parseonly on go exec [uspGetBillOfMaterials] go set parseonly off
David Browne - Microsoft's user avatar
7 votes
Accepted

Why am I unable to create a filter on a trace in SQL Server?

I get an error "Filters with the same event column ID must be grouped together". It seems the trace already has one or more filters on the ApplicationName column (column 10) followed by ...
Dan Guzman's user avatar
  • 28.3k
6 votes

Duration unit in SQL Server trace file

SQL Server 2005 and later, duration is in microseconds when saved to a file or a table, and (by default) milliseconds on the GUI. The SQL Server Profiler graphical user interface displays the ...
atokpas's user avatar
  • 8,642
5 votes

Finding the application behind ".net sqlclient data provider"

sp_who2 (MSDN) is always a good start, and you can query the sys.processes table or sys.dm_exec_connections (MSDN) DMV. Alternatively something like Adam Machanic's sp_WhoIsActive can help find ...
Ian_H's user avatar
  • 1,656
5 votes

Find queries executed by an user in sql server

You would need to start logging account activity of accounts that you don't trust to a table for a complete list. All of the other options (like querying dmvs) will give you temporal data and there's ...
Muab Nhoj's user avatar
  • 411
4 votes
Accepted

what are all possible filters to add to a server-side trace?

from this question: Find out what columns are in a trace file there is this script -- Gets all Events for a given trace id SELECT a.[EventID], b.[name] AS [Even Name], a.[ColumnID], c.[name] AS [...
Marcello Miorelli's user avatar
4 votes
Accepted

Using LIKE with apostrophes

The single quote character has no special significance to LIKE You need to double them up to escape them inside any string literal. So the two consecutive single quotes in the string you are trying ...
Martin Smith's user avatar
  • 84.9k
4 votes
Accepted

How can I track if a trace is executing?

I think the log file you are referencing in your question is created by the SQL Server default trace. You should be able to verify that by running: SELECT path AS [Default Trace File] ,max_size ...
Scott Hodgin - Retired's user avatar
4 votes
Accepted

how to find out how long the last DBCC checkdb took to complete?

If it is scheduled, then getting it from the SQL Agent job's runtime duration is an option. And if you're using Ola's solution (which I'd recommend) then his dbo.CommandLog table has StartTime and ...
LowlyDBA - John M's user avatar
3 votes

Trace flag and which need to be turned off and Why

To add more to what Raadee and Paul White (also confirm what eckes's comment already stated), TF 8017 is enabled by default in all SQL Server Express Edition versions since 2005. It's probably a way ...
Marcin S.'s user avatar
  • 723
3 votes

Application queries are not getting generated in trace file in oracle

There are a couple of ways of starting a trace in another session. You can either use a login trigger that sets tracing in the session when it first logs on: CREATE OR REPLACE TRIGGER TRACE_MY_JAVA ...
Philᵀᴹ's user avatar
  • 31.8k
3 votes
Accepted

Stopping multiple server side SQL Server traces immediately

Below are a couple of T-SQL examples that will stop and delete server-side SQL traces or Extended Event traces you can customize for your particular situation. SQL Trace: DECLARE @sql nvarchar(MAX) =...
Dan Guzman's user avatar
  • 28.3k
3 votes
Accepted

A methodology for tracing a query that sporadically runs for hours instead of seconds

Based on your thorough outline, I believe you may be experiencing a problem with your table statistics. Tables only automatically update their statistics when certain thresholds of row updates are ...
Duffy's user avatar
  • 1,054
3 votes
Accepted

How to trace a query on Firebird?

Firebird has two distinct options for monitoring: The monitoring tables, which provide a snapshot of activity on the server. For example MON$STATEMENTS provides the currently running statements. Note ...
Mark Rotteveel's user avatar
3 votes
Accepted

Find "Mystery processes" on a MS SQL Sever environment? (SSIS, databases, etc)

Assuming this IT contact has top-level access to every Instance/ Database on this server, should I just access him for a high-level mapping of every instance-database and potentially access? (I'm ...
HandyD's user avatar
  • 9,982
3 votes
Accepted

What is the impact of MAX_DISPATCH_LATENCY while configuring EXTENDED EVENT?

From my research it doesn't sound like anything terrible can really happen from adjusting that property, but it also generally doesn't need to really be adjusted because 30 seconds is typically a good ...
J.D.'s user avatar
  • 38k
3 votes
Accepted

Problem with enabling System Audit (Firebird's Trace and Audit Services)

There are a number of things wrong with your config file: enable true should be enabled true log_filename C:\DB_trace\audit_trace_database.log should be log_filename C:\\DB_trace\\...
Mark Rotteveel's user avatar
2 votes

Finding the application behind ".net sqlclient data provider"

There is a column in SQL Server Profiler Events "ClientProcessID" get that value against those queries and match them with Task Manager-> process Detail-> process with the same ID. This way we can get ...
user164767's user avatar
2 votes

Finding the application behind ".net sqlclient data provider"

We are using a logging monitor and asking our app developers to update a property on the application connection string using the approach here: https://msdn.microsoft.com/en-us/library/system.data....
JuddGledhill's user avatar
2 votes
Accepted

Trace ODBC commands: What is the registry path for TraceSQLMode and where is SQLOUT.TXT?

I managed to dig up the path from a comment on this page. On my machine, with Access 2016, the TraceSQLMode registry key is found here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\...
User1974's user avatar
  • 1,477
2 votes

Unable to remove trace from sys.traces

I found the following information at this link which might be of some help: SELECT * FROM sys.traces WHERE path LIKE N'%audittrace_%' Find the trace that is called audittrace.trc: --Stop the trace ...
Scott Hodgin - Retired's user avatar
2 votes

Check all enabled trace events

I got my answer from the below link: generate/analyze trace for error 1461 One may know by using the following statements in sqlplus: oradebug setmypid oradebug eventdump system This did the ...
Bibhuti Bhusan Padhi's user avatar
2 votes

How do I keep a SQL Server Profiler trace from jumping to the bottom entry?

Simple Answer : From the toolbar, select Window>Auto Scroll
Scotch's user avatar
  • 148
2 votes

how to find out how long the last DBCC checkdb took to complete?

If I understand correctly EXEC sp_readerrorlog 0, 1, 'dbcc' will give you the raw data you want. To neaten it up you could use something like DECLARE @tempLog as Table (logdate datetime, theSpid ...
AdamRidgway's user avatar
2 votes

SQL profiler not showing incoming parameters of store procedure

This is the default feature of profiler unless you enable below by going into options of profiler capturing: RPC:Completed SP:StmtCompleted SQL:BatchCompleted SP:stmtstarting SQL:stmtstarting ...
Learning_DBAdmin's user avatar
2 votes

XE ucs package events

Can anybody explain for what purposes exists ucs package {C0AB75C5-B1EA-445B-B7DF-F897686F94E7} "Extended events for Unified Communications Stack" It's to capture events that occur in the ...
Sean Gallardy's user avatar
1 vote
Accepted

ODBC SQL tracer file question marks

This is called a parameterized statement. At the basic level, such a query is executed in two stages: first a query with parameter markers (those question marks) is compiled on the server side, then ...
mustaccio's user avatar
  • 26.2k
1 vote
Accepted

server trace naming convention

PID is the internal (to the database) ID of database processes. The SPID column contains the OS process ID, that is what you are looking for.
Balazs Papp's user avatar
  • 40.8k

Only top scored, non community-wiki answers of a minimum length are eligible