|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
What happens to running trace when SQL is shutdown
I have created a trace that runs continuously keeping track of logins,
and failed logins. It is being written to a file and imported into a table each hour. Now normally when the trace is stopped and closed, that is the trigger to actually dump the data to the trace file which is then subsequently read into my work tables for processing. What happens to currently running traces when SQL is shutdown cleanly, with a proper stop request. What happens to currently running traces when SQL is NOT shutdown cleanly, usually someone rebooting the box without bringing SQL down first. Thanks! David Hay
Show quote
Hide quote
"David Hay" <david.***@gmail.com> wrote in message Hi Davidnews:f0a0d1b0-3337-494a-b34a-ef4cfe99ab74@r31g2000prh.googlegroups.com... > > I have created a trace that runs continuously keeping track of logins, > and failed logins. It is being written to a file and imported into a > table each hour. Now normally when the trace is stopped and closed, > that is the trigger to actually dump the data to the trace file which > is then subsequently read into my work tables for processing. > > What happens to currently running traces when SQL is shutdown cleanly, > with a proper stop request. > > What happens to currently running traces when SQL is NOT shutdown > cleanly, usually someone rebooting the box without bringing SQL down > first. > > > Thanks! > > David Hay > If the SQL server is stopped the trace the connection will be terminated and the trace will stop. John But will it dump the data in buffer to the trace file as directed, or
does all that data go away? Show quoteHide quote On Jun 15, 2:28 pm, "John Bell" <jbellnewspo***@hotmail.com> wrote: > "David Hay" <david.***@gmail.com> wrote in message > > news:f0a0d1b0-3337-494a-b34a-ef4cfe99ab74@r31g2000prh.googlegroups.com... > > > > > > > I have created a trace that runs continuously keeping track of logins, > > and failed logins. It is being written to a file and imported into a > > table each hour. Now normally when the trace is stopped and closed, > > that is the trigger to actually dump the data to the trace file which > > is then subsequently read into my work tables for processing. > > > What happens to currently running traces when SQL is shutdown cleanly, > > with a proper stop request. > > > What happens to currently running traces when SQL is NOT shutdown > > cleanly, usually someone rebooting the box without bringing SQL down > > first. > > > Thanks! > > > David Hay > > Hi David > > If the SQL server is stopped the trace the connection will be terminated and > the trace will stop. > > John > "David Hay" <david.***@gmail.com> wrote in message I guess you may have to ask the guy who wrote the code... but my guess is > news:e3624dea-57aa-4494-8c97-428da5632569@s38g2000prg.googlegroups.com... > But will it dump the data in buffer to the trace file as directed, or > does all that data go away? that it will depend on whether it gets the chance, just like any other application in those circumstances. If you look at Microsoft SQL Server 2008 Internals Book (which is a must read!) Chapter 2 ISBN: 978-0-7356-2624-9 it talks about the parts of trace and the Trace I/O providers, which buffer output if it can't be consumed so nothing is lost, and how a trace managment thread is responsible for flushing the file provider buffer, but it doesn't say whether it guarantees to flush the buffer on failure. John I agree.My guess is that along with SQL Server exception handling and
shot down code, there is functionality to flush traces and close trace files. But yank the cord and nothing can finish nicely, of course. -- Show quoteHide quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi "John Bell" <jbellnewspo***@hotmail.com> wrote in message news:u4cyDDr7JHA.1712@TK2MSFTNGP03.phx.gbl... > >> "David Hay" <david.***@gmail.com> wrote in message >> news:e3624dea-57aa-4494-8c97-428da5632569@s38g2000prg.googlegroups.com... >> But will it dump the data in buffer to the trace file as directed, >> or >> does all that data go away? > > I guess you may have to ask the guy who wrote the code... but my > guess is that it will depend on whether it gets the chance, just > like any other application in those circumstances. If you look at > Microsoft SQL Server 2008 Internals Book (which is a must read!) > Chapter 2 ISBN: 978-0-7356-2624-9 it talks about the parts of trace > and the Trace I/O providers, which buffer output if it can't be > consumed so nothing is lost, and how a trace managment thread is > responsible for flushing the file provider buffer, but it doesn't > say whether it guarantees to flush the buffer on failure. > > John
Other interesting topics
Is it collation or something else
Database documentor Earliest SQL Version for a given feature... How to BKP? Why sa shows in Logins SQL SERVER 2K8 and 2K5 and 2K Differences with respect to CHAR typ query/join issue Fetch 1.2 million records in 30 seconds Converting Access 2007 to sql server 2008 Change SQL 2008 product key |
|||||||||||||||||||||||