John Yassa's Blog

Home » Exchange 2003

Category Archives: Exchange 2003

HOW TO RESTORE THE EXCHANGE DATABASE FROM A BACKUP FILE IN STATE OF INCONSISTENCY?

How to Restore the Exchange Database from A Backup File in state of inconsistency?

For restoring the database on Exchange Server, the user needs to have an up-to-date and usable backup in hand, because an incomplete or even no backup can create a troublesome situation during the database the process of restoration. Additionally, Microsoft Information Store needs to be in a healthy state to mount the database successfully.

With an unmounted Exchange Store, the users face several issues such as restricted access to the data and the mail flow. In order to smoothly restore your database on Exchange Server, it is important to perform certain tests to verify the database consistency.

Pre-assessment Phase: Verify the State of the Database on Exchange

Use the following steps to verify the state of the database:

  1. Launch a command prompt.
  2. Move to the Drive:\Program Files\Exchsrvr\Bin

(The default location of the of Exchange 2000 Server program files are located in this folder)

 

Move to Drive:\Program Files\Microsoft\Exchange Server\V15\Bin

(When using Exchange 2013/2016, then use the above-mentioned default path)

 

  1. Enter the below-mentioned command:

eseutil /mh “drive:\program files\exchsrvr\mdbdata\database_name.edb”

Note: The default location of database files is on this Drive:\Program Files\Exchsrvr\MDBDATA folder. The public database file can be found with the name: “Public.edb”, whereas the mailbox store database file can be found with the name: “Priv1.edb”.

  1. Read the Output, in order to verify the state of the database. If the database appears in the state of inconsistency, then the output will appear, as:

State: Dirty Shutdown

Restoration Phase: How to Restore the database from a backup file

Upon using the pre-assessment phase, if the database appears in a consistent state, then simply restore the backup using the file.

Steps to Restore Database in A Consistent State:

Implement the following steps to restore the database from the backup file.

  1. Transfer the E00.log file to an another path or simply rename it.

The default location of E00.log file can be found on this Drive:\Program Files\Exchsrvr\MDBDATA folder.

  1. Restore the storage group and the log files from the backup file.

Note: Do not remove the existing log files, until you have performed the restore operation. Upon completing the restore operation, the log files are restored, and replay inside the restored database. This is how, the user can bring the database into a consistent state without involving the E00.log file.

  1. Once the storage group is restored, you can successfully mount the databases in the storage group.

Steps to Restore Database in an Inconsistent State:

  1. Launch the command prompt.
  2. Reach to the location – Drive:\Program Files\Exchsrvr\Bin folder.
  3. Enter the following command in the command prompt:

eseutil /p “drive:\program files\exchsrvr\mdbdata\database_file_name.edb”

  1. To use the database in a productive environment, try to defragment and then rebuild the database. Use the below mentioned command to proceed:

eseutil /d /t:x “drive:\program files\exchsrvr\mdbdata\database_file_name.edb”

Note: ‘x’ is a temporary drive location in the above-mentioned command.

  1. To determine the state of the database, enter the following command, and then read the output:

eseutil /mh “drive:\program files\exchsrvr\mdbdata\database_file_name.edb”

When database is consistent, the output will appear, as:

State: Clean Shutdown

  1. Use the Microsoft’s Store Integrity utility (Isinteg.exe) to fix the logical corruption issues in the database. Use the following commands to repair it:

Isinteg –s exchange_server_name –fix –test alltests

After executing the command, the user is prompted to choose the database in the utility. Repeat the aforementioned command until no errors or fixes are appeared in the output.

However, if zero errors are not displayed for a database that  you want to repair, then the other option is to rebuild the database. To do that create a new mailbox store on either the existing Exchange server or new server and then transfer all the mailboxes to that one. However, if you are still unable to create a new mailbox store, then try to rebuild the database from the following method. To do it, try to export all mailbox information to PST files, and delete the database, and finally import the data.

  1. Repeat the steps from 3 to 6 for each database in the storage group.
  2. Mount the databases.

