Databases Reference
In-Depth Information
F DatabaseID: A filter can be specified on this data column so that only trace events
raised for a specific database are captured
F DatabaseName: A filter can be specified on this data column so that only trace
events raised for a specific database are captured
F HostName: A filter can be specified on this data column so that only trace events
raised from a specific host or client machine are captured
F LoginName: A filter can be specified on this data column so that only trace events
raised by a specific login are captured
F ObjectID: A filter can be specified on this data column so that only trace events
raised for a specific object are captured
F ObjectName: A filter can be specified on this data column so that only trace events
raised for a specific object are captured
F SessionLoginName: A filter can be specified on this data column so that only trace
events raised by a specific login are captured
F SPID: A filter can be specified on this data column so that only trace events raised
from a specific session connection are captured
LoginName and SessionLoginName may look identical at first. However,
there is a small difference between them.
By using EXECUTE AS syntax in SQL Server, we can execute T-SQL
statements in the same session under different security context other
than the security context of the login who actually initiates the session/
connection. For example, James can login to SQL Server and run a query
under security context of Peter by using EXECUTE AS command. In this
case, data column SessionLoginName returns James, while LoginName
data column returns Peter. In other cases, where SQL Statements
are not executed under different security context, data columns
SessionLoginName and LoginName return the same value.
Detecting slow running and expensive
queries
Quite a few times, you may come across database related performance issues that are
caused by slow running and expensive queries. Slow running queries or expensive queries
are queries that have longer execution time and consume more hardware resources, such as
CPU, memory, and disk I/O. For instance, suppose that you are working for an organization
having an enterprise application environment with high degree of database transaction activity
against single production database that is used to support many applications, it is usual to face
database performance issues due to a poorly designed application or poorly written queries.
 
Search WWH ::




Custom Search