How to change location of errorlog in SQL?

Answers were Sorted based on User's Feedback



How to change location of errorlog in SQL?..

Answer / anwar hayat

To change the location of your log backup files, you have
to update whatever process is generating them. If it is a
Maintenance Plan then you can adjust it inside the
Maintenance Plan properties. To change the location of the
SQL Agent log, expand the SQL Server Agent Node in SSMS,
right click the ErrorLogs folder and click Configure, and
change the path there. Or you can do it with TSQL:
Code Snippet
USE [msdb]
GO
EXEC msdb.dbo.sp_set_sqlagent_properties
@errorlog_file=N'D:\Srvapps\Microsoft SQL Server\MSSQL.1
\MSSQL\LOG\SQLAGENT.OUT'

Is This Answer Correct ?    8 Yes 6 No

How to change location of errorlog in SQL?..

Answer / sneha daultani

By default SQL Server ERRORLOG is stored in "C:Program FilesMicrosoft SQL ServerInstanceFolderMSSQLLog" folder. The ERRORLOG location is configured as a startup parameter for SQL Server Service.

To change the location of ERRORLOG you need to modify the startup parameter -e.

Restart SQL Server Service to apply changes. 

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is the difference between a "where" clause and a "having" clause?

0 Answers  


Differentiate between mongodb vs. Sql server?

0 Answers  


How to swap the data of two columns in a table. both the columns containing varchar values.

9 Answers  


Suppose you want to implement the following relationships while designing tables. How would you do it?a.) One-to-oneb.) One-to-manyc.) Many-to-many

0 Answers  


What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?

0 Answers  


Explain the purpose of indexes?

0 Answers  


Can we insert data into a view?

0 Answers  


What are the disadvantages of using the stored procedures?

0 Answers  


What is a collation?

0 Answers  


What is exclusive locks?

0 Answers  


Can we drop user if user mapped to any logins

1 Answers  


Define left outer join in sql server joins?

0 Answers  


Categories