Defragment an Exchange database using a network drive

John Savill

April 24, 2006

10 Min Read
ITPro Today logo in a gray background | ITPro Today

https://store.pentontech.com/index.cfm?s=1&promocode=eu205xxL

Make sure your copy of Windows Tips & Tricks UPDATE isn't mistakenly blocked by antispam software! Be sure to add [email protected] to your list of allowed senders and contacts.

This email newsletter comes to you free and is supported by the following advertisers, which offer products and services in which you might be interested. Please take a moment to visit these advertisers' Web sites and show your support for Windows Tips & Tricks UPDATE.

Symantec
http://www.windowsitpro.com/go/whitepapers/symantec/messaging/?code=T&Ttop0320

Hewlett-Packard
http://www.windowsitpro.com/go/whitepapers/hp/exchangedeployment/?code=T&Tmid0320

Sponsor: Symantec

Take advantage of new email messaging management solutions and content-addressable storage to create archives that are compliant, reduce expenses, and extend the life of your storage resources.
http://www.windowsitpro.com/go/whitepapers/symantec/messaging/?code=T&Ttop0320

FAQs

  • Q. Can I defragment an Exchange database using a network drive if I don't have enough space locally?

  • Q. How do I install Windows Server 2003 R2 on a Windows 2003 Service Pack 1 (SP1) installation?

  • Q. What are the new storage management technologies in Windows Server 2003 R2?

  • Q. How do I install the File Server Resource Manager services?

  • Q. How can I create a list of all subnets in a forest that aren't assigned to a site?

Sponsor: Hewlett-Packard

Improve operational efficiency and reduce costs over the lifetime of an Exchange deployment when you deploy in a high-performance environment.
Improve operational efficiency and reduce costs over the lifetime of an Exchange deployment when you deploy in a high-performance environment. http://www.windowsitpro.com/go/whitepapers/hp/exchangedeployment/?code=T&Tmid0320

FAQs

Q. Can I defragment an Exchange database using a network drive if I don't have enough space locally?

A. Yes, you can use the /t switch with the Eseutil utility to specify a local or remote location as the temporary folder to be used for the database to be defragmented. Using a remote location might slow down the defragmentation process, however. In the example below, I specified the Z drive, which maps to a network path (or you can use a UNC path), and a temporary file name for the database.

  C:Program FilesExchsrvrbin>eseutil /d "c:program filesexchsrvrmdbdatapriv1.edb" /tz:tempdfrg.edb  
  Microsoft(R) Exchange Server Database UtilitiesVersion 6.5  Copyright (C) Microsoft Corporation. All Rights Reserved.    
Initiating DEFRAGMENTATION mode...  Database: c:program filesexchsrvrmdbdatapriv1.edb  Streaming File: c:program filesexchsrvrmdbdatapriv1.STM  Temp. Database: z:tempdfrg.edb  Temp. Streaming File: z:tempdfrg.STM    
Defragmentation Status (% complete)    
0 10 20 30 40 50 60 70 80 90 100  |----|----|----|----|----|----|----|----|----|----|  ...................................................    
  Moving 'z:tempdfrg.edb' to 'c:program filesexchsrvrmdbdatapriv1.edb'...  File Copy Status (% complete)    
0 10 20 30 40 50 60 70 80 90 100  |----|----|----|----|----|----|----|----|----|----|  ...................................................    
  Moving 'z:tempdfrg.STM' to 'c:program filesexchsrvrmdbdatapriv1.stm'...  File Copy Status (% complete)    
0 10 20 30 40 50 60 70 80 90 100  |----|----|----|----|----|----|----|----|----|----|  ...................................................    
  Note:  It's recommended that you immediately perform a full backup  of this database. If you restore a backup made before the  defragmentation, the database will be rolled back to the state  it was in at the time of that backup.    
Operation completed successfully in 17.846 seconds.  

Q. How do I install Windows Server 2003 R2 on a Windows 2003 Service Pack 1 (SP1) installation?

A. Windows 2003 R2 is Windows 2003 SP1 plus optionally installed components. The program comes on two CD-ROMs: The first CD-ROM is just Windows 2003 with SP1 integrated into it; the second CD-ROM includes the new R2 content and a module to update the Add/Remove Windows Components section of the Add or Remove Programs Control Panel applet with the options to install the new R2 features, an updated "Configure your Server" Wizard, and Microsoft Management Console (MMC) 3.0.

