• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/86

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

86 Cards in this Set

  • Front
  • Back
What are the items that you can capture data for with System Monitor?
objects, counters and counter instances.
What types of data can system monitor capture?
numeric data for performance counters that are defined for hardware or software components.
What are the three counters that, by themselves, indicate a system problem?
System:Processor Queue Length, Network Interface:Output Queue Length, and Physical Disk:Avg. Disk Queue Length.
What is the purpose of the Blank Profiler Trace Template?
An empty trace; allows you to create an entire trace from scratch.
What is the purpose of the SP_Counts Profiler Trace Template?
Captures each stored procedure executed so that you can determine
how many of each procedure is being executed.
What is the purpose of the Standard Profiler Trace Template?
The most common template to start with; captures stored procedure and ad hoc SQL being executed along with performance statistics for each procedure and batch. Every login and logout is also captured.
What is the purpose of the TSQL Profiler Trace Template?
Captures a list of all the stored procedures and ad hoc SQL batches that are executed, but does not include any performance statistics.
What is the purpose of the TSQL_Duration Profiler Trace Template?
Captures the duration of every stored procedure and ad hoc SQL batch that is executed.
What is the purpose of the TSQL_Grouped Profiler Trace Template?
Captures every login and logout along with the stored procedures and ad hoc SQL batches that are executed. Includes information to identify the application and user executing the request, but does not include any performance data.
What is the purpose of the TSQL_Locks Profiler Trace Template?
Captures blocking and deadlock information such as blocked processes, deadlock chains, deadlock graphs, lock escalation, and lock timeouts. This template also captures every stored procedure, each command within a stored procedure, and every ad hoc SQL request.
What is the purpose of the TSQL_Replay Profiler Trace Template?
Captures the stored procedures and ad hoc SQL batches executed against the instance in a format that allows you to replay the trace
against a test system. This template is commonly used to perform load and regression tests.
What is the purpose of the TSQL_SPs Profiler Trace Template?
Captures performance data for all ad hoc SQL batches, stored procedures, and each statement inside a stored procedure. Every login and logout is also captured.
What is the purpose of the Tuning Profiler Trace Template?
Captures basic performance information for ad hoc SQL batches, stored procedures, and each statement inside a stored procedure.
What is the cause of enabling file rollover for a trace file?
After the file reaches the upper size limit specified, the file closes and a new file is opened.
Why should you never log trace events to the same instance for which you are capturing events?
You can possibly overwhelm the server; the best solution is to log trace events to a file and then later import the file into the server for analysis.
What is the purpose of the Broker SQL Trace Event Group?
13 events for Service Broker messages, queues, and conversations
What is the purpose of the CLR SQL Trace Event Group?
1 event for the loading of a Common Language Runtime (CLR) assembly
What is the purpose of the Cursors SQL Trace Event Group?
7 events for the creation, access, and disposal of cursors
What is the purpose of the Database SQL Trace Event Group?
6 events for data/log fi le grow/shrink as well as Database Mirroring state changes
What is the purpose of the Database SQL Trace Event Group?
2 events to notify when a deprecated feature is used within the instance
What is the purpose of the Errors and Warnings SQL Trace Event Group?
16 events for errors, warnings, and information messages being logged. Events to detect suspect pages, blocked processes, and missing column statistics.
What is the purpose of the Full Text SQL Trace Event Group?
3 events to track the progress of a full text index crawl
What is the purpose of the Locks SQL Trace Event Group?
9 events for lock acquisition, escalation, release, and deadlocks
What is the purpose of the OLEDB SQL Trace Event Group?
5 events for distributed queries and remote stored procedure calls
What is the purpose of the Objects SQL Trace Event Group?
3 events that track when an object is created, altered, or dropped
What is the purpose of the Performance SQL Trace Event Group?
14 events that allow you to capture show plans, use of plan guides, and parallelism. This event group also allows you to capture full text queries
What is the purpose of the Progress Report SQL Trace Event Group?
1 event for online index creation progress
What is the purpose of the Query Notifications SQL Trace Event Group?
4 events to track the parameters, subscriptions, and templates for query notifications
What is the purpose of the Scans SQL Trace Event Group?
2 events to track when a table or index is scanned
What is the purpose of the Security Audit SQL Trace Event Group?
44 events to track the use of permissions, impersonation, changes to security objects, management actions are taken on objects, start/stop of an instance, and backup/restore of a database.
What is the purpose of the Server SQL Trace Event Group?
3 events for mounting a tape, change to the server memory, and closing a trace file
What is the purpose of the Sessions SQL Trace Event Group?
3 events for existing connections when the trace starts as well as tracking the execution of logon triggers and resource governor classifier functions
What is the purpose of the Stored Procedures SQL Trace Event Group?
12 events for the execution of a stored procedure, cache usage,
recompilation, and statements within a stored procedure
What is the purpose of the Transactions SQL Trace Event Group?
13 events for the begin, save, commit, and rollback of transactions
What is the purpose of the TSQL SQL Trace Event Group?
9 events for the execution of ad hoc T-SQL or XQuery calls. Events for an entire SQL batch as well as each statement within a batch
What is the purpose of the User Configurable SQL Trace Event Group?
10 events that you can confi gure with SQL Trace
What event groups are commonly captured to baseline and troubleshoot query performance?
Stored Procedures, Performance, and TSQL event groups.
What event group is used to define auditing quickly across a variety of security events?
The Security Audit event group.
What event group is commonly used to troubleshoot concurrency issues?
The Locks event group.
What events return a significant amount of data and should be used with caution on a very busy instance?
What is the purpose of the sp_trace_create trace module?
A stored procedure that creates a new trace object. Equivalent to the definition on the General tab of the New Trace dialog in Profiler.
What is the purpose of the sp_trace_generateevent trace module?
A stored procedure that allows you to defi ne your own trace event.
What is the purpose of the sp_trace_setevent trace module?
A stored procedure that adds a data column for an event to be captured by a trace. You need to call sp_trace_setevent once for each data column being captured for an event. Equivalent to the event and data column selection grid in the Events Selection tab of the New Trace dialog in Profiler.
What is the purpose of the sp_trace_setfilter trace module?
A stored procedure that adds a fi lter to a trace. Equivalent to the Edit Filter dialog box in Profi ler.
What is the purpose of the sp_trace_setstatus trace module?
A stored procedure that starts, stops, and closes a trace. A status of 0 stops a trace. A status of 1 starts a trace. A status of 2 closes a trace and removes the trace defi nition from the instance.
What is the purpose of the sp_trace_geteventinfo trace module?
A function that returns the events and data columns being captured by a trace.
What is the purpose of the sp_trace_getfilterinfo trace module?
A function that returns the filters applied to a specified trace.
What is the purpose of the sp_trace_getinfo trace module?
A function that returns status and property information about all traces defined in the instance.
What is the purpose of the sp_trace_gettable trace module?
A function that reads one or more trace files and returns the contents as a result set. Commonly used to import trace files into a table.
What is required to correlate a counter log trace with a trace file?
You need to have captured the StartTime data column in the trace.
Which events are commonly used to establish a performance baseline?
The RPC:Completed and SQL:BatchCompleted events.
What are the four places that error and information messages related to your server running SQL Server can be found?
Windows Event Log
SQL Server error log
SQL Server Agent log (sqlagent.out)
Database mail log
The current SQL Server error log is called errorlog (no extension) and located where?
MSSQL10.<instance>\MSSQL\LOG
What stored procedure can you run to extract the contents of the current error log?
sys.xp_readerrorlog
When the transaction log fills up and any write action attempted rolls back, what is the error logged to the SQL Server error log and Windows Application Event log?
9002
If a transaction log fills up, what 5 actions can you perform?
A transaction log backup might not free up enough space within the log to be reused if any of the following occurs: ?
If a db runs out of disk space, what errors are logged? What action can you take?
1101 and 1105. You could add a new file to the appropriate filegroup on a disk volume that has space.
Before adding files to a filegroup to resolve errors 1101 and 1105, what should you do?
Check to see if the data files have auto-grow disabled. If the disk still has space, you could increase the size of the data files and resolve the issue.
If tempdb runds out of space, what error codes are generated?
3958, 3959, 3966 and 3967
What does a service with a startup mode of Disabled appear as in the Start Mode column in the SQL Server Configuration Manager main window?
Other
The start mode for all SQL Server services in a clustered installation should be set to what?
Manual - they are controlled by the cluster service.
What permissions do SQL Server service accounts need?
Read and Write access to the folder(s) where the data/log files for system databases are stored
What sequence of events appear in the Windows Application Event viewer log indicate that SQL Server service account does not have sufficient permissions to access the data or log file(s) for either the master or tempdb databases?
Errors in what three databases can prevent an instance from starting?
Errors in the master, tempdb, and mssqlsystemresource databases can prevent an instance from starting. Errors in all other databases just make the problem database inaccessible until you can fix the problem.
When changing the startup parameters for the SQL Server service, what happens if a semicolon, which separates parameters, is followed by a space.
It interprets everything after the space as part of the previous parameter. Do not introduce spaces following semicolons.
What is the first indication you normally have for memory or processor issues?
A stack dump is generated.
What are 3 of SQL Server's 7 locking modes?
Shared
Exclusive
Update
What are the three lock types?
Row
Page
Table
What type of lock is acquired for reads?
A shared lock; you can have multiple shared locks on the same resource.
What type of lock is acquired for a resource being modified?
An exclusive lock; it is held until the modification is complete.
What is an update lock?
A hybrid of the shared and exclusive locks. An update lock starts out by acquiring a shared locks on resources until it finds the piece of data that needs to be modified, the shared lock is then changed to an exclusive lock while the data is changed.
What determines what type of lock to acquire?
The Lock Manager; uses an aggressive resource threshold, commonly called 2% rule, designed to minimize the number of locks needed--as each lock consumes memory. If determined that more than 2% of the rows on a page will need to be accessed, a page lock will be acquired. Likewise, if more than 2% of the pages in a table will be needed, a table lock is acquired.
What is lock escalation?
Because distribution statistics are not always accurate or don't exist, Lock manager uses lock escalation to allow a lock to be promoted to another lock type. A row lock can be escalated to a table lock and a page lock can be escalated to a table lock. Row locks are NEVER escalated to page locks.
What are the five transaction isolation levels?
READ UNCOMMITTED
READ COMMITTED
REPEATABLE READ
READ SERIALIZED
SNAPSHOT
What is the READ UNCOMMITTED transaction isolation level?
Data can be read that has not been committed. Although an exclusive lock still blocks another exclusive lock, any read
operations ignore an exclusive lock.
What is the READ COMMITTED transaction isolation level?
This is the default isolation level for SQL Server. An exclusive lock blocks both shared as well as exclusive locks. A shared lock blocks an exclusive lock. Shared locks are released as soon as the data has been read.
What is the REPEATABLE READ transaction isolation level?
Exclusive locks block both shared and exclusive locks. Shared locks block exclusive locks. Shared locks are held for the duration of the transaction.
What is the READ SERIALIZED transaction isolation level?
All the restrictions as the REPEATABLE READ isolation level. In addition, you cannot insert a new row within the keyset range
currently locked by the transaction. Locks are held for the duration of the transaction.
What is the SNAPSHOT transaction isolation level?
Uses the row versioning feature to keep shared and exclusive locks from blocking each other while maintaining data consistency. A read operation retrieves data from the version of the row prior to the start of a data modification operation.
How can you determine whether a process is blocked?
Use the sys.dm_exec_requests view. A process that is blocked will show a nonzero number in the blocking_session_id column. sp_who2 system stored procedure displays the SPID that is blocking a given process.
If you determine that a process is causing contention within your database, what command do you execute?
KILL <spid> where SPID is the system process ID of the blocking session.
What happens when a process is killed?
What sequence described a how a deadlock occurs?
1. SPID1 acquires an exclusive lock on RowA.
2. SPID2 acquires an exclusive lock on RowC.
3. SPID1 attempts to acquire a shared lock on RowC and is blocked by the exclusive lock.
4. SPID2 attempts to acquire a shared lock on RowA and is also blocked by the exclusive lock.
Because both processes have to wait on the other process to release an exclusive lock before they can complete, the Lock Manager has an impossible situation. Lock Manager will kill one of the processes automatically (the one that has the least amount of accumulated time).
What error is returned when a deadlock is detected?
1205
How can you troubleshoot a deadlock?
Use SQL Server Profiler to capture a deadlock trace, which allows you to inspect the cause of the gridlock graphically.