Recipe6.1.Creating a Storage Group


Recipe 6.1. Creating a Storage Group

Problem

You want to create a new SG on an Exchange server.

Solution

Using a graphical user interface

  1. Launch the Exchange System Manager (Exchange System Manager.msc).

  2. In the left pane, expand the appropriate Administrative Groups container, and then expand the Servers container.

  3. Right-click the target server, and choose New Storage Group.

  4. Optionally, change the location of the store database and log files to a different volume or path in the appropriate dialog boxes.

  5. Optionally, enable circular logging or zeroing out of deleted database pages.

  6. Click OK.

Using VBScript
' This code creates a new storage group on the target Exchange server  ' ------ SCRIPT CONFIGURATION ------  strComputerName = "<serverName>" ' e.g., "batman"  strSGName = "<storageGroupName>" ' e.g., "New Storage Group" ' ------ END CONFIGURATION ---------      set theServer = CreateObject("CDOEXM.ExchangeServer")   Set theSG = CreateObject("CDOEXM.StorageGroup")   theServer.DataSource.Open strComputerName      ' get the URL of the first SG on this particular server   sgArray = theServer.StorageGroups   strSGName = sgArray(0)    ' stuff our new SG name into the URL     strTemp = Mid(strTemp, InStr(2, strTemp, "CN"))     strTargetSG = "LDAP://" & theServer.DirectoryServer & "/CN=" & _      strSGName & "," & strTemp        ' saving the new SG object to this URL actually creates the SG    theSG.DataSource.SaveTo strTargetSG    WScript.echo "Created SG " & strSGName & " successfully".

Discussion

The Enterprise version of Exchange 2000 and Exchange Server 2003 Servers supports up to four SGs, each containing five databases. The Standard edition allows zero or one public databases and zero or one mailbox databases; normally these are in the same SG. Exchange Server 2003 also allows you to create and use a recovery storage group, but the presence of an RSG doesn't count against the four-SG limit.

Even though you can easily create multiple SGs, you probably shouldn't do so until you have used all the database slots in the first SG on your server. Every time you add a SG, you also add an additional instance of the ESE code, which adds a significant amount of memory overhead. The one time to violate this rule is when you need to create a separate set of transaction logs; since logs belong to the SG and not the database, if you want multiple separate log sets, you'll have to create multiple SGs.

When you do create a new SG, you'll note that there are settings for enabling circular logging and page zeroing. I've already explained what circular logging is and when you should use it, but page zeroing is a different matter. When a database page is deleted from an ESE file, the page header is marked with a tombstone that indicates that the page is free, and it goes into the whitespace pool for reassignment later. Its contents remain intact, though, which means that confidential data could potentially be recovered by anyone who can get access to the database file or backup copies. In most environments, this is a low risk; however, if you turn on page zeroing, each deleted page is filled with zeroes when it's marked as deleted. When planning for performance, keep in mind that page zeroing is a highly disk-intensive process and has a substantial performance impact.

The VBScript code uses CDOEXM to actually create the new SG. The CDOEXM StorageGroup object requires that you specify a URL at which the new SG will be created; although you can specify the complete URL, it's easier to specify the new SG's name and the server where you want it created, then retrieve the first named SG on the server and use its URL to construct the URL of the new object. By default, Exchange will create the SG log files in the default log path; you can move them later using the method described in Recipe 6.9. As with most other CDOEXM objects, you have to use the SaveTo method to finalize your changes.

See Also

Recipe 6.9 for moving storage group logs to another disk location, Recipe 11.11 for using recovery storage groups, MS KB 319218 (HOW TO: Add New Mailbox Stores in Exchange 2000), MS KB 821748 (HOW TO: Add New Mailbox Stores in Exchange Server 2003), MSDN: CDOEXM documentation, and MS KB 824126 (How to use Recovery Storage Groups in Exchange Server 2003)



Exchange Server Cookbook
Exchange Server Cookbook: For Exchange Server 2003 and Exchange 2000 Server
ISBN: 0596007175
EAN: 2147483647
Year: 2006
Pages: 235

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