Upload
vodiep
View
226
Download
0
Embed Size (px)
Citation preview
Exchange Server Mailbox Database
Sašo Erdeljanov s.p. [email protected] MVP – Exchange Server E-mail: [email protected]
Mailbox Database
File Type Purpose
<Log Prefix>.chk Checkpoint file
<Log Prefix>.log Current transaction log file
<Log Prefix>xxxxxxxx.log Transaction log file that was already renamed and filed
<Log Prefix>res00001.jrs Reserved transaction logs
<Log Prefix>res00002.jrs Reserved transaction logs
Tmp.edb Temporary workspace for processing transactions
<Log Prefix>tmp.log
Transaction log file for the temporary workspace
<File Name>.edb Rich text database files that stores content for mailbox and public folder databases
Backup
• VSS Exchange aware
− Windows Backup, Microsoft DPM, 3rd party
• Active Directory
− DC systemstate
Restore
• Database
• Single Mailbox
• Dial Tone recovery & database swap
Before Exchange Server 2010
• Online Maintenance
Maintenance Tasks
• Purge mailbox database and public folder database indexes
− Remove Expired Indexes (40 days)
• Maintain tombstones
• Clean up the deleted items dumpster
• Remove public folders that have exceeded the expiry time
• Remove deleted public folders that have exceeded the tombstone lifetime
• Clean up conflicting public folder messages (180 days)
• Update server versions
• Clean up deleted mailboxes
• Check message table for orphaned messages
• Clean up reliable event tables
Event IDs
• 700 Starting
• 701 Completed
• 702 Resuming
• 703 Completed Resumed Pass
• 704 Interrupted and Terminated
• 1221 Whitespace Amount
Event IDs
Exchange 2010
• New ESE Functionality
− Larger I/O and sequential I/O to reduce IOPS
− Optimization for commodity storage
− Database management reduction
− Online defragmentation
− Online database scanning
Database Maintenance
• Database maintenance is divided into the following: − Store mailbox maintenance
− ESE database maintenance
• Exchange 2007 vs Exchange 2010 − ESE database maintenance was disk-intensive in E12
− In Exchange 2010, on large or very heavy profile servers, the store mailbox maintenance task only lasts approximately 45 minutes, while ESE database maintenance usually took from six to eight hours per night to complete on large Exchange 2007 databases.
Database Maintenance
• Exchange Store-focused online database maintenance functions (recovery item cleanup) are same in Exchange 2010 and Exchange 2007.
• Only ESE functions, online defragmentation, and database checksumming have changed.
Online Defragmentation
• Online defragmentation now runs in the background 24×7
− Throttled
• Whitespace?
• Get-MailboxDatabase BAZA -Status
| FL AvailableNewMailboxSpace
Online Database Scanning
• = Database checksumming
• I/O is 100 percent sequential
• Exchange 2010 is designed with the expectation that every database is fully scanned once every three days (warning!)
• Two modes: − Run as the last task in the scheduled Mailbox Database
Maintenance process (OK for small DB)
− Run in the background 24×7 (default) − No more than once per day
− Fire a warning event if it can't finish scanning in a seven day period
Mailbox Database
File Type Purpose
<Log Prefix>.chk Checkpoint file
<Log Prefix>.log Current transaction log file
<Log Prefix>xxxxxxxx.log Transaction log file that was already renamed and filed
<Log Prefix>res00001.jrs Reserved transaction logs
<Log Prefix>res00002.jrs Reserved transaction logs
Tmp.edb Temporary workspace for processing transactions
<Log Prefix>tmp.log
Transaction log file for the temporary workspace
<File Name>.edb Rich text database files that stores content for mailbox and public folder databases
Mailbox Database
Recover Database
• Restore database from backup (+tlogs)
• Worst-case scenario: − Repair database
− Data Loss
Problems and Tools
• Problems: − Dirty Shutdown
− Required Logs not Available
− Page Errors
• Tools: − ESEUtil
− Isinteg, New-MailboxRepairRequest
ESEUtil Modes
• Repair
• Defragmentation
• File Dump
• Recovery
• Integrity
• Restore
• Checksum
• Copy File
Repair (eseutil /p)
• Discards bad pages
• Reconstructs tables from remaining data
• Repairs system tables
• Makes an inconsistent database consistent − This will always cause some data loss
• If leaving a database in production after repair, you MUST: − Run offline defragmentation to rebuild space trees and
indexes
− Run ISINTEG, New-MailboxRepairRequest
Defragmentation (eseutil /d)
• Database files are copied to a temporary database
• At end of process, temporary file is copied over the original file
• All indexes and space trees are discarded
• Pages are renumbered and page links updated
• Checksums are updated for moved pages
Isinteg, New-MailboxRepairRequest
• Isinteg: − Exchange Server 2003
− Exchange Server 2007
− Exchange Server 2010 RTM
• New-MailboxRepairRequest − Exchange Server 2010 SP1
New-MailboxRepairRequest
• Detect and fix mailbox corruptions
• Run against a specific mailbox or database
• Mailbox access is disrupted only for the mailbox being repaired
New-MailboxRepairRequest -Mailbox saso -CorruptionType
ProvisionedFolder,SearchFolder,AggregateCounts,Foldervi
ew –Archive
New-MailboxRepairRequest -Database MBX-DB01 -
CorruptionType AggregateCounts
RBAC & Permissions
• No one is granted by default
• Mailbox Import Export management role
• New-ManagementRoleAssignment -
Name "Import Export Mailbox
Admins" -SecurityGroup "IE
Skupina" -Role "Mailbox Import
Export„
• EMS or ECP...
Cmdlets (1)
• New-MailboxImportRequest & New-MailboxExportRequest − import/export all/some data from a mailbox/online
archive mailbox to PST
− Limit 10 requests per mailbox (<alias>\MailboxExportX (where X = 0–9) − Remove old requests
− Unique name for new requests
− No duplicates
New-MailboxImportRequest Samples
• Import Inbox to target folder: New-MailboxImportRequest -Mailbox sasoe -
FilePath \\streznik\mapa\sasoe_inbox.pst -
TargetRootFolder "ImportInbox" -
IncludeFolders "#Inbox#"
• Import to Online Archive: New-MailboxImportRequest -Mailbox sasoe -
IsArchive -FilePath
\\streznik\mapa\sasoe_stare_zadeve.pst
New-MailboxExportRequest Samples
• Export Mailbox: New-MailboxExportRequest -Mailbox sasoe -FilePath
"\\streznik\mapa\saso.pst"
• Export Online Archive: New-MailboxExportRequest -Mailbox sasoe -FilePath
"\\streznik\mapa\saso_arhiv.pst" -IsArchive
• Export Mailbox + Filter: New-MailboxExportRequest -Mailbox sasoe -ContentFilter
{(body -like "*slowug*") -and (body -like
"*prezentacije*") -and (Received -lt "01/01/2010")} -
FilePath "\\streznik\mapa\sasoe_tmp.pst"
• Export Inbox: New-MailboxExportRequest -Mailbox sasoe -IncludeFolders
"#Inbox#" -FilePath "\\streznik\mapa\sasoe_inbox.pst"
Cmdlets (2)
• Import − Get-MailboxImportRequest
− Get-MailboxImportRequestStatistics
− Remove-MailboxImportRequest
− Set-MailboxImportRequest
− Suspend-MailboxImportRequest
− Resume-MailboxImportRequest
• Export − Get-MailboxExportRequest
− Get-MailboxExportRequestStatistics
− Set-MailboxExportRequest
− Remove-MailboxExportRequest
− Suspend-MailboxExportRequest
− Resume-MailboxExportRequest
Calendar Repair Assistant (1)
• Why? Users! Apps!
• Configurable mailbox assistant − Microsoft Exchange Mailbox Assistants service
(Mailbox Server)
• Automatically detects and corrects inconsistencies with single and recurring meeting items
• By Default off
Calendar Repair Assistant Tasks
• Detects inconsistencies − Uses the organizer's copy of the calendar item as a
master copy for all meeting items
• Determines if inconsistencies were intentional − An attendee can introduce an inconsistency by deleting
the meeting request and not notifying the organizer
• Corrects inconsistencies − Calendar Repair Assistant corrects inconsistencies on
the Mailbox server on which it runs
− merges the information so data isn't lost
Calendar Repair Assistant Tasks
• Sends a calendar repair update message if a correction was made − Sent to users whose calendar items were updated
− Message to the user's Deleted Items folder − Troubleshooting purposes
− Only sends repair update messages if the issue is fixed − Logs
Calendar Repair Log
• Writes the change to a calendar repair log file
• Output log file doesn't reveal personal data
• Path: <Exchange Installation Path>\v14\Logging\Calendar Repair Assistant
• Log Structure & Naming Convention:
CRAYYYYMMDDHH-X.Alias.log CRA = Calendar Repair Assistant prefix YYYY = year MM = month DD = day HH = hour X = instance Alias = mailbox alias
cmdlets
• Get-MailboxServer SERVER | fl
*calendar*
• Set-MailboxServer
• Set-MailboxServer -Identity
Exchange -CalendarRepairSchedule
"Thursday.7:00 PM-Thursday.07:50
PM"
Q&A