April 11, 2011 at 9:21 pm
hi all,
Can any tell me how to SQL Server read error log using DOS scripting? I really need it please
Thanks,
Ravi
April 11, 2011 at 11:02 pm
Try sqlcmd.exe which is documented here: http://msdn.microsoft.com/en-us/library/ms170207.aspx. Then you can use the same SQL commands that you learned earlier this evening when you posted here: http://www.sqlservercentral.com/Forums/Topic1051241-392-1.aspx.
Also, the log files are simple text files that can be opened using any method. They are located here by default: C:\Program Files\Microsoft SQL Server\MSSQLxx\MSSQL\Log
ERRORLOG is the 'active' log. ERRORLOG.1 an archive of the log the last time SQL Services started up. ERRORLOG.2 was the time before that, etc. Note also that SQL Agent has its own log files (SQLAGENT.OUT).
Jim
Jim Murphy
http://www.sqlwatchmen.com
@SQLMurph
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply