Re: VB Script to dismount stores

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



If you must try this script.

Defragment the Exchange Information Store
http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem008.mspx

James Chong


Ralph Karam wrote:
I am looking to create some scripts so I can sleep at night instead of
watching my databases run through their offline defrags.

Servers are Ex2003 SP2

I have several databases and due to large mailbox moves and server
consolidation I ahve a great amount of whitespace to be recovered.

I purchased an O'Reilly exchange cookbook and found the dismount script.

' This code will dismount the selected mailbox database.
' ------ SCRIPT CONFIGURATION ------
strServerName = "batman" ' e.g., "BATMAN"
strMDBName = "batman-store" ' e.g., "Mailbox Store (BATMAN)"
' ------ END CONFIGURATION ---------

Set theServer = CreateObject("CDOEXM.ExchangeServer")
Set theMDB = CreateObject("CDOEXM.MailboxStoreDB")

theServer.DataSource.Open strServerName
arrSG = theServer.StorageGroups
theFirstSG = arrSG(0)

strURL = "LDAP://"; & theServer.DirectoryServer & "/cn=" & strMDBName & "," &
theFirstSG
theMDB.DataSource.Open strURL
theMDB.Dismount
WScript.Echo "Database dismounted."

I changed the server and store names but when I run the script I get an error

"There is no such object on the server"
Line 15 Char 1

Any guidance would be greatly appreciated

.



Relevant Pages

  • Re: Need guidance
    ... Close all databases that are being shared by FM7 sever. ... Open FM7 pro 7 to execute a script that will import data from another file ... Open all databases in FM7 server to be shared. ...
    (comp.databases.filemaker)
  • Re: Create role on 64 bit extremely slow
    ... working properlly (except role creation), except that any change in a role ... made the whole AS server slow/ not responding (also other databases). ... generate the script and execute the script. ...
    (microsoft.public.sqlserver.olap)
  • Re: Help using scptxfr.exe to script DB
    ... MS SQL Server 2000 SP 4 Developer Edition and MS SQL Server Enterprise ... /F - The directory into which the script files should be generated. ... Maybe there is another way to script databases outside to Enterprise ...
    (microsoft.public.sqlserver)
  • Re: Copying Databases From Server to Another
    ... Manager, for SQL Server instances, which takes care to move logins and msdb ... you can perhaps full backup and restore on the new server users databases... ... you could then script the logins out and recreate them on the destination ...
    (microsoft.public.sqlserver.msde)
  • Re: VB Script to dismount stores
    ... Defragment the Exchange Information Store ... watching my databases run through their offline defrags. ... I have several databases and due to large mailbox moves and server ... I changed the server and store names but when I run the script I get an error ...
    (microsoft.public.exchange.admin)