Pages

Thursday, April 19, 2018

Need to Move & Truncate Log Files in Exchange 2016/13/10/07

Introduction Transaction Log File In Exchange Server

In Exchange Server, different files are created, according to the different file extension, file stored different data. In the Earlier version of Exchange private (priv.edb) and Public (pub.edb) file format used to store Exchange database and .log file format used to store log files. A Log file basically used for store activity performed an Exchange database.

Any Changes in information to the database first written on the transaction log file and then stored in Server Database. Since Transaction Log File in Exchange Server helps Administrator to recovered data during disaster recovery. As various reasons occur such as "Dirty Shutdown", Corruption in Exchange Database that to the recovery of the database of user mailboxes and generated log files help in this scenarios.



Types of Log Files in Exchange Server

  • E00tmp.log – This Temporary Log File, created in Exchange Server automatically on file name E00.log. Whenever the size of increase from 1MB then another file is created named as“ E000000001.log” file. Then the pattern of File created is such that " Original file name + < Hexadecimal number ". Similarly, when a new file has created another file created with name E000000001.log and so on.
  • e00.chk – A .chk file format known as Checkpoint File used to keep track of the information in the log files and Exchange Database.
  • E00res00001.jrs and E00res00002.jrs – These .jrs file format known as “Reserved Log File” used by Exchange server when disk full situation and Exchange server need to save log information lead to this file. The .jrs file generated automatically in " Out of Disk Scenarios"
When Size of Database increases, log file increase and lead to resulted in .jrs file. In this situation, we need to move and Truncate Logs in Exchange Server so that the performance of the of Exchange server does not affect For that we need to Option called “Circular logging" if you are using Exchange 2013 and 2016 Version.

Why Circular Logging Needed to Move Exchange Log Files

Using Circular Logging, Exchange user keeps only a few latest log files and another file will be deleted automatically that help in avoiding in process of Completed Exchange backup and then the process of clearing log file

How Circular logging works in DAG Environment

Log files are necessary for Database availability group (DAG) environment for the delivery and reply. If “Circular Logging” is enabled, then the current log file will not be renewed and new replay and the delivery file will be created. This file will not be removed till they are necessary for replication. In this situation, Microsoft Exchange, IIS and Microsoft Replication service will deal with RPC to remove the desired log file

How to Enabled Circular Logging Option?

Before enabling the Circular logging option first, you need to understand these benefits. Using this feature, when the transaction moves to the database, then log file will be cleared and current file will be renewed.
Follow the below step to Move and Truncate Log file



  • Open Exchange Admin Centre.
  • Select the Database and Click on “Server” option and enable “Exchange, Background database maintenance, and Circular Logging Option”.

  • Method to Move Transaction Log File of Exchange Database

    Using Power-shell Command we can move the Database to another drive of the system to avoid a disk full situation resulted in the Performance and issue of Exchange Server. Use below command:

    Command: Move-Database path Database 
    Name: MDB2 Destination 
    Folder:

    Move-Databasepath“MDB2” –EdbFilepath “M:\DB\MDB1\databases\mdb1.edb” –LogFolderpath “D:\DB\MDB2\logs\” 

    2) Use Microsoft IIS Manager Using Internet Information Services Manage, we can also move the location of log files, For that, follow the simple steps:

    To Open IIS Manager – Go To Start >> Run, type inetmgr and press OK. If you get an IIS configuration screen. It is installed, otherwise, it isn't.
     Or 
    Go to Control Panel >> Add Remove Programs >> Click Add Remove Windows Components and look for IIS in the list of installed components and open from that screen. 

    After that,

     a) Select Default Web Site.
     b) Open the Logging option.
     c) Now change the log storage location (directory) d) Now all the newly created log file stored in the New location.

    Do Not Manually Delete Log File In Exchange Server

    Deleting log file of Exchange manually is not the best solution to truncate the log file as it doesn't work if the Database is mounted. Try to follow the above method and commands that can help you in this situation. Since while truncating the log file, all the log file data will crosscheck to know whether the changes applied to database or note written on Exchange Database or not.

    If you want to remove the log files from Dismounted Exchange Database then you need aware that while restoring the data from backup again, deleted log file detail data will not we restored again. It doesn’t mean that it will corrupt your Exchange database. So always try to first Full Exchange Backup after that truncate the file to free the Disk space as they do not need after backup.

    0 comments:

    Post a Comment

    Post a reply