Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


trace


trace

Author
Message
Zeal-DBA
Zeal-DBA
SSC Veteran
SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)

Group: General Forum Members
Points: 225 Visits: 1122
hello experts, i am huge confuge about traces, i found that we can create trace through sp_crete_trace or we can ON trace through dbcc traceon(?), thrs a term server side tracing i heard, and some trace event i have seen in sys.traces, i am totally confuged wid traces, i wanna clear that whole concept n which trace how work pls help
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47359 Visits: 44392
Server-side traces (sp_create_trace) and traceflags (DBCC traceon) are completely different concepts.

Server-side traces are essentially profiler traces without the GUI, they log when events occur on the instance being traced, such as login failures, stored procedure executions, errors, etc. You can use the profiler GUI to generate the script to create the trace for you.

Traceflags can be enabled or disabled (there are lots and lots of different traceflags) and they change certain aspects of SQL's behaviour.

For server-side traces, try a google search. Lots of information turns up with a simple search.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Zeal-DBA
Zeal-DBA
SSC Veteran
SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)

Group: General Forum Members
Points: 225 Visits: 1122
ya i have seen so many trace flags list even i can ON any trace by dbcc but dont knw after that hw can i get benefit of that, will you please explain me some more abt trace flags and how they are completely differentfrom server side traces
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47359 Visits: 44392
As I said, server-side traces (just like Profiler) lets you see when various things happen in SQL (stored procedure begins, stored procedure ends, login succeeds, login fails, etc)

Traceflags change the behaviour of the SQL engine (eg if traceflag 1222 is enabled, information on deadlocks is written to the SQL error log. )

There are lots of documented traceflags, there are lots of undocumented traceflags, I don't know if there's a comprehensive list anywhere. Some are in books Online. Start there.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Zeal-DBA
Zeal-DBA
SSC Veteran
SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)

Group: General Forum Members
Points: 225 Visits: 1122
i have seen in the path 'Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG'

thr are multiple errorlog file how wud i knw in which file my trace flag is being saved?
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47359 Visits: 44392
The latest is always called ERRORLOG

And not all traceflags cause things to be written to the error log. 1222 was one specific example that I gave. There are traceflags that do many, many other things, from disabling lock escalation to changing how SQL reads from the disks. You should never enable a traceflag without knowing exactly what it will do.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8826 Visits: 16562
sachinsoni84 (7/3/2010)
i have seen in the path 'Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG'

thr are multiple errorlog file how wud i knw in which file my trace flag is being saved?


are you referring to the files for the default trace. There will be 5 files at any one time and hold most recent logged info

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
yup
yup
Old Hand
Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)

Group: General Forum Members
Points: 350 Visits: 1026
Zeal-DBA (7/3/2010)
ya i have seen so many trace flags list even i can ON any trace by dbcc but dont knw after that hw can i get benefit of that, will you please explain me some more abt trace flags and how they are completely differentfrom server side traces


You may like to check http://www.sqlservercentral.com/articles/trace+flags/70131/ for a list of trace flags.
Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8826 Visits: 16562
Dude
This post is well over a year old ;-)

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
yup
yup
Old Hand
Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)Old Hand (350 reputation)

Group: General Forum Members
Points: 350 Visits: 1026
Oops....
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search