Once the database is restored and you can also perform an online backup of the storage group. However, if the database is not restored or rebuilt in the state of inconsistency, then try using a third-party Exchange recovery software like Kernel for Exchange Server to perform accurate recovery of lost information from corrupt EDB and STM files, and without requiring log files. The Exchange mailbox items can be successfully restored to live Exchange Server, Office 365 mailbox or to Outlook PST files.

https://www.kerneldatarecovery.com/exchange-server-recovery.html

Article Summary:

When Exchange database creates mounting troubles, then try to investigate the issues hampering the restore operation. Verifying the shutdown state (whether consistent or inconsistent) of the database becomes important, and Eseutil can be helpful in this scenario, but with certain restrictions.

Exchange 2003 Disaster Recovery (How to Reinstall Exchange 2003 over a Damaged Installation)

Assume that you have Exchange server 2003 , and you have lost the operating system but you still have the EDB and STM files for the databases, what can you to be up and running as fast as you can, below is the steps that can be used to rescue the exchange in our case

1.    Have a windows server installed and patched to match existing Exchange server
You will want to have the OS already installed and patched to match the existing Exchange server’s patch level.

2.  Reset Exchange Server AD account
When you make the decision to bring up the DR server you will need to reset the Exchange server’s AD account (in ADUC right click the server and choose reset account). Then rename the standby server to match the old Exchange server and join it to the domain. Change the IP address of the standby server to what the old production server was. This way you do not need to make any DNS or firewall changes

3.  Install Exchange 2003
Use setup.exe /disasterrecovery to install Exchange without creating any databases. Make sure your installation matches your old configuration (database and logs on same drives as they were in before).
Make sure that you click Action-Disaster Recovery for the Messaging and Collaboration services and for Exchange System Management Tools
Install Exchange 2003 SP2 using the /disasterrecovery switch
a. Check the following registry subkey for ServicePackBuild
i. HKEY_LOCAL_MACHINE\Software\Microsoft\Exchange\Setup
b. If the key does not exist add the following
i. Reg_Dword : ServicePackBuild
1. Hexadecimal value : 1DD6
Install all post SP2 exchange hotfixes that were installed on prior server
http://technet.microsoft.com/en-us/library/aa997239(v=exchg.65).aspx

4. Run Eseutil /mh
Run Eseutil /mh to check if the database is shutdown in a dirty state. If the database is in a dirty state it will not mount.
If the database is shutdown in a clean state attempt to mount the Store. If successful then mail should start flowing.
Install SSL certificates on new server.

5.  If the mount attempt fails or if the Eseutil /mh shows the database is in a dirty state we will need to look at the store
If ESEUtil /mh shows the database in a dirty state proceed with step one.
If ESEutil /mh shows the database as clean but the mount fails, skip step one.
1. Attempt a Soft Recovery (A transaction log replay process that occurs when a database is re-mounted after an unexpected stop)
a. Run ESEUtil /r ENN
i. ESEUTIL /r enn /L[path to log files] /s[path to checkpoint file] /d[path to database file]
2. Verify the integrity of the database
a. Run ESEUtil / g
3. Further steps to recover would be dictated by the results of the ESEUtil /g
a. Error id’s located in this technet article
i. http://technet.microsoft.com/en-us/library/aa996027.aspx

Unable to mount any mailbox store in a storage group (event id 9518 + event id 454 + event id 494)

yesterday one fo our servers got hang , so we had to hard restart the server

once the server got up again we found that all mailbox stores under one storage group failed to brign online

and we found that the below 3 event log appeared in the event viewer :

