You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Search for the **Schema Compare** extension and select it to view its details. Select **Install** to add the extension.
42
42
@@ -46,11 +46,11 @@ It can be tedious to manually manage and synchronize different database versions
46
46
47
47
1. To open the Schema Compare dialog, **right-click** a database in the Object Explorer and Select **Schema Compare**. The database you select is set as the Source database in the comparison.
Use [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)]to view captured event data in a trace. [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)]displays data based on defined trace properties. One way to analyze [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]data is to copy the data to another program, such as [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]or [!INCLUDE[ssDE](../../includes/ssde-md.md)]Tuning Advisor. [!INCLUDE[ssDE](../../includes/ssde-md.md)]Tuning Advisor can use a trace file that contains SQL batch and remote procedure call (RPC) events if the **Text** data column is included in the trace. To make sure that the correct events and columns are captured for use with [!INCLUDE[ssDE](../../includes/ssde-md.md)]Tuning Advisor, use the predefined Tuning template that is supplied with [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)].
19
+
Use SQL Server Profiler to view captured event data in a trace. SQL Server Profiler displays data based on defined trace properties. One way to analyze SQL Server data is to copy the data to another program, such as SQL Server or Database Engine Tuning Advisor. Database Engine Tuning Advisor can use a trace file that contains SQL batch and remote procedure call (RPC) events if the **Text** data column is included in the trace. To make sure that the correct events and columns are captured for use with Database Engine Tuning Advisor, use the predefined Tuning template that is supplied with SQL Server Profiler .
22
20
23
-
When you open a trace by using [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)], the trace file does not need to have the .trc file extension if the file was created by either [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)] or SQL Trace system stored procedures.
21
+
When you open a trace by using SQL Server Profiler , the trace file does not need to have the .trc file extension if the file was created by either SQL Server Profiler or SQL Trace system stored procedures.
24
22
25
23
> [!NOTE]
26
-
> [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)] can also read SQL Trace .log files and generic SQL script files. When opening a SQL Trace .log file that does not have a .log file extension, such as trace.txt, specify **SQLTrace_Log** as the file format.
24
+
> SQL Server Profiler can also read SQL Trace .log files and generic SQL script files. When opening a SQL Trace .log file that does not have a .log file extension, such as trace.txt, specify **SQLTrace_Log** as the file format.
27
25
28
-
You can configure the [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)] date and time display format to assist in trace analysis.
26
+
You can configure the SQL Server Profiler date and time display format to assist in trace analysis.
29
27
30
-
## Troubleshooting Data
31
-
Using [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)], you can troubleshoot data by grouping traces or trace files by the **Duration**, **CPU**, **Reads**, or **Writes** data columns. Examples of data you might troubleshoot are queries that perform poorly or that have exceptionally high numbers of logical read operations.
28
+
## Troubleshooting Data
29
+
30
+
Using SQL Server Profiler, you can troubleshoot data by grouping traces or trace files by the **Duration**, **CPU**, **Reads**, or **Writes** data columns. Examples of data you might troubleshoot are queries that perform poorly or that have exceptionally high numbers of logical read operations.
32
31
33
32
Additional information can be found by saving traces to tables and using [!INCLUDE[tsql](../../includes/tsql-md.md)] to query the event data. For example, to determine which **SQL:BatchCompleted** events had excessive wait time, execute the following:
34
33
35
-
```
34
+
```sql
36
35
SELECT TextData, Duration, CPU
37
36
FROM trace_table_name
38
37
WHERE EventClass =12-- SQL:BatchCompleted events
39
38
AND CPU < (Duration *1000)
40
39
```
41
40
42
41
> [!NOTE]
43
-
> The server reports the duration of an event in microseconds (10^-6 seconds) and the amount of CPU time used by the event in milliseconds (10^-3 seconds). The [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)]graphical user interface displays the **Duration** column in milliseconds by default, but when a trace is saved to either a file or a database table, the **Duration** column value is written in microseconds.
42
+
> The server reports the duration of an event in microseconds (10^-6 seconds) and the amount of CPU time used by the event in milliseconds (10^-3 seconds). The SQL Server Profiler graphical user interface displays the **Duration** column in milliseconds by default, but when a trace is saved to either a file or a database table, the **Duration** column value is written in microseconds. These measurements are for Transact-SQL (T-SQL) queries.
44
43
45
-
## Displaying Object Names When Viewing Traces
46
-
If you wish to display the name of an object rather than the object identifier (**Object ID**), you must capture the **Server Name** and **Database ID** data columns along with the **Object Name** data column.
44
+
## Displaying Object Names When Viewing Traces
45
+
46
+
If you wish to display the name of an object rather than the object identifier (**Object ID**), you must capture the **Server Name** and **Database ID** data columns along with the **Object Name** data column.
47
47
48
48
If you choose to group by the **Object ID** data column, make sure you group by the **Server Name** and **Database ID** data columns first, and then by the **Object ID** data column. Similarly, if you choose to group by the **Index ID** data column, make sure you group by the **Server Name**, **Database ID**, and **Object ID** data columns first, and then by the **Index ID** data columns. You must group in this order because object and index IDs are not unique among servers and databases (and among objects for index IDs).
49
49
50
-
## Finding Specific Events Within a Trace
51
-
To find and group events in a trace, follow these steps:
50
+
## Finding Specific Events Within a Trace
51
+
52
+
To find and group events in a trace, follow these steps:
52
53
53
-
1.Create your trace.
54
+
1. Create your trace.
54
55
55
56
- When defining the trace, capture the **Event Class**, **ClientProcessID**, and **Start Time** data columns in addition to any other data columns you want to capture. For more information, see [Create a Trace (SQL Server Profiler)](../../tools/sql-server-profiler/create-a-trace-sql-server-profiler.md).
56
57
@@ -62,7 +63,7 @@ AND CPU < (Duration * 1000)
62
63
63
64
- Open the trace file or table, and expand the node of the desired event class; for example, **Deadlock Chain**. For more information, see [Open a Trace File (SQL Server Profiler)](../../tools/sql-server-profiler/open-a-trace-file-sql-server-profiler.md) or [Open a Trace Table (SQL Server Profiler)](../../tools/sql-server-profiler/open-a-trace-table-sql-server-profiler.md).
64
65
65
-
- Search through the trace data until you find the events for which you are looking (use the **Find** command on the **Edit** menu of [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)] to help you find values in the trace). Note the values in the **ClientProcessID** and **Start Time** data columns of the events you trace.
66
+
- Search through the trace data until you find the events for which you are looking (use the **Find** command on the **Edit** menu of SQL Server Profiler to help you find values in the trace). Note the values in the **ClientProcessID** and **Start Time** data columns of the events you trace.
66
67
67
68
3. Display the events in context.
68
69
@@ -72,12 +73,11 @@ AND CPU < (Duration * 1000)
72
73
73
74
The same technique can be used to find any grouped events. Once you have found the events you seek, group them by **ClientProcessID**, **ApplicationName**, or another event class to view related activity in chronological order.
74
75
75
-
## See Also
76
-
[View a Saved Trace (Transact-SQL)](../../relational-databases/sql-trace/view-a-saved-trace-transact-sql.md)
0 commit comments