To install R2 on an existing Windows 2003 SP1 server, you need only the second R2 disk (or R2D2 :-) ). The disk should autostart and display the option to Continue Windows Server 2003 R2 Setup, which will prompt you for a new R2 product key. (You can't use your Windows 2003 product key for R2.)

Alternatively, you can install R2 via the command line and pass the product key as a parameter to setup2.exe (which is responsible for the R2 part of the installation) using /productkey: or /p: with format xxxxx-xxxxx-xxxxx-xxxxx-xxxx. If the product key is passed, you must also use the /quiet switch to eliminate prompts during the installation, and the /a switch to automatically accept the End User License Agreement (EULA), as the example below shows:

  G:CMPNENTSR2SETUP2.EXE /productkey:NONON-ONONO-NONON-ONONO-CANDO     /quiet /a  

Q. What are the new storage management technologies in Windows Server 2003 R2?

A. Since Windows 2000 Server, we've had basic per-user per-disk logical-size-based quotas. However, there are multiple situations in which this type of quota doesn't meet requirements. The logical nature of the quota calculations means that if users compress their data, they gain no benefit from their quota because compressed files retain the same logical size; their physical size on disk is reduced, but the quota ignores this. Also quotas are per-disk and per-user. If areas exist that are shared between groups of users or there's more than one location on a single disk, the existing quota scheme doesn't function. Finally, quotas control how much space someone can use, not what they can do with it. The user and the administrator might have a difference of opinion over what the highly available file space should be used for. File screening controls what users can write to a volume or folder.

Windows 2003 R2 introduces a whole new suite of technologies around the File Server Resource Management suite of services, which comprises these three technologies:

  • Storage Reports is a set of reports with configurable parameters that you can run on an as-needed basis or at scheduled intervals, then email or post the output to a storage area. For example, a company could run a storage report of each business area's data at 2 A.M. each morning and post it to a Sharepoint portal or Web site. You can output the storage reports to a number of formats, including Dynamic HTML (DHTML), which lets you resort the displayed data, HTML, XML, CSV and text. Reports provided include duplicate files, files by file group, files by owner, large files, least-accessed and most-recently accessed files, quotas used and file screen reports.

  • Quota Management lets you apply quotas on a volume or folder via custom settings or a pre-defined template (Microsoft provides a number of templates of common quota combinations). Quotas can be defined as hard or soft: A hard quota will stop files from being written to the file or folder once the quota limit has been reached; a soft quota won't stop files from being written once the quota limit is breached. You can configure one or more email or event log notifications (e.g., when you reach a quota and/or when you reach 85 percent of the quota, 90 percent of the quota, or any other percentage.

  • File Screening Management lets you apply file type screening filters at volume or folder levels, which will stop files of the selected type from being written. A number of file groups are predefined, as the figureshows, to avoid having to type in all the file type extensions. You can configure file screening to be active or passive. An active file screen stops filtered files from being written; passive file screens allow the files to be written but still triggers any defined actions. Notifications can be via email, event log entry, command, or storage report. You can also configure exceptions on folders that allow file groups. For example, you could filter all audio, video, image, and text files for a folder, but create a subfolder named audio with an exception defined for audio files that controls where files can be created. Users will received an Access Denied message when trying to write a filtered file type, and if you configure an email notification they would receive a message seconds later notifying them why they got the error message and directing them, for example, to company policy on storing Britney Spears albums on the network.

    When you combine these technologies you have the ability to see how file space is used (storage reports), how much space is used (quota management), and what the space is used for (file screening).

    Q. How do I install the File Server Resource Manager services?

    A. As with all Windows Server 2003 R2 features, the File Server Resource Manager component must be installed via the Add/Remove Windows Components module. To install the component, follow these steps:

    1. Start the Add/Remove Programs Control Panel applet (Start, Settings, Control Panel, Add or Remove Programs).

    2. Click Add/Remove Windows Components.

    3. Select "Management and Monitoring Tools" and click Details.

    4. Select the File Server Resource Manager check box, as the figure at http://www.windowsitpro.com/content/content/50126/adsubnetnosite.gif'll need to reboot for the changes to take effect.

    Q. How can I create a list of all subnets in a forest that aren't assigned to a site?

    A. By default, when you create a subnet via the Microsoft Management Console (MMC) Active Directory Sites and Services snap-in, you must link it to a site. However, after the subnet is created, you can unlink it from a site, as the figureshows. You can use the following script, which you can download at http://www.windowsitpro.com/articles/download/listsubnetnosite.zip, to list subnets that aren't linked to a site.

      ' listsubnetnosite.vbs  ' John Savill  ' Usage : listsubnetnosite.vbs  ' e.g. cscript listsubnetnosite.vbs    on error resume next    Set objRootDSE = GetObject("LDAP://RootDSE")  strConfigurationNC = objRootDSE.Get("configurationNamingContext")    strSubnetsContainer = "LDAP://cn=Subnets,cn=Sites," & strConfigurationNC    Set objSubnetsContainer = GetObject(strSubnetsContainer)    objSubnetsContainer.Filter = Array("subnet")    For Each objSubnet In objSubnetsContainer      objSubnet.GetInfoEx Array("siteObject"), 0      objSubnet.Get("siteObject")      If Err.number  0 Then          WScript.Echo mid(objSubnet.Name,4) ' & " " & Err.description          Err = 0      End If  Next  

    To run the script, execute it without any parameters, as this example shows:

        C:temp>cscript listsubnetnosite.vbs  

    Hot Release (advertisement)

    Align compliance with business efficiency, and learn how fax-document management plays a role in your strategy. http://www.windowsitpro.com/go/whitepapers/esker/docmanagement?code=T&Thot0320

    Events and Resources(A complete Web and live events directory brought to you by Windows IT Pro: http://www.windowsitpro.com/events )

  • A multi-tier approach to email security prevents unauthorized access and can stop spam, viruses, and phishing attacks. Learn to implement this approach today, and protect your network security and business systems! http://www.windowsitpro.com/go/whitepapers/Symantec/multitier/?code=0322featwp

  • Early Bird Special Extended!

  • Register by 24 March 2006 for DevConnections Europe in Nice, France, 24-27 April 2006, and take advantage of special savings. http://www.devconnectionseurope.com/?refer=0320emailannc

  • SPECIAL PODCAST OFFER:

  • Expert Ben Smith describes the benefits of using server virtualization to make computers more efficient. http://www.windowsitpro.com/go/podcasts/hp/virtualization/?code=0322emailannc

    Featured White Paper(from Windows IT Pro and its partners)

  • A multi-tier approach to email security prevents unauthorized access and can stop spam, viruses, and phishing attacks. Learn to implement this approach today, and protect your network security and business systems! http://www.windowsitpro.com/go/whitepapers/Symantec/multitier/?code=0322featwp

    Announcements(from Windows IT Pro and its partners)

  • VIP Monthly Pass Subscribers have it all!

  • Become a VIP Monthly Pass subscriber and get continuous, inside access to ALL the online resources published in Windows IT Pro, SQL Server Magazine, and the Exchange and Outlook Administrator, Windows Scripting Solutions, and Windows IT Security newsletters--that's more than 26,000 articles at your fingertips. You'll also get the latest digital issue (just like the print edition, but delivered directly to your inbox) of Windows IT Pro each month. Subscribe now: https://store.pentontech.com/index.cfm?s=1&promocode=eu2763um

  • Save 44% off the Windows IT Security Newsletter

  • For a limited-time, order the Windows IT Security newsletter and SAVE up to $80 off the cover price. You'll discover endless fundamentals on building and maintaining a secure enterprise, in-depth product coverage of the best security tools available, and expert advice on the best way to implement various security components. You'll also get unlimited access to the full online security article library (more than 1900 articles). Subscribe now: https://store.pentontech.com/index.cfm?s=1&promocode=eu2563uy

    Contact Us Here's how to reach us with your comments and questions:

    This email newsletter is brought to you by Windows IT Pro, the leading publication for IT professionals deploying Windows and related technologies. Subscribe today.
    https://store.pentontech.com/index.cfm?s=1&promocode=eu205xxb

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like