Event Type: Error
Event Source: ESE
Event Category: Logging/Recovery
Event ID: 494
Date:  6/24/2012
Time:  1:46:51 AM U
ser:  N/A Computer: server1
Description: Information Store (8676) Storagegroup1: Database recovery failed with error -1216 because it encountered references to a database, ‘G:\EXCHSRVR\StorageGroup1\MAilboxstore1.edb’, which is no longer present. The database was not brought to a Clean Shutdown state before it was removed (or possibly moved or renamed). The database engine will not permit recovery to complete for this instance until the missing database is re-instated. If the database is truly no longer available and no longer required, procedures for recovering from this error are available in the Microsoft Knowledge Base or by following the “more information” link at the bottom of this message.
————————————————————————————————-
Event Type: Error
Event Source: ESE
Event Category: Logging/Recovery
Event ID: 454
Date:  6/24/2012 Time:  1:46:51 AM
User:  N/A
Computer: server1
Description: Information Store (8676) storagegroup1: Database recovery/restore failed with unexpected error -1216.
————————————————————————————————-
Event Type: Error
Event Source: MSExchangeIS
Event Category: General
Event ID: 9518
Date:  6/24/2012 Time:  1:46:51 AM
User:  N/A
Computer: server1
Description: Error 0xfffffb40 starting Storage Group /DC=com/DC=domain/CN=Configuration/CN=Services/CN=Microsoft Exchange/CN=name/CN=Administrative Groups/CN=First Administrative Group/CN=Servers/CN=server1/CN=InformationStore/CN=storagegroup1on the Microsoft Exchange Information Store. Storage Group – Initialization of Jet failed.
————————————————————————————

we have tried to do soft recovery for mailbox store mailboxstore1 by running command eseutil /r “logbase” /l “Log path” /d “Database path”

but it failed and could repair the Database softly

the problem here was because the path of the DB and the path of the Logs wasn’t the same, so we moved the DB files to the same path as the logs and try the command one more time, and it success and could mount the all mailbox stores

An old password still works after you change it in Outlook Web Access

Assume that a user changes their password in Outlook Web Access (OWA) in one of the following versions of Microsoft Exchange Server:

  • Microsoft Exchange Server 2010
  • Microsoft Exchange Server 2007
  • Microsoft Exchange Server 2003

In this case, you may notice a 15-minute period during which the user can log on to their mailbox by using either the old password or the new password. However, if the user uses a MAPI client (such as Microsoft Outlook) to access the mailbox or if the user tries to access other files and resources, the user is authenticated only if they use the new password.

This latency exists by design for Internet Information Services (IIS) performance reasons and is controlled by the following registry setting.
Warning   If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

  1. Start Registry Editor (Regedt32.exe) on the server that is running IIS and through which the user gains access to OWA.
  2. Locate the following key in the registry:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InetInfo\Parameters
  3. On the Edit menu, click Add Value, and then add the following registry value:
    Value Name:  UserTokenTTL   (Note This is case-sensitive!) Data Type:   REG_DWORD Value Range: 0 – 0x7FFFFFFF (Note This unit is in seconds.)
  4. Exit Registry Editor, and then restart IIS.

Get Mailboxes size for users in a specified OU (VB Script)

‘this is a VB script that got the OU variable and an array of Back end servers , and iterates every server and match the users with the users in the OU

‘Option Explicit

‘On Error Resume Next

Dim ServerList                  ‘ List of computers to check

Dim server                                          ‘ Current computer to check

Dim fso                                                                ‘ File System Object

Dim strWinMgmts                                           ‘ Connection string for WMI

Dim objWMIExchange                   ‘ Exchange Namespace WMI object

Dim listExchange_Mailboxs        ‘ ExchangeLogons collection

Dim objExchange_Mailbox                          ‘ A single ExchangeLogon WMI object

Dim logfile                                         ‘ Output file

Dim ou1

Dim provider

Dim objParent

Dim WshShell

Dim objUser

‘Set objParent = GetObject(provider & ou1)

ou1 = “OU LDAP Path”

provider = “LDAP://”

Const cWMINameSpace = “root/MicrosoftExchangeV2”

Const cWMIInstance = “Exchange_Mailbox”

Const LOG_FILE = “EMailSize.csv”

set objParent = GetObject(provider & ou1)

objParent.Filter = Array(“user”)

‘————————————–

