![]() ![]() It receives a profile event - in this case the 'select count(*) from sysobjects' The table 'TraceTest' for us, then just generating an insert statement each time I know that's not the easiest thing to read. Here are the highlights of what IĬREATE TABLE ( int identity PRIMARY KEY, int NULL, ntext NULL, nvarchar(128) NULL, int NULL, nvarchar(128) NULL, nvarchar(128) NULL, int NULL, bigint NULL, datetime NULL, bigint NULL, bigint NULL, int NULL)Įxec sp_executesql N'INSERT INTO (,) VALUES ( int', 12, N'select count(*) from sysobjects I then connected using QueryĪnalyzer and ran a simple select count query. Of Profiler making no changes to the filter. To do this, I just removed the 'SQL Profiler'Īpplication name filter and ran a standard trace, then started another instance It without Profiler? Being curious, I decided to profile Profiler to see what ![]() Wouldn't you think if Profiler could do it there would be a way for you to do SELECT * INTO temp_trc FROM ::fn_trace_gettable(c:\my_c", Log to a file and import afterwards into a table using the system function If you want to run the profile as a script your only choice is to Select that weird or what? It turns out you can only log the results to a tableįrom Profiler. Client side File and Table cannot be scriptedĮxec sp_trace_setevent 10, 1, sp_trace_setevent 10, 6, sp_trace_setevent 10, 9, sp_trace_setevent 10, 10, sp_trace_setevent 10, 11, sp_trace_setevent 10, 12, sp_trace_setevent 10, 13, sp_trace_setevent 10, 14, sp_trace_setevent 10, 16, sp_trace_setevent 10, 17, sp_trace_setevent 10, 18, sp_trace_setevent 12, 1, sp_trace_setevent 12, 6, sp_trace_setevent 12, 9, sp_trace_setevent 12, 10, sp_trace_setevent 12, 11, sp_trace_setevent 12, 12, sp_trace_setevent 12, 13, sp_trace_setevent 12, 14, sp_trace_setevent 12, 16, sp_trace_setevent 12, 17, sp_trace_setevent 12, 18, sp_trace_setevent 14, 1, sp_trace_setevent 14, 6, sp_trace_setevent 14, 9, sp_trace_setevent 14, 10, sp_trace_setevent 14, 11, sp_trace_setevent 14, 12, sp_trace_setevent 14, 13, sp_trace_setevent 14, 14, sp_trace_setevent 14, 16, sp_trace_setevent 14, 17, sp_trace_setevent 14, 18, sp_trace_setevent 15, 1, sp_trace_setevent 15, 6, sp_trace_setevent 15, 9, sp_trace_setevent 15, 10, sp_trace_setevent 15, 11, sp_trace_setevent 15, 12, sp_trace_setevent 15, 13, sp_trace_setevent 15, 14, sp_trace_setevent 15, 16, sp_trace_setevent 15, 17, sp_trace_setevent 15, 18, sp_trace_setevent 17, 1, sp_trace_setevent 17, 6, sp_trace_setevent 17, 9, sp_trace_setevent 17, 10, sp_trace_setevent 17, 11, sp_trace_setevent 17, 12, sp_trace_setevent 17, 13, sp_trace_setevent 17, 14, sp_trace_setevent 17, 16, sp_trace_setevent 17, 17, sp_trace_setevent 17, 18, Set the FiltersĮxec sp_trace_setfilter 10, 0, 7, N'SQL Profiler' remote server to local drive, please use UNC path and make sure server hasĮxec = sp_trace_create output, 0, N'InsertFileNameHere', NULL will be appended to the filename automatically. filename prefixed by a path, e.g., c:\MyFolder\MyTrace. Please replace the text InsertFileNameHere, with an appropriate ![]() Notice the section I've highlighted in blue: When you use the File | Script Trace menu selection, this is what you get. The overhead of logging doesn't affect whatever process you're working on. To a separate server (or even a workstation running Personal edition) so that If you use this method, it's a good idea to log Profiler, here is where you enable the save to table option: Script to use later - it doesn't work! If you're not familiar with this part of When you set up a trace to log the results to a table and then save it as a Useful tool, but can be incredibly frustrating as well. If you've spent much time using SQL Profiler you know that it's an incredibly ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |