where the Files(logs)Physically stored


  • hi

     Iam able to read the logs of Database Mail,Job History,Maintenance Plan,SQL Agent,SQL Server and Windows NT
    from Log file viewer(SQL Server 2005),

    Here I want know where this Files(logs)Physically stored.

    Please guide me.
    Sunday, January 04, 2009 10:39 AM


All replies

  • These are stored in tables in msdb.

    Take a look at the msdb tables.

    These links might give you the base idea.

    Sankar Reddy | |
    Sunday, January 04, 2009 10:51 AM
  • Hi,

    Your SQL Server related files are by default stored in %Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG (where MSSQL.1 is the instance you are interested in) and your NT event log files (*.evtx) in %SystemRoot%\System32\Winevt\Logs\.


    Elisabeth Rédei | | MCITP, MCT |
    Sunday, January 04, 2009 10:53 AM

    Thanks Elisabeth Redei,

    yes your correct,but there I find only SQL AGENT and SQL Server log files only,what about other log files
    like Database Mail,Job History,Maintenance Plan and Replication etc..

    Thanks Reddy,

    I will search for those tables.

    Sunday, January 04, 2009 11:36 AM
  • Hi,

    As Sankar said, some history is stored in msdb (sysjobhistory) so if you don't find what you are looking for in the LOG directory, you need to look in msdb history tables. For the Maintenance Plan, you can choose to store it somewhere else but it defaults to the LOG directory (if you right-click the plan and choose Modify, you can check the location by pressing the Reporting and Logging button on the toolbar).


    Elisabeth Rédei | | MCITP, MCT |
    Sunday, January 04, 2009 11:53 AM
  • Hi,

    As said by Sankar all these details will be saved in msdb database tables.
    Every database has one or more data & log files (this is the physical files of the database) and all these database objects (tables, procedures, triggers etc) will be stored in the data file of the database. Hence you can check these physical files. Use the below query to check the path of the database.

    EXEC sp_helpfile 'MSDB' 

    Vidhya Sagar. Mark as Answer if it helps!
    Monday, January 05, 2009 5:57 AM