Wednesday, March 21, 2012

How to configure the logs

How do you configure the logs in SQL Server? Currently, all I see is my
backup processes. I'm trying to investigate a deadlock and I need much
more detail in the logging. I know I've done it before, but I can't
seem to find it now.Rick
Check out DBCC TRACEON in the BOL
"Rick Harrison" <rick@.knowware.com> wrote in message
news:40867FEE.3050505@.knowware.com...
> How do you configure the logs in SQL Server? Currently, all I see is my
> backup processes. I'm trying to investigate a deadlock and I need much
> more detail in the logging. I know I've done it before, but I can't
> seem to find it now.
>|||Hi,
To add on to previous post,
you can also you SQL profiler-- In the event class use the event Deadlock.
Otherwise like Uri pointed out use
DBCC TRACEON(1204)
This will send the deadlock information to SQL server error log.
Thanks
Hari
MCDBA
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:e1CYZq6JEHA.2576@.TK2MSFTNGP12.phx.gbl...
> Rick
> Check out DBCC TRACEON in the BOL
> "Rick Harrison" <rick@.knowware.com> wrote in message
> news:40867FEE.3050505@.knowware.com...
>|||Thank you both very much. That is helpful. Isn't there also another
user interface for turning on trace flags? I was sure I had seen
something in Enterprise Manager that allowed one to select and deselect
specific types of logs.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||Hi,
Yes, You can do that in Enterprise manager as well.
How to do that:-
1. IN Enterprise Manager
2. Right above the server and select properties
3. Select the General Tab options
4. Click the "startup parameters"
5. Type the trace flag (eg: -T3608)
6. Click Add and press OK.
Thanks
Hari
MCDBA
"Rick Harrison" <rick@.knowware.com> wrote in message
news:eDHQhi7JEHA.2376@.tk2msftngp13.phx.gbl...
> Thank you both very much. That is helpful. Isn't there also another
> user interface for turning on trace flags? I was sure I had seen
> something in Enterprise Manager that allowed one to select and deselect
> specific types of logs.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!|||Hari,
Yeah, that was probably what I was thinking of. I guess it's
easier to just enter the commands. Too bad they didn't implement a
checkbox or listbox interface for this.
Rick.|||Now I see the value of this method!
We just had another deadlock occur today. I went to check the logs
and there was nothing there even though I had "set this flag" a couple
of days before with "DBCC TRACEON (1204)". Obviously, this only sets
the flag for that one session (duuhhh). I thought I was setting a
permanent, global flag.
If I turn on the deadlock tracing as one of the startup parameters
(-T1204), the flag will be on for all sessions, which is what I need.
In other words, setting the flag in Enterprise Manager is the way to
do it if you want the flag to be on all the time for all sessions. Of
course I'll have to restart SQL server for this to take effect. There
does not appear to be any way to set the flag globally in SQL server
without restarting it.
Rick.

No comments:

Post a Comment