Exchange Server 中管理信箱資料庫Manage mailbox databases in Exchange Server

信箱資料庫是建立和儲存信箱的精細度單位。A mailbox database is a unit of granularity where mailboxes are created and stored. 信箱資料庫將會儲存為 Exchange 資料庫 (.edb) 檔案。A mailbox database is stored as an Exchange database (.edb) file. 在 Exchange 2016 和 2019,每個信箱資料庫都有它自己內容,您可以設定。In Exchange 2016 and 2019, each mailbox database has its own properties that you can configure.

開始之前有哪些須知?What do you need to know before you begin?

提示

有問題嗎?請在 Exchange 論壇中尋求協助。請造訪下列論壇:Exchange ServerExchange OnlineExchange Online ProtectionHaving problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection.

建立信箱資料庫Create a mailbox database

使用 EAC 來建立信箱資料庫Use the EAC to create a mailbox database

  1. 從 Exchange 系統管理中心 (EAC) 中,瀏覽至 [伺服器From the Exchange admin center (EAC), navigate to Servers.

  2. 選取資料庫],然後再按一下**+** 符號,建立資料庫。Select Databases, and then click the + symbol to create a database.

  3. 使用新增資料庫精靈來建立資料庫。Use the new database wizard to create your database.

使用 Exchange 管理命令介面來建立信箱資料庫Use the Exchange Management Shell to create a mailbox database

關於如何建立信箱資料庫的範例,請參閱 New-MailboxDatabase 的範例 1。For an example of how to create a mailbox database, see Example 1 in New-MailboxDatabase.

如何知道這是否正常運作?How do you know this worked?

若要確認您是否已成功建立資料庫,請執行下列動作:To verify that you have successfully created a database, do the following:

  • 從 EAC 中,確認您建立的信箱資料庫列在 [資料庫] 頁面上。From the EAC, verify that the mailbox database you created is listed on the Databases page.

  • 從 Exchange 管理命令介面中,確認資料庫建立伺服器 Mailbox01 上執行下列命令。From the Exchange Management Shell, verify that the database was created on server Mailbox01 by running the following command.

    Get-MailboxDatabase -Server "Mailbox01"
    

取得信箱資料庫內容Get mailbox database properties

如需詳細語法及參數的資訊,請參閱 Get-MailboxDatabaseFor detailed syntax and parameter information, see Get-MailboxDatabase.

使用 Exchange 管理命令介面來取得信箱資料庫內容Use the Exchange Management Shell to get mailbox database properties

如需如何取得信箱資料庫內容的範例,請參閱Get-mailboxdatabase在範例 3。For an example of how to get mailbox database properties, see Example 3 in Get-MailboxDatabase.

如何知道這是否正常運作?How do you know this worked?

若要確認您是否已成功擷取信箱資料庫資訊,請執行下列動作:To verify that you have successfully retrieved your mailbox database information, do the following:

  • 從 Exchange 管理命令介面,請確認所有信箱資料庫資訊都正確都顯示。From the Exchange Management Shell, verify that all your mailbox database information is represented correctly.

設定信箱資料庫內容Set mailbox database properties

