Recipe17.25.Creating a Mailbox Store


Recipe 17.25. Creating a Mailbox Store

Problem

You want to create a mailbox store. The primary reason for creating additional mailbox stores is to decrease the size of the individual stores while supporting many users on one server.

Solution

Using a graphical user interface

  1. Open the Exchange System Manager (ESM) snap-in.

  2. In the left pane, browse to the server and storage group where you want to create a new mailbox store.

  3. Right-click on the storage group and select New

    Enter a name for the store, configure the settings on each tab, and click OK.

  4. When prompted to mount the store, click Yes.

Using VBScript
' This code creates a Mailbox Store. ' ------ SCRIPT CONFIGURATION ------ strServer  = "<Exchange Server>"          ' e.g., ExchServer2 strSGName  = "<Storage Group Name>"       ' e.g., SG1 strMailStoreName = "<MailBox Store Name>"  ' e.g., DB1 ' ------ END CONFIGURATION ---------     ' Find Storage Group URL strSearch = "CN=" & strSGName  & "," set objSrv = CreateObject("CDOEXM.ExchangeServer") objSrv.DataSource.Open strServer for each strSg in objSrv.StorageGroups    if (instr(1,strSg,strSearch,1)>0) then strSGUrl = strSg    next      ' Generate Mailbox Store URL strMBUrl = "LDAP://CN=" & strMailStoreName & "," & strSGUrl     ' Create/configure Mailbox Store and save it set objMb = CreateObject("CDOEXM.MailBoxStoreDB") objMb.DataSource.SaveTo strMBUrl     ' Mount DataBase objMB.Mount Wscript.Echo "Successfully created mailbox store."

Discussion

Mailbox stores, which are also called mailbox databases, are where mailboxes are located. There are quite a few configuration settings for mailbox stores which are beyond the scope of this chapter, but going through the ESM GUI when manually creating a mailbox store should give you an idea of what can be configured.

Managing mailbox stores requires Exchange Service Administrator permissions. See the Discussion for Recipe 17.7.


Depending on the version (Standard or Enterprise) of Exchange, you can have up to four storage groups per server and up to five mailbox stores per storage group. ESM enforces these limits, but it is possible to directly modify Active Directory to exceed these limits. If you create more databases or storage groups than allowed, the additional databases will not mount.

Mailbox stores are represented in Active Directory by the msExchPrivateMDB class. This class is not as simple as some of the other classes used by Exchange. In addition, several of the attributes hold binary data, so working directly with these Active Directory objects can be difficult via VBScript or command-line methods. One of the more notable attributes of the mailbox store objects is a back-link attribute called homeMDBBL. This multivalued attribute links back to all of the user objects that have mailboxes in this mailbox store.

If you are using Windows 2000 Active Directory, you will find it is much faster to enumerate the mailboxes on an Exchange Server by looking at the homeMDBBL attribute versus the homeMDB attributes on the users. In Windows Server 2003 Active Directory, there was a change in how the Query Processor handles linked attributes resulting in minimal difference between using homeMDB and homeMDBBL attributes.


Using a command-line interface

Due to the binary attributes the mailbox store objects contain, they are not good candidates for the LDIFDE command-line tool.

Using VBScript

The process of calling the CDOEXM interface is rather straightforward once you have the URL for the object's location in Active Directory. As with the GUI, there are many properties that can be configured through VBScript. To get a complete list of the various methods and properties available for the MailBoxStoreDB interface, see the Exchange Server 2003 SDK.

See Also

MS KB 821748 (HOW TO: Add New Mailbox Stores in Exchange Server 2003)



Windows Server Cookbook
Windows Server Cookbook for Windows Server 2003 and Windows 2000
ISBN: 0596006330
EAN: 2147483647
Year: 2006
Pages: 380
Authors: Robbie Allen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net