+ All Categories
Home > Technology > View SQL Server Error Log File Size and it's Location

View SQL Server Error Log File Size and it's Location

Date post: 20-Jan-2017
Category:
Upload: jasonclark03
View: 555 times
Download: 0 times
Share this document with a friend
14
View SQL Server Error Log File Size & It’s Location
Transcript
Page 1: View SQL Server Error Log File Size and it's Location

View SQL Server Error Log File Size & It’s Location

Page 2: View SQL Server Error Log File Size and it's Location

IndexSQL Server Error Log File Importance of Error Log FileFinding Error Log File Size in SQL ServerUsing Windows Explorer on ServerWith xp_enumerrorlog Stored ProcedureWays to Find the Location of Error Log File in SQL ServerUsing SQL Server Error LogFinding Error Log file Using SSCMUsing Windows Application ViewerConclusionMore Resources

Page 3: View SQL Server Error Log File Size and it's Location

SQL Server Error Log File

SQL Server Error Log File stores the messages generated by SQL Server during every transaction executed on the database. It contains information like log backup occurrence timing, log events, and chunks of stack dumps

Page 4: View SQL Server Error Log File Size and it's Location

Finding Error Log File Size in SQL Server In SQL Server there are two methods to find out the error log file size. These methods are given below:

1. Using Windows Explorer on the Server2. Using XP_ENUMERRORLOG Stored Procedure

Page 5: View SQL Server Error Log File Size and it's Location

Using Windows Explorer on Server

1. To determine the size of error log file first of all need to check the Server.

2. Go to the Windows Explorer on Server > Open the Error log file path > now Check the Log file size.

Page 6: View SQL Server Error Log File Size and it's Location

Using xp_enumerrorlog Stored ProcedureRun the given below query to find out the size of the error log file.

CREATE TABLE #ServerError Log ( Archive INT,dtDATETIME,FileSize INT )INSERT INTO #ServerErrorLogExec xp_enumerrorlogsSELECT Archive (MB), FROM #Server Error LogDROP TABLE #ServerErrorLog

Page 7: View SQL Server Error Log File Size and it's Location

Ways to Find the Location of Error Log Files in SQL Server

There are three ways to find out the error log file location in SQL Server Databases. Each of them are given below:

1. Using SQL Server Error Log2. Using SQL Server Configuration Manager3. Using Windows Application Event Viewer

Page 8: View SQL Server Error Log File Size and it's Location

Using SQL Server Error Log

Run the given below T-SQL statement to read the error log and to find its location.

USE master GOxp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc' GO

Page 9: View SQL Server Error Log File Size and it's Location

Finding Error Log File Using SSCMFollow the given simple steps to find out the location of the SQL Server Error Log file.

1. Go to the Start > Programs > Microsoft SQL Server > Configuration Tools > SQL Server Configuration Manager.

Page 10: View SQL Server Error Log File Size and it's Location

2. Select SQL Server Services & right click > now Select Properties > and Click on Properties Window.

3. Go to the Advanced tab > Expand Drop Down Menu > Select Startup Parameter.

Finally you can see the location of error log file size. That is mentioned next to the –e.

Page 11: View SQL Server Error Log File Size and it's Location

Using Windows Application Viewer

To view the Error Log file location using Windows Application Viewer go through the steps given below:

1. Go to the Start > All Programs > Administrative Tools > Server Manager

Continue..

Page 12: View SQL Server Error Log File Size and it's Location

2. Now go to the Diagnostics & click on Event Viewer then expand Windows Logs & select Application on the left pane of the window.

3.Now Filter the events with event ID.

Continue..

Page 13: View SQL Server Error Log File Size and it's Location

4. For the location of SQL Server error log file you need to double click on an event, now you can see the error log.

Continue..

Page 14: View SQL Server Error Log File Size and it's Location

Conclusion

Present tutorial will help you to know that how to find the error log file size and its location on the database. Here I have discussed about how to view the log file size and it’s location using different-different methods.

To know more please go through this:-http://sqltechtips.blogspot.in/2015/12/view-error-log-file-size-location.html


Recommended