使用 EAC 設定信箱資料庫內容Use the EAC to set mailbox database properties

  1. 在 EAC 中,瀏覽至伺服器From the EAC, navigate to Servers.

  2. 選取資料庫,然後再按一下以選取您想要設定的信箱資料庫。Select Databases, and then click to select the mailbox database you want to configure.

  3. 按一下 [編輯編輯圖示來設定信箱資料庫的屬性。Click Edit Edit icon to configure the attributes of a mailbox database.

  4. 使用 [一般] 索引標籤來檢視信箱資料庫,包括信箱資料庫路徑、 上一次備份,以及信箱資料庫狀態資料庫的狀態:Use the General tab to view status about the mailbox database, including the mailbox database path, last backup, and mailbox database status:

    • 資料庫路徑: 此唯讀欄位顯示所選取的信箱資料庫的 Exchange 資料庫 (.edb) 檔案的完整路徑。Database path: This read-only field displays the full path to the Exchange database (.edb) file for the selected mailbox database. 若要檢視完整路徑,您可能必須按一下路徑,然後使用向右鍵來進行。To view the entire path, you may have to click the path and use the Right Arrow key. 您無法使用此欄位來變更該路徑。You can't use this field to change the path. 若要變更資料庫檔案的位置,請使用 Move-DatabasePath Cmdlet。To change the location of the database files, use the Move-DatabasePath cmdlet.

    • 上次完整備份: 此唯讀欄位會顯示的日期和時間上次完整備份信箱資料庫。Last full backup: This read-only field displays the date and time of the last complete backup of the mailbox database.

    • 上次增量備份: 此唯讀欄位會顯示的日期和時間上次增量備份信箱資料庫。Last incremental backup: This read-only field displays the date and time of the last incremental backup of the mailbox database.

    • 狀態: 此唯讀欄位會顯示信箱資料庫是處於裝載或卸載狀態。Status: This read-only field displays whether the mailbox database is mounted or dismounted.

    • 在伺服器上的裝載: 此唯讀欄位會顯示資料庫已裝載在哪個伺服器。Mounted on server: This read-only field displays which server the database is mounted on.

    • 主圖形: 此唯讀欄位會顯示信箱資料庫的主要伺服器。Master: This read-only field displays the master server for the mailbox database. 主控資料庫作用中副本的信箱伺服器稱為信箱資料庫主機。The Mailbox server that hosts the active copy of a database is referred to as the mailbox database master.

    • 主圖形輸入: 此唯讀欄位會顯示信箱資料庫主機的類型。Master type: This read-only field displays the type of mailbox database master.

    • 修改日期: 此唯讀欄位會顯示的日期和時間上次修改資料庫。Modified: This read-only field displays the date and time the database was last modified.

    • 伺服器裝載此資料庫的複本: 此唯讀欄位會顯示具有此資料庫副本的其他伺服器。Servers hosting a copy of this database: This read-only field displays the other servers that have a copy of this database.

  5. 使用 [維護] 索引標籤來設定信箱資料庫設定,包括指定日誌收件者、 設定維護排程,以及裝載在啟動的資料庫:Use the Maintenance tab to configure mailbox database settings, including specifying a journal recipient, setting a maintenance schedule, and mounting the database at startup:

    • 日誌收件者: 按一下 [瀏覽] 來指定要啟用此信箱資料庫的日誌收件者。Journal Recipient: Click Browse to specify a recipient to enable journaling on this mailbox database. 移除列出的收件者則停用日誌功能。Remove the recipient listed to disable journaling.

    • 維護排程: 使用此清單來選取其中一項預設的維護排程。Maintenance schedule: Use this list to select one of the preset maintenance schedules. 您也可以設定自訂排程。You can also configure a custom schedule. 若要設定自訂排程,按一下 [自訂]。To configure a custom schedule, click Customize.

    • 啟用背景資料庫維護 (24x7 ESE 掃描): 選取此核取方塊可讓線上資料庫掃描,持續在背景中執行。Enable background database maintenance (24 x 7 ESE scanning): Select this check box to enable online database scanning, which runs continuously in the background. 線上資料庫掃描會執行資料庫的總和檢查碼計算,並執行一些作業,可讓 Exchange 掃描資料庫上遺失的空間並進行復原。Online database scanning performs a checksum calculation of the database and performs operations that allow Exchange to scan for lost space on the database and recover it. 如果選取這個核取方塊,Exchange 每天會掃描資料庫一次,而且如果在七天內無法完成資料庫掃描,便會發出警告事件。If you select this check box, Exchange scans the database no more than one time per day and will issue a warning event if it can't finish scanning the database in a seven-day period.

    • 不在裝載此資料庫啟動: 選取此核取方塊,以避免 Exchange 在啟動時裝載此信箱資料庫。Don't mount this database at startup: Select this check box to prevent Exchange from mounting this mailbox database when it starts.

    • 還原可覆寫此資料庫: 選取此核取方塊可允許在還原程序期間覆寫信箱資料庫。This database can be overwritten by a restore: Select this check box to allow the mailbox database to be overwritten during a restore process.

    • 啟用循環記錄: 選取此核取方塊以啟用循環記錄。Enable circular logging: Select this check box to enable circular logging.

  6. 使用 [限制] 索引標籤來指定的儲存限制、 警告訊息間隔及刪除設定信箱資料庫:Use the Limits tab to specify the storage limits, the warning message interval, and the deletion settings for a mailbox database:

    • 發出警告 (GB): 選取此核取方塊,可自動警告信箱使用者其信箱接近儲存限制。Issue warning at (GB): Select this check box to automatically warn mailbox users that their mailbox is approaching its storage limit. 若要指定儲存限制,請選取核取方塊,然後指定要傳送警告電子郵件給信箱使用者前,信箱能儲存內容的大小 (GB)。To specify the storage limit, select the check box, and then specify in gigabytes (GB) how much content can be stored in the mailbox before a warning email message is sent to the mailbox users. 您可以輸入介於 0 到 2,097,151 (MB) (2.0 TB) 之間的值。You can enter a value from 0 through 2,097,151 megabytes (MB) (2.0 terabytes).

    • 禁止傳送 (GB): 選取此核取方塊可防止使用者傳送新的電子郵件之後他們的信箱大小達到指定的限制。Prohibit send at (GB): Select this check box to prevent users from sending new email messages after the size of their mailbox reaches the specified limit. 若要指定此限制,請選取核取方塊,然後輸入您要禁止傳送新電子郵件並通知使用者的信箱大小 (以 GB 為單位)。To specify this limit, select the check box, and then type the size of the mailbox in GB at which you want to prohibit the sending of new email messages and notify the user. 您可以輸入介於 0 到 2,097,151 MB (2.0 TB) 之間的值。You can enter a value from 0 through 2,097,151 MB (2.0 terabytes).

    • 禁止收發 (GB): 選取此核取方塊可防止使用者傳送及接收電子郵件訊息之後他們的信箱大小達到指定的限制。Prohibit send and receive at (GB): Select this check box to prevent users from sending and receiving email messages after their mailbox size reaches the specified limit. 若要指定此限制,請選取核取方塊,然後輸入您要禁止傳送和接收電子郵件並通知使用者的信箱大小 (以 GB 為單位)。To specify this limit, select the check box, and then type the size of the mailbox in GB at which you want to prohibit the sending and receiving of email messages and notify the user. 您可以輸入介於 0 到 2,097,151 MB (2.0 TB) 之間的值。You can enter a value from 0 through 2,097,151 MB (2.0 terabytes).

    • 保留已刪除項目 (天): 選取此核取方塊可設定的天數,刪除的項目會保留在信箱中。Keep deleted items for (days): Select this check box to set the number of days that deleted items are retained in a mailbox. 您可以輸入 0 到 24,855 天的值。You can enter a value from 0 through 24,855 days.

    • 保留已刪除信箱 (天): 選取此核取方塊,以設定的刪除信箱的天數,會保留。Keep deleted mailboxes for (days): Select this check box to set the number of days that deleted mailboxes are retained. 您可以輸入 0 到 24,855 天的值。You can enter a value from 0 through 24,855 days.

    • 不要永久刪除項目,直到資料庫備份: 選取此核取方塊可防止信箱和電子郵件的信箱資料庫備份之後,才刪除。Don't permanently delete items until the database has been backed up: Select this check box to prevent mailboxes and email messages from being deleted until after the mailbox database has been backed up.

  7. 使用 [用戶端設定] 索引標籤來選取信箱的離線通訊錄 (OAB):Use the Client Settings tab to select the offline address book (OAB) for the mailbox:

    • 離線通訊錄: 若要選取離線通訊錄,按一下 [瀏覽,,然後選取 [離線通訊錄。Offline address book: To select an offline address book, click Browse, and then select the offline address book.

使用 Exchange 管理命令介面來設定信箱資料庫內容Use the Exchange Management Shell to set mailbox database properties

關於如何設定信箱資料庫內容的範例,請參閱 Set-MailboxDatabase中的範例 1。For an example of how to set mailbox database properties, see Example 1 in Set-MailboxDatabase.

如何知道這是否正常運作?How do you know this worked?

若要確認您是否已成功設定屬性,請執行下列動作:To verify that you have successfully set the attributes, do the following:

  • 確認您的變更已儲存至 EAC 中。Verify that your changes are saved in the EAC.

  • 從 Exchange 管理命令介面中,執行下列命令以擷取信箱資料庫內容。From the Exchange Management Shell, run the following command to retrieve mailbox database properties.

    Get-MailboxDatabase -Identity MailboxDatabase01 -Status | Format-List
    

移動信箱資料庫路徑Move a mailbox database path

如需詳細的語法及參數資訊,請參閱 Move-DatabasePathFor detailed syntax and parameter information, see Move-DatabasePath.

使用 Exchange 管理命令介面來移動信箱資料庫路徑Use the Exchange Management Shell to move a mailbox database path

關於如何設定信箱資料庫內容的範例,請參閱 Move-DatabasePath中的範例 1。For an example of how to set mailbox database properties, see Example 1 in Move-DatabasePath.

如何知道這是否正常運作?How do you know this worked?

若要確認您是否已成功移動資料庫路徑,請執行下列動作:To verify that you have successfully moved the database path, do the following:

  1. 在 EAC 中,選取 [伺服器 > 資料庫,,然後按一下 [選擇適合的信箱。From the EAC, select Servers > Databases, and then click to select the appropriate mailbox.

  2. 按一下畫筆符號,確認資料庫路徑正確。Click the pen symbol and verify that the database path is correct.

裝載信箱資料庫Mount a mailbox database

如需詳細的語法及參數資訊,請參閱 Mount-DatabaseFor detailed syntax and parameter information, see Mount-Database.

使用 Exchange 管理命令介面裝載信箱資料庫Use the Exchange Management Shell to mount a mailbox database

關於如何裝載信箱資料庫的範例,請參閱 Mount-Database 的範例 1。For an example of how to mount a mailbox database, see Example 1 in Mount-Database.

如何知道這是否正常運作?How do you know this worked?

若要確認您是否已成功裝載信箱資料庫,請執行下列動作。To verify that you have successfully mounted the mailbox database, do the following.

  • 從 Exchange 管理命令介面中,執行下列命令以擷取信箱資料庫內容的所有信箱資料庫。From the Exchange Management Shell, run the following command to retrieve mailbox database properties for all mailbox databases.

    Get-MailboxDatabase -IncludePreExchange2013
    

卸載信箱資料庫Dismount a mailbox database

如需詳細的語法及參數資訊,請參閱 Dismount-DatabaseFor detailed syntax and parameter information, see Dismount-Database.

使用 Exchange 管理命令介面卸載信箱資料庫Use the Exchange Management Shell to dismount a mailbox database

關於如何卸載信箱資料庫的範例,請參閱 Dismount-Database 的範例 1。For an example of how to dismount a mailbox database, see Example 1 in Dismount-Database.

如何知道這是否正常運作?How do you know this worked?

若要確認您是否已成功卸載資料庫,請執行下列動作:To verify that you have successfully dismounted the database, do the following:

  1. 在 EAC 中,選取 [伺服器 > 資料庫,,然後按一下 [選擇適合的信箱。From EAC, select Servers > Databases, and then click to select the appropriate mailbox.

  2. 按一下畫筆符號,並確認資料庫狀態為DismountedClick the pen symbol, and verify that the database status is Dismounted.

移除信箱資料庫Remove a mailbox database

使用 EAC 移除信箱資料庫Use the EAC to remove a mailbox database

  1. 在 EAC 中,選取 [伺服器 > 資料庫,,然後按一下 [選擇適合的信箱。From the EAC, select Servers > Databases, and then click to select the appropriate mailbox.

  2. 按一下 [刪除刪除圖示若要移除的信箱資料庫。Click Delete Delete icon to remove the mailbox database.

使用 Exchange 管理命令介面移除信箱資料庫Use the Exchange Management Shell to remove a mailbox database

如需詳細的語法及參數資訊,請參閱 Remove-MailboxDatabaseFor detailed syntax and parameter information, see Remove-MailboxDatabase.

  1. 執行以下命令,移除信箱資料庫 MyDatabase。Run the following command to remove the mailbox database MyDatabase.

    Remove-MailboxDatabase -Identity "MyDatabase"
    
  2. 當提示您是否確定要執行巨集指令時,請輸入YWhen you're prompted about whether you're sure that you want to perform the action, type Y.

  3. 當對話方塊出現說明已順利移除資料庫時,請注意 Exchange 資料庫 (.edb) 檔案的位置。When the dialog box appears stating that the database was removed successfully, note the location of the Exchange database (.edb) file. 如果想要從硬碟中移除此檔案,則必須手動移除此檔案。If you want to remove this file from the hard drive, you must remove it manually.

如何知道這是否正常運作?How do you know this worked?

若要確認您是否已成功移除信箱資料庫,請執行下列動作:To verify that you have successfully removed the mailbox database, do the following:

  • 在 EAC 中,選取 [伺服器 > 資料庫From the EAC, select Servers > Databases.

  • 確認信箱資料庫已被移除。Verify that the mailbox database has been removed.