‘ Set up the email servers

‘————————————–

ServerList  = Array(“Mailbox server 1″,”Mailbox server 2”)

‘————————————–

‘ Set up log file

‘————————————–

set fso = CreateObject(“Scripting.FileSystemObject”)

Set logfile = fso.CreateTextFile(LOG_FILE)

logfile.WriteLine(“””Display Name””,””Mailbox Size””,””Mailbox TotalItems””,””Mailbox StoreName””,””Mailbox ServerName””,””Mailbox LegacyDN”””)

‘ Create the object string, indicating WMI (winmgmts), using the
‘ current user credentials (impersonationLevel=impersonate),
‘ on the computer specified in the constant cComputerName, and
‘ using the CIM namespace for the Exchange provider.

WScript.Echo “Starting now”

‘The rest of the script will fetch mailbox sizes for our servers. Mailbox sizes are in Kilobytes.

For Each server in ServerList

WScript.Echo “Starting ” & server & ” search.”

strWinMgmts = “winmgmts:{impersonationLevel=impersonate}!//” & server & “/” & cWMINameSpace

‘WScript.Echo strWinMgmts

Set objWMIExchange =  GetObject(strWinMgmts)

‘ Verify we were able to correctly set the object.

If Err.Number <> 0 Then

WScript.Echo “ERROR: Unable to connect to the WMI namespace.”

Else

‘The Resources that currently exist appear as a list of

‘Exchange_Mailbox instances in the Exchange namespace.

Set listExchange_Mailboxs = objWMIExchange.InstancesOf(cWMIInstance)

‘ Were any Exchange_Mailbox Instances returned?

If (listExchange_Mailboxs.count > 0) Then

‘ If yes, do the following:
‘ Iterate through the list of Exchange_Mailbox objects.

For each objUser in objParent

For Each objExchange_Mailbox in listExchange_Mailboxs
‘logfile.writeline(“””legacyExchangeDN””,”& objUser.legacyExchangeDN &””)’ ‘logfile.writeline(“””legacyDN””,”& objExchange_Mailbox.LegacyDN &””)

If  ucase(objUser.legacyExchangeDN) = ucase(objExchange_Mailbox.LegacyDN) then

‘ Display the value of the Size property.
wscript.echo “Matched”
wscript.echo objUser.legacyExchangeDN

logfile.WriteLine(“””” & objExchange_Mailbox.MailboxDisplayName & “””,””” & objExchange_Mailbox.Size & “””,””” & objExchange_Mailbox.TotalItems & “””,””” & objExchange_Mailbox.StoreName & “””,””” & objExchange_Mailbox.ServerName & “””,””” & objExchange_Mailbox.LegacyDN & “”””)

End

If

Next

Next

Else

‘ If no Exchange_Mailbox instances were returned, display that.

WScript.Echo “WARNING: No Exchange_Mailbox instances were returned.”

End If

End If

Next

Wscript.Echo “Completed”

Mail stuck in queue with status “messages with unreachable destination”

Messages in this queue cannot reach their final destination server. For example, Exchange cannot determine a route or a connector to the final destination, or all available routes or connectors are marked as down.

Messages can accumulate in this queue if no route exists for message delivery. Also, if an Exchange connector or a remote delivery queue is unavailable or if it is in a retry status for a while, and no alternative available route exists to the connector or the remote destination, new messages may be moved to this queue. The administrator can then address the problem or define an alternative route.  Use the WinRoute tool to help determine available routes and route status.

To troubleshoot the queue that is causing this issue, restart the SMTP Virtual Server to reset the connector status and to retry the  messages that are queued. To restart the SMTP virtual server, follow these steps:

  1. Click Start, point to Programs, point to Microsoft Exchange,    and then click System Manager.
  2. Expand the Servers container, expand your Exchange Server computer, expand    Protocols, and then expand SMTP.
  3. Right-click the SMTP virtual server, and then click Stop.
  4. Right-click the SMTP virtual server    again, and then click Start.
%d bloggers like this: