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

You want to implement the one-to-many relationship while designing tables. How would you do it?

0 Answers  


Explain subquery and state its properties?

0 Answers  


How to view existing indexes on an given table using sys.indexes?

0 Answers  


What is the purpose of floor function?

0 Answers  


Define indexes?

0 Answers  






How to make remote connection in database?

0 Answers  


Mention the differences between substr and charindex in sql server.

0 Answers  


What happens to a statement batch if there is a compilation error?

0 Answers  


How to test values returned by a subquery with the in operator?

0 Answers  


How do I find the query plan in sql server?

0 Answers  


What have included columns when we talk about sql server indexing?

0 Answers  


What are indexes in sql?

0 Answers  


Categories