Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

trace Expand / Collapse
Author
Message
Posted Saturday, July 03, 2010 3:45 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 12:28 AM
Points: 207, Visits: 1,014
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
Post #947173
Posted Saturday, July 03, 2010 5:00 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:47 AM
Points: 41,525, Visits: 34,442
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 2008, MVP
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

Post #947181
Posted Saturday, July 03, 2010 5:38 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 12:28 AM
Points: 207, Visits: 1,014
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
Post #947185
Posted Saturday, July 03, 2010 6:07 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:47 AM
Points: 41,525, Visits: 34,442
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 2008, MVP
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

Post #947189
Posted Saturday, July 03, 2010 6:37 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 12:28 AM
Points: 207, Visits: 1,014
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?
Post #947193
Posted Saturday, July 03, 2010 7:25 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:47 AM
Points: 41,525, Visits: 34,442
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 2008, MVP
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

Post #947200
Posted Sunday, July 04, 2010 11:08 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:08 AM
Points: 5,952, Visits: 12,830
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"
Post #947328
Posted Sunday, November 13, 2011 12:10 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 11:13 PM
Points: 264, Visits: 822
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.
Post #1204798
Posted Sunday, November 13, 2011 9:12 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:08 AM
Points: 5,952, Visits: 12,830
Dude
This post is well over a year old


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

"Ya can't make an omelette without breaking just a few eggs"
Post #1204859
Posted Monday, November 14, 2011 4:03 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 11:13 PM
Points: 264, Visits: 822
Oops....
Post #1205013
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse