Professional Documents
Culture Documents
The domain naming master domain controller controls the addition or removal of domains in the forest. This DC is the only one that can add or remove a domain from the directory. It can also add or remove cross references to domains in external directories. There can be only one domain naming master in the whole forest. Infrastructure Master: When an object in one domain is referenced by another object in another domain, it represents the reference by the GUID, the SID (for references to security principals), and the DN of the object being referenced. The infrastructure FSMO role holder is the DC responsible for updating an object's SID and distinguished name in a cross-domain object reference. At any one time, there can be only one domain controller acting as the infrastructure master in each domain. Note: The Infrastructure Master (IM) role should be held by a domain controller that is not a Global Catalog server (GC). If the Infrastructure Master runs on a Global Catalog server it will stop updating object information because it does not contain any references to objects that it does not hold. This is because a Global Catalog server holds a partial replica of every object in the forest. As a result, cross-domain object references in that domain will not be updated and a warning to that effect will be logged on that DC's event log. If all the domain controllers in a domain also host the global catalog, all the domain controllers have the current data, and it is not important which domain controller holds the infrastructure master role. Relative ID (RID) Master: The RID master is responsible for processing RID pool requests from all domain controllers in a particular domain. When a DC creates a security principal object such as a user or group, it attaches a unique Security ID (SID) to the object. This SID consists of a domain SID (the same for all SIDs created in a domain), and a relative ID (RID) that is unique for each security principal SID created in a domain. Each DC in a domain is allocated a pool of RIDs that it is allowed to assign to the security principals it creates. When a DC's allocated RID pool falls below a threshold, that DC issues a request for additional RIDs to the domain's RID master. The domain RID master responds to the request by retrieving RIDs from the domain's unallocated RID pool and assigns them to the pool of the requesting DC. At any one time, there can be only one domain controller acting as the RID master in the domain. PDC Emulator: The PDC emulator is necessary to synchronize time in an enterprise. Windows 2000/2003 includes the W32Time (Windows Time) time service that is required by the Kerberos authentication protocol. All Windows 2000/2003-based computers within an enterprise use a common time. The purpose of the time service is to ensure that the Windows Time service uses a hierarchical relationship that controls authority and does not permit loops to ensure appropriate common time usage.
The PDC emulator of a domain is authoritative for the domain. The PDC emulator at the root of the forest becomes authoritative for the enterprise, and should be configured to gather the time from an external source. All PDC FSMO role holders follow the hierarchy of domains in the selection of their in-bound time partner. In a Windows 2000/2003 domain, the PDC emulator role holder retains the following functions:
Password changes performed by other DCs in the domain are replicated preferentially to the PDC emulator. Authentication failures that occur at a given DC in a domain because of an incorrect password are forwarded to the PDC emulator before a bad password failure message is reported to the user. Account lockout is processed on the PDC emulator. Editing or creation of Group Policy Objects (GPO) is always done from the GPO copy found in the PDC Emulator's SYSVOL share, unless configured not to do so by the administrator. The PDC emulator performs all of the functionality that a Microsoft Windows NT 4.0 Server-based PDC or earlier PDC performs for Windows NT 4.0-based or earlier clients.
This part of the PDC emulator role becomes unnecessary when all workstations, member servers, and domain controllers that are running Windows NT 4.0 or earlier are all upgraded to Windows 2000/2003. The PDC emulator still performs the other functions as described in a Windows 2000/2003 environment. At any one time, there can be only one domain controller acting as the PDC emulator master in each domain in the forest.
In the forest root domain: If all domain controllers are also global catalog servers, leave all of the FSMO roles on the first DC in the forest. If all domain controllers are not also global catalog servers, move all of the FSMO roles to a DC that is not a global catalog server. In each child domain, leave the PDC emulator, RID master, and Infrastructure master roles on the first DC in the domain, and ensure that this DC is never designated as a global catalog server (unless the child domain only contains one DC, then you have no choice but to leave it in place).
Configure a standby operations master - For each server that holds one or more operations master roles, make another DC in the same domain available as a standby 4
operations master. Making a DC as a standby operation master involves the following actions:
The standby operations master should not be a global catalog server except in a single domain environment, where all domain controllers are also global catalog servers. The standby operations master should have a manually created replication connection to the domain controller that it is the standby operations master for, and it should be in the same site. Configure the RID master as a direct replication partner with the standby or backup RID master. This configuration reduces the risk of losing data when you seize the role because it minimizes replication latency.
To create a connection object on the current operations master: 1. In Active Directory Sites and Services snap-in, in the console tree in the left pane, expand the Sites folder to see the list of available sites. 2. Expand the site name in which the current role holder is located to display the Servers folder. 3. Expand the Servers folder to see a list of the servers in that site. 4. Expand the name of the server that is currently hosting the operations master role to display NTDS Settings. 5. Right-click NTDS Settings, click New, and then click Connection. 6. In the Find Domain Controllers dialog box, select the name of the standby operations master then click OK. 7. In the New Object-Connection dialog box, enter an appropriate name for the connection object or accept the default name and click OK. To create a connection object on the standby operations master perform the same procedure as above, and point the connection to the current FSMO role holder. Note regarding Windows 2000 Active Directory domains: If the forest is set to a functional level of Windows 2000 native, you must locate the domain naming master on a server that hosts the global catalog. If the forest is set to a functional level of Windows Server 2003, it is not necessary for the domain naming master to be on a global catalog server.
Although most FSMO losses can be dealt with within a matter of hours (or even days at some cases), some FSMO roles, such as the PDC Emulator role, should never be offline for more than a few minutes at a time. What will happen if you keep a FSMO role offline for a long period of time? This table has the info: FSMO Role Schema Loss implications The schema cannot be extended. However, in the short term no one will notice a missing Schema Master unless you plan a schema upgrade during that time. Unless you are going to run DCPROMO, then you will not miss this FSMO role. Chances are good that the existing DCs will have enough unused RIDs to last some time, unless you're building hundreds of users or computer object per week. Will be missed soon. NT 4.0 BDCs will not be able to replicate, there will be no time synchronization in the domain, you will probably not be able to change or troubleshoot group policies and password changes will become a problem. Group memberships may be incomplete. If you only have one domain, then there will be no impact.
Domain Naming
RID
PDC Emulator
Infrastructure
Not necessarily high capacity server - A high-capacity domain controller is one that has comparatively higher processing power than other domain controllers to accommodate the additional work load of holding the operations master role. It has a faster CPU and possibly additional memory and network bandwidth. FSMO roles usually do not place stress on the server's hardware. One exception is the performance of the PDC Emulator, mainly when used in Windows 2000 Mixed mode along with old NT 4.0 BDCs. That is why you should:
Increase the size of the DC's processing power. Do not make the DC a global catalog server. Reduce the priority and the weight of the service (SRV) record in DNS to give preference for authentication to other domain controllers in the site. Do not require that the standby domain controller be a direct replication partner (Seizing the PDC emulator role does not result in lost data, so there is no need to reduce replication latency for a seize operation). 6
Schema master - Forest-wide and one per forest. Domain naming master - Forest-wide and one per forest. RID master - Domain-specific and one for each domain. PDC - PDC Emulator is domain-specific and one for each domain. Infrastructure master - Domain-specific and one for each domain.
In most cases an administrator can keep the FSMO role holders (all 5 of them) in the same spot (or actually, on the same DC) as has been configured by the Active Directory installation process. However, there are scenarios where an administrator would want to move one or more of the FSMO roles from the default holder DC to a different DC. The transferring method is described in the Transferring FSMO Roles article, while seizing the roles from a non-operational DC to a different DC is described in the Seizing FSMO Roles article. In order to better understand your AD infrastructure and to know the added value that each DC might possess, an AD administrator must have the exact knowledge of which one of the existing DCs is holding a FSMO role, and what role it holds. With that knowledge in hand, the administrator can make better arrangements in case of a scheduled shut-down of any given DC, and better prepare him or herself in case of a non-scheduled cease of operation from one of the DCs. How to find out which DC is holding which FSMO role? Well, one can accomplish this task by many means. This article will list a few of the available methods.
One per forest One per forest One per domain One per domain One per domain
The first DC in the first domain in the forest (i.e. the Forest Root Domain) The first DC in a domain (any domain, including the Forest Root Domain, any Tree Root Domain, or any Child Domain)
1. Select the appropriate tab for the role you wish to view.
1. When you're done click Close. Finding the Domain Naming Master via GUI To find out who currently holds the Domain Naming Master Role: 1. Open the Active Directory Domains and Trusts snap-in from the Administrative Tools folder. 2. Right-click the Active Directory Domains and Trusts icon again and press Operation Masters.
10
11
1. When you're done click Close. Finding the Schema Master via GUI To find out who currently holds the Schema Master Role: 1. Register the Schmmgmt.dll library by pressing Start > RUN and typing:
1. 2. 3. 4. 5.
Press OK. You should receive a success confirmation. From the Run command open an MMC Console by typing MMC. On the Console menu, press Add/Remove Snap-in. Press Add. Select Active Directory Schema. Press Add and press Close. Press OK.
12
6. Click the Active Directory Schema icon. After it loads right-click it and press Operation Masters.
13
14
15
1. Type q 3 times to exit the Ntdsutil prompt. Note: You can download THIS nice batch file that will do all this for you (1kb). Another Note: Microsoft has a nice tool called Dumpfsmos.cmd, found in the Windows 2000 Resource Kit (and can be downloaded here: Download Free Windows 2000 Resource Kit Tools). This tool is basically a one-click Ntdsutil script that performs the same operation described above.
with AD replication. But Replmon can also provide valuable information about the AD, about any DC, and also about other objects and settings, such as GPOs and FSMO roles. Install the package before attempting to use the tool. 1. On any domain controller, click Start, click Run, type REPLMON in the Open box, and then click OK. 2. Right-click Monitored servers and select Add Monitored Server.
1. In the Add Server to Monitor window, select the Search the Directory for the server to add. Make sure your AD domain name is listed in the drop-down list.
17
1. In the site list select your site, expand it, and click to select the server you want to query. Click Finish.
18
1. Right-click the server that is now listed in the left-pane, and select Properties.
19
20
Schema master - Forest-wide and one per forest. Domain naming master - Forest-wide and one per forest. 21
RID master - Domain-specific and one for each domain. PDC - PDC Emulator is domain-specific and one for each domain. Infrastructure master - Domain-specific and one for each domain.
In most cases an administrator can keep the FSMO role holders (all 5 of them) in the same spot (or actually, on the same DC) as has been configured by the Active Directory installation process. However, there are scenarios where an administrator would want to move one or more of the FSMO roles from the default holder DC to a different DC. Moving the FSMO roles while both the original FSMO role holder and the future FSMO role holder are online and operational is called Transferring, and is described in the Transferring FSMO Roles article. However, when the original FSMO role holder went offline or became non operational for a long period of time, the administrator might consider moving the FSMO role from the original, non-operational holder, to a different DC. The process of moving the FSMO role from a non-operational role holder to a different DC is called Seizing, and is described in this article. If a DC holding a FSMO role fails, the best thing to do is to try and get the server online again. Since none of the FSMO roles are immediately critical (well, almost none, the loss of the PDC Emulator FSMO role might become a problem unless you fix it in a reasonable amount of time), so it is not a problem to them to be unavailable for hours or even days. If a DC becomes unreliable, try to get it back on line, and transfer the FSMO roles to a reliable computer. Administrators should use extreme caution in seizing FSMO roles. This operation, in most cases, should be performed only if the original FSMO role owner will not be brought back into the environment. Only seize a FSMO role if absolutely necessary when the original role holder is not connected to the network. What will happen if you do not perform the seize in time? This table has the info: FSMO Role Schema Loss implications The schema cannot be extended. However, in the short term no one will notice a missing Schema Master unless you plan a schema upgrade during that time. Unless you are going to run DCPROMO, then you will not miss this FSMO role. Chances are good that the existing DCs will have enough unused RIDs to last some time, unless you're building hundreds of users or computer object per week. Will be missed soon. NT 4.0 BDCs will not be
Domain Naming
22
able to replicate, there will be no time synchronization in the domain, you will probably not be able to change or troubleshoot group policies and password changes will become a problem. Infrastructure Group memberships may be incomplete. If you only have one domain, then there will be no impact.
Important: If the RID, Schema, or Domain Naming FSMOs are seized, then the original domain controller must not be activated in the forest again. It is necessary to reinstall Windows if these servers are to be used again. The following table summarizes the FSMO seizing restrictions: FSMO Role Schema Domain Naming RID PDC Emulator Infrastructure Can transfer back to original Original must be reinstalled Restrictions
Another consideration before performing the seize operation is the administrator's group membership, as this table lists: FSMO Role Schema Domain Naming RID PDC Emulator Infrastructure To seize the FSMO roles by using Ntdsutil, follow these steps: Caution: Using the Ntdsutil utility incorrectly may result in partial or complete loss of Active Directory functionality. 1. On any domain controller, click Start, click Run, type Ntdsutil in the Open box, and then click OK. Domain Admins Administrator must be a member of Schema Admins Enterprise Admins
23
24
Note: All five roles need to be in the forest. If the first domain controller is out of the forest then seize all roles. Determine which roles are to be on which remaining domain controllers so that all five roles are not on only one server. 1. Repeat steps 6 and 7 until you've seized all the required FSMO roles. 2. After you seize or transfer the roles, type q, and then press ENTER until you quit the Ntdsutil tool. Note: Do not put the Infrastructure Master (IM) role on the same domain controller as the Global Catalog server. If the Infrastructure Master runs on a GC server it will stop updating object information because it does not contain any references to objects that it does not hold. This is because a GC server holds a partial replica of every object in the forest.
25
Moving the FSMO roles while both the original FSMO role holder and the future FSMO role holder are online and operational is called Transferring, and is described in this article. The transfer of an FSMO role is the suggested form of moving a FSMO role between domain controllers and can be initiated by the administrator or by demoting a domain controller. However, the transfer process is not initiated automatically by the operating system, for example a server in a shut-down state. FSMO roles are not automatically relocated during the shutdown process - this must be considered when shutting down a domain controller that has an FSMO role for maintenance, for example. In a graceful transfer of an FSMO role between two domain controllers, a synchronization of the data that is maintained by the FSMO role owner to the server receiving the FSMO role is performed prior to transferring the role to ensure that any changes have been recorded before the role change. However, when the original FSMO role holder went offline or became non operational for a long period of time, the administrator might consider moving the FSMO role from the original, non-operational holder, to a different DC. The process of moving the FSMO role from a non-operational role holder to a different DC is called Seizing, and is described in the Seizing FSMO Roles article. You can transfer FSMO roles by using the Ntdsutil.exe command-line utility or by using an MMC snap-in tool. Depending on the FSMO role that you want to transfer, you can use one of the following three MMC snap-in tools:
Active Directory Schema snap-in Active Directory Domains and Trusts snap-in Active Directory Users and Computers snap-in
To transfer the FSMO role the administrator must be a member of the following group: FSMO Role Schema Domain Naming RID PDC Emulator Infrastructure Transferring the RID Master, PDC Emulator, and Infrastructure Masters via GUI To Transfer the Domain-Specific RID Master, PDC Emulator, and Infrastructure Master FSMO Roles: Domain Admins Administrator must be a member of Schema Admins Enterprise Admins
26
1. Open the Active Directory Users and Computers snap-in from the Administrative Tools folder. 2. If you are NOT logged onto the target domain controller, in the snap-in, right-click the icon next to Active Directory Users and Computers and press Connect to Domain Controller. 3. Select the domain controller that will be the new role holder, the target, and press OK. 4. Right-click the Active Directory Users and Computers icon again and press Operation Masters. 5. Select the appropriate tab for the role you wish to transfer and press the Change button. 6. Press OK to confirm the change. 7. Press OK all the way out. Transferring the Domain Naming Master via GUI To Transfer the Domain Naming Master Role: 1. Open the Active Directory Domains and Trusts snap-in from the Administrative Tools folder. 2. If you are NOT logged onto the target domain controller, in the snap-in, right-click the icon next to Active Directory Domains and Trusts and press Connect to Domain Controller. 3. Select the domain controller that will be the new role holder and press OK. 4. Right-click the Active Directory Domains and Trusts icon again and press Operation Masters. 5. Press the Change button. 6. Press OK to confirm the change. 7. Press OK all the way out. Transferring the Schema Master via GUI To Transfer the Schema Master Role: 1. Register the Schmmgmt.dll library by pressing Start > RUN and typing:
1. 2. 3. 4. 5.
Press OK. You should receive a success confirmation. From the Run command open an MMC Console by typing MMC. On the Console menu, press Add/Remove Snap-in. Press Add. Select Active Directory Schema. Press Add and press Close. Press OK.
27
6. If you are NOT logged onto the target domain controller, in the snap-in, right-click the Active Directory Schema icon in the Console Root and press Change Domain Controller. 7. Press Specify .... and type the name of the new role holder. Press OK. 8. Right-click right-click the Active Directory Schema icon again and press Operation Masters. 9. Press the Change button. 10. Press OK all the way out. Transferring the FSMO Roles via Ntdsutil To transfer the FSMO roles from the Ntdsutil command: Caution: Using the Ntdsutil utility incorrectly may result in partial or complete loss of Active Directory functionality. 1. On any domain controller, click Start, click Run, type Ntdsutil in the Open box, and then click OK.
28
29
30
On the other hand, if your system disk has failed or the Active Directory database is corrupted, then you can simply restore the data normally without using NTDSUTIL. After rebooting the DC, it will receive newer updates from other DCs.
The domain controllers (DCs) in each domain keep a variety of information in the directory data store (or simply the directory). Changes made to the directory are replicated from one DC to other DCs in the domain. Replication occurs at intervals, not continuously. Therefore, the directory on any DC is normally in loose consistency with those on other DCs, since the most recent changes on each DC may not have been replicated to the others. Objects attributes are assigned version numbers that are incremented when the attributes are changed so that the replication process can determine which changes are the most current.
31
My message is this, please be aware that eseutil is a dangerous tool and that you ought to practice on a test Exchange machine before taking a stab at eseutil /r on your production server. Now that I have warned you of the dangers, there will be situations where eseutil is a life saver. (Or at least a mail saver.)
Eseutil for Windows Exchange Server Eseutil /mh /ml /mk Eseutil /k to check for damaged headers Eseutil /cc for troubleshooting Eseutil /d to defrag the .edb database Eseutil /r to repair Exchange 2003 log files Eseutil /p will attempt to repair a corrupted store database
By spelling it ESEutil, two thoughts spring to my mind; firstly, I am reminded that here is a tool that manipulates Exchange's Extensible Storage Engine. Secondly, ESEutil is a relative of NTDSutil which I use to manipulate Windows Active Directory from the command line. Whether you spell it ESEutil, Eseutil or plain eseutil, this executable is really three tools in one.
A different switch controls each aspect of eseutil. The first and harmless aspect, is shown by the eseutil /k, /mh and /cc switches. These gentle commands give you the ability to rerun procedures that occur naturally in Exchange, for example, when you remount a store, or replay the logs after a backup.
The second side of eseutil is to defrag Exchange 2003's databases with eseutil /d switch. This /d switch shrinks the .edb files and recovers disk space. Eseutil /d performs a
32
specialist database compaction which is not the same as Windows 2003's built-in disk defragmenter.
The third and most dangerous side of eseutil is the repair function with /r or /p. Regard eseutil /r or /p as a last resort to repair your damaged mailstore. If the repair fails then it can leave the store in an unusable state, so always backup your Exchange server before you unleash the /r or /p switches.
My advice is to begin by practicing with the harmless switches, for example eseutil /mh or /k. To get started go to the command prompt and then navigate to the Exchsrvr\Bin folder. Because this \bin folder is not in the file 'Path', beware of the notorious: 'not recognised as an internal or external command ' error. This does not necessarily mean there is no eseutil on the Exchange server, just that you are not executing the command from the Exchsrvr\Bin folder.
Navigate to the \exchsrvr\bin folder before typing any eseutil commands. An old trick is to copy the Address as seen in Explorer and then go to the command prompt, right click and paste that path. (See diagram opposite.)
Alternatively, if you are going do a lot of command line troubleshooting, then it's worth editing the Path in the System Icon, Environmental Variables.
Eseutil /mh
Here is a simple switch to verify the state of an Exchange database. All that eseutil /mh does is to determine whether the last shutdown was clean or dirty. Eseutil /mh is ideal to practice getting to the right path and executing eseutil without doing any harm to the mailstore databases.
33
To start with, familiarise your self with the names and location of the Exchange 2003 databases, for example priv1.edb is usually in the \exchsrvr\mdbdata folder. My suggestion is to type this command from the exchsrvr\bin folder: eseutil /mh "d:\program files\exchsrvr\mdbdata\priv1.edb" (Assuming Exchange 2003 is installed on the d:\.)
Examine the output for this line, 'State: Clean Shutdown' (or Dirty Shutdown). In passing, you can also see when the last backup occurred. Notice how the first line of the output changes when you substitute priv1.STM for priv1.edb. Note the phrase: 'Streaming File'.
Another use of eseutil /mh is in disaster recovery where you want to see if eseutil /p has already been run. If 'Repair Count' is greater than zero, then you can see how many times eseutil /p has been tried already. In general, the greater the Repair Count, the less chance of a successful repair.
Eseutil /ml
Similar to the /mh, except this switch performs an integrity check on log files, for example, E00.log.
Eseutil /mm
Dumps metadata from the database file (not the logs). Specialist use only, I find the output fascinating but not very useful.
Eseutil /mk
Provides information about the checkpoint file. Handy for troubleshooting backup / restore problems. Where /mh used priv1.edb, remember to substitute the name of the checkpoint file E00.chk with /mk.
34
This switch, eseutil /k is new in Exchange 2003. The keyword is: check. Just as checksum verifies a file's size, so eseutil /k checks the integrity of Exchange 2003's information stores. One application of eseutil /k is to troubleshoot an Exchange 2003 database after an unscheduled shutdown of the Windows 2003 server. The only downside with eseutil /k is that it does not recover the database. (For recovery try /r or /p - but be careful.)
If you create additional mailbox stores, then check their corresponding .edb filenames. Example: to check the default mailbox store = priv1.edb go to the command prompt and type: eseutil /k "c: \program files\exchsrvr\mdbdata\priv1.edb" (This time I assumed that Exchange 2003 has been installed on the c:\).
Do not worry about uninititialized pages, it's normal to have several hundred in this category. However, what you don't want is bad checksums or wrong page numbers.
Another scenario is that you wish to check the transaction logs, in which case here is the command:
Command:eseutil /k c:\exchsrvr\mdbdata\e00.log
As there are no spaces in the above file or folder names, you do not need to enclose the command with speech marks. However, to save disappointment, pay special attention to the path where the databases are stored.
35
Key terms: Hard and Soft recovery. Checkpoint file, Transaction Logs
A common scenario for this /cc switch is that you have just restored an Exchange mailstore from last night's backup and you want to replay today's logs. Eseutil /cc would achieve your goal provided you issue the command from the folder that contains the Restore.env file. This special file (Restore.env) carries information about the restore in general and the log sequence numbers in particular.
There is a sister command just to check the contents of restore.env : eseutil /cm path to restore.env Likely contents of restore.env would include paths to source files. Names of databases .edb and .stm files.
Terminology check
Cases where you force a replay of the transaction logs are referred to as a hard recovery. Eseutil /cc gets the restored database up-to-date through such a hard recovery process. Hard recovery replays the transaction logs after a backup, either select the 'Last Backup Set' checkbox, or use eseutil /cc. Remember that eseutil /cc looks for instructions in the Restore.env file. Perhaps you can see what I mean when I say that some aspects of Eseutil are just command line methods of controlling Exchange 2003.
In cases where you are short of disk space, call for the temp switch. Eseutil /cc "name of temp folder" /t. Naturally you would need to substitute "name of temp folder" for a real folder.
36
To be sure that the recovery is complete, wait until you see an ESE event ID 205 in the Event Viewer, Application Log.
Soft recovery replays the logs - but only after the last checkpoint. The normal routine at startup is for uncommitted transactions to be written to the database. Just remounting the store triggers a built-in soft recovery routine.
With a soft recovery, Exchange processes a few recent transactions after the last checkpoint. Soft recovery reads pointers in E00.chk, from this information it knows which transactions to commit or roll-back in order to get the database into a consistent state. One such soft recovery scenario could be a sudden 'dirty' store shutdown, which resulted in transactions being interrupted.
If you delve more deeply, you find that eseutil /c has a whole family of commands e.g. cc /ch
Eseutil / d is probably the commonest and the safest of eseutil's switches. This switch works in the same way that Disk Keeper defrags a physical disk. Take the problem where Exchange's mailstore is huge and does not shrink even after you have deleted several mailboxes. You would like to recover the space occupied by the deleted mailboxes. So this is a job eseutil /d.
To prepare for eseutil /d, first dismount the store. There is no need to stop the Information Store service, just dismount the individual stores in the Exchange System Manager. Next, make sure that you have plenty of free disk space, at least as much as the priv.edb or
37
store.edb that you wish to defrag. Navigate in the cmd window to the \exchsrver\bin folder and issue a command such as this:
If you really do not have enough free space try the Eseutil /d /t "f:\temp.edb". Where the f drive has enough free space. Always remember to remount the store once the defrag has finished.
Take a reading of the store size before and and after running eseutil /d.
Typical Scenario: you have restored an Exchange 2003 database but you cannot mount the store. When you examine the event log, you see errors: ESE ID 494 - Recovery failed with error -1216. Further down in the Application Log you may see ESE BACKUP ID 904 and ID 905.
Do not run /r just for fun or merely to see what happens, eseutil /r is strictly an emergency measure when all else fails to get the restored server working.
What can you do? Really, you should backup the Exchange database as it is NOW. Then Try eseutil /r e00 /i . Note the sequence /r e00 /i is correct. This assumes that your first, or base log is e00 not some other number. If you have a storage group with multiple stores, I am afraid that you have to dismount all stores before running the /r switch. Perhaps this reminds you that all members of a storage group share the same transaction log.
38
Scenario. You try to recover a store.edb database. However it fails, possibly because the corresponding transaction logs are missing. For example, you may get an error: 'The database files in this storage are inconsistent'. To gather more information try eseutil /mh. You determine that the state is inconsistent, after backing up the current database, you try eseutil /p. Follow up with isinteg -fix.
Another nasty problem is that you cannot backup the store. The worst cases are errors caused by hardware malfunction. As a last ditch, do or die measure, you could try eseutil /p. I was going to say backup before you try, but of course in this particular case, backup is the problem. How about a little lateral thinking and try to copy the store before you run eseutil /p.
Summary
Eseutil is a powerful utility. It has at least three separate jobs, defragging stores, checking the .edb database files, repairing corrupted priv1.edb files. My advice is to practice with the /cc switch before you have to use the /r (repair) switch on a live network.
Performs a hard recovery after a database restore. Performs an offline compaction of a database. Verifies the integrity of a database. Verifies the checksums of a database. Generates formatted output of various database file types. e.g. /mh Repairs a corrupted or damaged database. Performs soft recovery to bring a single database into a consistent or clean shutdown state.
39
Eseutil /y
Directory data stored on DCs and replicated between them includes information about objects, configuration data (such as a list of all domains and the locations of their DCs), and schema data, which defines the types of objects that can be stored in the directory and the attributes they can have. This information is used by network applications and services.
The first step in restoring Active Directory data is to boot a domain controller into Directory Services Restore Mode (DSRM). Then the Active Directory database (NTDS.dit) can be restored with a utility such as the native Backup utility provided by Microsoft. The restore of the actual database file can only be performed in non-authoritative mode; however, it is important to understand the concepts of non-authoritative and authoritative restores with respect to the objects stored in the database:
Using native tools provided by Microsoft, the default method is the non-authoritative restore: settings and entries maintain the version numbers they had at the time of backup. After the DC is restored, it is updated using normal replication methods. Note that any object that was deleted after the last backup will be restored with the database file, but if the DC is then booted to normal Active Directory mode, the object will be deleted again during the replication process.
An authoritative restore, on the other hand, allows you to selectively increment the version numbers of attributes to make them authoritative in the directory. That is, during the replication following the restoration, when the version numbers of objects are compared, the objects and attributes on the restored DC that were restored authoritatively will have higher version numbers than those on the other DCs, and will replicate out to the other DCs instead of themselves being overwritten as out-of-date. This allows you to recover deleted objects even after the deletion has been replicated throughout the enterprise. Usually, an authoritative restore of selected objects and attributes follows a non-authoritative restore of the whole database (for example, from a backup tape).
40
Accordingly, when you need to recover deleted objects from a backup or roll back changes to objects, you typically first need to perform a nonauthoritative restore and then do an authoritative restore, even though it is more difficult.
Simple non-authoritative restores are valuable primarily if you need to recover a DC that has crashed and that has a slow connection to the next DC. This restores an old version of Active Directory and only the differences between the restored DC and its replication partners need to be transmitted. If bandwidth is not a concern, you do not need to do a restore at all: if a DC crashes, you can simply promote a Windows 2000/2003 server to be a DC, and a clean version of Active Directory will replicate to it from an existing DC. If you're running Windows Server 2003, you can do this very efficiently by promoting a server to be a DC using the Install from Media feature.
Note that when you perform a non-authoritative or an authoritative restore, the DC must be offline for user access. Specifically, the DC must be booted into a special mode, Directory Services Restore Mode. The machine at that point is online but is not functioning as a DC in the Active Directory. While the DC is in Directory Services Restore Mode, it is unavailable for any functions associated with Active Directory, such as validating logons or replicating directory data.
41
That warning over, there will be situations where Isinteg is your get-out-of-jail card. Isinteg in Exchange 2003, replaces Esefile found in older versions of Exchange.
Isinteg switches for Exchange Isinteg -test Isinteg -fix Isinteg -patch? Summary
Isinteg is a valuable command line utility to check and then repair logical database inconsistencies in Microsoft Exchange Server. If there is physical damage to the disk and database, then seek other remedies.
You can find isinteg in the Exchsrvr\Bin folder. Since this folder is not in the Path, you need to be careful when executing Isinteg from the cmd prompt. The trick is to navigate to the \exchsrvr\bin folder. One popular method is to find the executable with explorer, then copy the path from the Address bar and paste it into the cmd prompt. Before you start practicing with isinteg, the MSExchangeIS service should be running but the mailbox store should be dismounted. Here is the syntax for isinteg.
42
When you run isinteg, the first switch to append, the switch I always forget, is the -s ExchangeServer.
Isinteg -test
The -test switch has a range of further commands. If in doubt then try -test Alltests.
This error, with FDsWaitTask, can usually be cured with Isinteg -test mailbox
Another common 7200 error is EcFlushInTransitUserMail, this time try a different switch: Isinteg -test folder
43
ISINTEG - Firstly, one of my rare disclaimers. Be careful with Isinteg, especially the - fix switch. Backup your Exchange .edb and log files BEFORE you even think about using Isinteg. Always begin by using ISINTEG - test, rather than -fix.
Example, you get error 080040301 when you are moving mailboxes to another store. The best solution is to get a hotfix, however, in an emergency try ISINTEG
ISINTEG -s BigServer -fix is Guy's candidate for the worlds most dangerous switch, the fix has been know to destroy exchange. So only use in an emergency, and yes you did backup BEFORE you tried Isinteg -s BigServer -fix?
ACL Member Attachment Cross Reference Deleted Folders Deleted Recipients DeliveredTo Folder Global Mailbox Message Miscellaneous Oof History Per-User Read
44
Isinteg -patch?
Patch files are created during an online backup of open files. Exchange 2003 automatically patches restores, so there is no need to use the -patch switch. If there is a problem, you should use the check box 'This database can be overwritten by a restore' in Exchange System Manager.
The isinteg -Patch was used for correcting errors with Exchange 5.5 backup, or to be precise, problems with a restore from an offline backup. Typical Event log IDs were 1087 or Error 2083.
For with inconsistencies in Microsoft Exchange 200x databases, turn to Isinteg. I strongly recommend practicing with -tests switch before trying the -fix command. Remember that Isinteg needs the -S servername switch.
45